HP-41 NUT Assembler question



#8

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


#9

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


#10

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


#11

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
07F1 3E8 SLSABC
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
07FB 3F0 PFAD=C
07FC 3E0 RTN

Thx to Warren, the rest was already prepared.

Michael


#12

The new version is online.

Michael


#13

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


#14

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


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP-41(CL): The easiest way to transfer FOCAL programs from a Linux PC to the HP-41 Geir Isene 13 839 12-05-2013, 02:40 AM
Last Post: Hans Brueggemann
  Non-Prime question alert: Hp-41 and synthetic instructions Marcel Samek 11 598 11-04-2013, 09:31 PM
Last Post: sjthomas
  WP-34S assembler & constants Marcel Samek 8 344 06-27-2013, 12:27 PM
Last Post: Marcel Samek
  Patch for wp34s assembler Marcel Samek 0 121 06-26-2013, 05:35 PM
Last Post: Marcel Samek
  HP 71b Assembler Michael Fehlhammer 2 171 09-06-2012, 08:20 AM
Last Post: Michael Fehlhammer
  hp 41 series wire-wrapped connector question. Matt Kernal 3 213 06-19-2012, 01:48 AM
Last Post: Luiz C. Vieira (Brazil)
  That's a tough nut to crack... Matt Agajanian 7 314 05-25-2012, 01:53 PM
Last Post: Mike Morrow
  [WP34s] Assembler question fhub 6 262 05-14-2012, 03:08 PM
Last Post: Marcus von Cube, Germany
  WP 34S: Simplification to the Assembler Marcus von Cube, Germany 2 176 05-06-2012, 02:41 AM
Last Post: Marcus von Cube, Germany
  Re: HP-41 Navigation PAC question Timo 0 100 02-27-2012, 04:06 AM
Last Post: Timo

Forum Jump: