Interest in 32-bit version of User Code Utiltiy for HP-41



#2

The subject says it all. Is there any interest in a 32-bit Windows version of Leo Duran's User Code Utility for the HP-41?

The port does not seem that difficult but has one feature I'd like to change. The command seems to accept wildcards for input file names. I'd like to remove that feature and accept only real filenames.

Is is worth the work?

Michael


#3

Sure!
Why not move one step forward? Thank you.

Greetings,
Massimo

#4

I'd prefer a POSIX version that could then be compiled on any platform. For Windows you'd use DJCPP.


#5

A Windows only version is fine to me... :p ;)

Massimo


#6

A Linux only version is fine with me :)


#7

Fine! But since it started as a DOS pgm... ;)

Edited: 23 Jan 2012, 5:53 p.m.


#8

POSIX... Compiled for Linux... forget the Windows.

#9

PLs. don´t forget Windows - some of us still (must) use it , even if we loath it.

Looking forward to the port!


#10

Quote:
PLs. don´t forget Windows - some of us still (must) use it , even if we loath it.



Since it is my bread and butter I won't loathe it. Rather I loathe some fruity boxes... ;)
+1 for the Win version!

Massimo
#11

I haven't that good news. I've been a software engineer for almost 30 years. Not to blame the author of the tool but I personally judge the source code as highly unmaintainable. It is by far more effort necessary than I am willing to invest for the port. It took me a long while to find a not initialized variable in the original code which created big problems. All my experience tells me even if I get it to work there is a huge amount of testing needed.

The good news are it seems that the conversion from txt to raw works. Having the above information in mind what are the most important conversions for you. The converter support n x m conversions. Can we reduce that for the time being to a needed minimum?

Michael

#12

I'm curious to see the source code. Can you say where you found it? I can't seem to locate the source with google.


#13

I found it here: http://hp41.claughan.com/file/hp41uc.zip

After digging a bit deaper into the code I finally gave up. The reason is the port might be possible. But I see the port only as a first step to move the tool to the 32-bit platform. If I port something I also want to be able to maintain the code up to a certain extend (like previously the A41, L41). I see no chance here. I think its better to rewrite the tool. Perhaps its possible to find the logic (its well hidden).

Michael


#14

Thanks for the pointer to the source code.

I see what you mean about the logic. The overall design seems to be "there are a few dozen distinct translations that can happen, let's code them all and factor out the common parts." If I were writing it, I think I would translate each supported format to/from one common format (maybe RAW). Then each translation would involve two steps: input format to raw, and raw to output format. It might take a little longer at run time, but it would drastically simplify the code.

Another problem is that the code assumes it's running on a little-endian machine. A 32-bit version should probably have source code that works on either little- or big-endian hardware.

Dave

#15

+1 for the Win 32 version.
Regards, Kerem

#16

As estimated it is by far easier to start from scratch. And I started it. The compiler now uses the classis technology and is fully table driven. First step is the lexical analysis (the tokenizer) then do what is needed based on the table entry. There is an entry for each statement describing its opcode, parameters etc. The core compiler is only 260 lines.

The good news is the compiler already creates reasonable output (from txt to raw). The error handling is prepared, thats the next step.

I know some people won't love what's comming now: this version is written in C#/.Net 4.0. Besides the new structure it is one reason why the development can be that fast.

I'm not decided yet whether I go for a command line tool or some sort of GUI. Your input is welcome. For my tests the compiler has a window :-)

And I plan to introduce defines or however it gets called finally. The idea is you can define a constant and use that constant for the rest of the program. The compiler replaces the constant with the assigned value. E.g.

#def IAMACONST 12
RCL IAMACONST

results in

RCL 12

Michael

Edited: 29 Jan 2012, 8:08 a.m.


#17

The only time I've used hp41uc was to convert a bunch of programs to several different formats, so the command line abilities were my preference. I was able to create a script to convert all the files.

Note that what this really means is that it would be nice to be able to do some sort of batch conversion. A windowed utility could do that too.

One nice feature of a windowed interface might be the ability to expand/collapse LIF directories so you can convert individual files within them.

As for a pre-processor, I'd be happy with the C pre-processor.

Dave

#18

Here is the first 32-bit beta version v0.7 of the txt to raw compiler:

download.michael-goericke.de/FocalComp.zip

Right now without docu. The zip contains a small test file that shows how the defines work. The emulator V41 loads the raw files.

The command line is very simple:

FocalComp <filename>

No option right now. Filename needs to be fully qualified (with extension). The output filename is constructed by exchanging the extension with .raw.

As mentioned the runtime environment .Net 4.0 is required. Specifically the client profile version is sufficent. Its standard under Win 7 and there are installer available for XP and Vista in case it isn't already installed on your system.

Special characters in strings aren't handled yet like append

Michael


Edited: 30 Jan 2012, 2:29 p.m.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Does the HP Prime really compiles the user programs? CompSystems 3 2,811 12-13-2013, 01:55 PM
Last Post: Mike Morrow
  HP 50g switching two keys in the user keyboard Sean Freeman 9 4,071 12-05-2013, 11:44 AM
Last Post: Mark Puscas
  HP-41(CL): The easiest way to transfer FOCAL programs from a Linux PC to the HP-41 Geir Isene 13 5,779 12-05-2013, 02:40 AM
Last Post: Hans Brueggemann
  HP Prime touch periodic table : new version Mic 4 2,036 11-25-2013, 05:29 PM
Last Post: Terje Vallestad
  HP PRIME: APP program code DISAPPEARS !! Joseph Ec 0 1,217 11-25-2013, 11:35 AM
Last Post: Joseph Ec
  RPL 32 David Hayden 4 2,103 11-11-2013, 11:34 AM
Last Post: David Hayden
  HP Prime - User manual lack bluesun08 6 2,622 11-08-2013, 05:38 PM
Last Post: bluesun08
  HP PRIME : strange behavior when trying user key capability Damien 12 3,975 11-03-2013, 11:02 AM
Last Post: Joe Horn
  bit manips on WP 34S Kiyoshi Akima 8 2,491 10-06-2013, 06:25 AM
Last Post: Paul Dale
  HP-Prime Polynomials: User Guide and Request CompSystems 4 2,179 09-30-2013, 09:48 PM
Last Post: Han

Forum Jump: