HP Forums

Full Version: HP-41 NUT Assembler question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

While verifying the D41 NUT disassemlber I came across some strange code in the NUT ROM. It took me quite a while to figure out that the output of the disassemlber is wrong.

After digging deeper into the topic it turned out there is an ambiguity in the op codes.

It's about the op code 3E8. D41 turns it into "REGN=C 15" which doesn't make any sense in the context but the transformation seems to be right. Looking into the op code table there is a special case for 3E8 meaning "SLSABC" which is the right choice in the context.

I have the strong feeling there are more exceptions. My question is how are these exceptions defined? Do I need to check display writing op codes first? That would mean on the other hand there is a documentions error and "REG=C <n>" is valid for n=0..E instead of F.

Any ideas?


Hi Michael,

This simply translates to WRIT 15(e) in JDA mnemonics, but could be a display write instruction, depending on the context. I think it will be very difficult to check for display instructions depending on which peripheral is selected.

You might want to take a look at my disassembler, built in the M2kM software. Take a look at the various options, it could be very interesting to take some of these in your software as well. I like your initiative, so please go on!

When you software is more stable, I will take it thorugh a test. I have a disassembly option to allow re-assembly with SDK41, and will test it with your assembler as well.



Thx, got it. I wasn't aware about the fact that the display needs to be selected first (day by day I learn more about the inside of the 41). So, the disassembler creates the right code (or at least does it's best under the given circumstances).

Sure, I'll have a look at your suggestions.


Success! I simply enhanced the definition of the input label file. There you now specify the address range(s) where the assumed peripheral is active:

display 07ef 07fc

That results in the following code (addr 07f1 is the one of interest):

 07EF 1B0    [MESSL]         C=STK
07F0 330 (L07F0) CXISA
07F2 23A C=C+1 M
07F3 2F6 ?C#0 XS
07F4 3E3 GONC (L07F0) ;-4 07F0
07F5 1E0 GOTOC
07F6 130010 [ENLCD] LDI 010
07F8 270 DADD=C
07F9 1300FD LDI 0FD
07FC 3E0 RTN

Thx to Warren, the rest was already prepared.


The new version is online.


Hi Michael, where is the new version stored? Also your link at TOS to SDK41R6.1-32V1.zip is broken. Thanks and Best Regards, Kerem

I see, there are 2 threads running. This one was only about a specific question I had that's why I didn't post the link again. But here it is: http://download.michael-goericke.de/hp41/SDK41R6.1-32.zip