HP-41 NUT Assembler question - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: HP-41 NUT Assembler question (/thread-211331.html) |
HP-41 NUT Assembler question - MichaelG - 02-12-2012 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?
Michael
Re: HP-41 NUT Assembler question - Meindert Kuipers - 02-12-2012 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. Regards,
Meindert
Re: HP-41 NUT Assembler question - MichaelG - 02-12-2012 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.
Michael
Re: HP-41 NUT Assembler question - MichaelG - 02-12-2012 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 Thx to Warren, the rest was already prepared.
Michael
Re: HP-41 NUT Assembler question - MichaelG - 02-12-2012 The new version is online.
Michael
Re: HP-41 NUT Assembler question - Kerem Kapkin (Silicon Valley, CA) - 02-14-2012 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
Re: HP-41 NUT Assembler question - MichaelG - 02-14-2012 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 Michael
|