Re: 41 MCODE Question Message #8 Posted by HrastProgrammer on 20 Nov 2010, 4:28 a.m., in response to message #6 by Angel Martin
聲gel,
I think you can use the Windows version of my HP-41E emulator for this purpose because it has a very powerful debugger and tracer, which are also very simple to use.
First, download the latest version here http://www.hrastprogrammer.com/hp41e/hp41epc.zip and unpack it into some directory ... You should use this version because it has some capabilities not present in the old version floating around.
Let's say you want to trace BCDBIN routine at 02E3 hex ... Edit HP41E.INI file and add the following section:
[Tracer]
Activate=$02E3
Deactivate=
Powoff=0
You should close HP-41E prior to this otherwise it will rewrite INI file on exit. The above means "start tracer at $02E3 and deactivate it on the first POWOFF instruction". You can also deactivate it on a specific address if you specify Deactivate=$ADDR ... $ means hexadecimal.
Then start HP-41E, type 12 RCL IND X and you'll have HP41E.LOG file in the same directory. It looks like that:
02E3 27E C=C-1 S DAdd=003 PfAd=00 Base=16
A=000000000690F3 B=00000000000020 C=01200000000001 Stack=0024 004E 00F0 122E
M=01200000000001 N=01200000000003 Cy=0 P=1 Q=D G=90 FO=00 ST=00100011110011
02E4 27E C=C-1 S DAdd=003 PfAd=00 Base=16
A=000000000690F3 B=00000000000020 C=F1200000000001 Stack=0024 004E 00F0 122E
M=01200000000001 N=01200000000003 Cy=1 P=1 Q=D G=90 FO=00 ST=00100011110011
02E5 389 GOLC =ERRAD 14E2 DAdd=003 PfAd=00 Base=16
A=000000000690F3 B=00000000000020 C=E1200000000001 Stack=0024 004E 00F0 122E
M=01200000000001 N=01200000000003 Cy=0 P=1 Q=D G=90 FO=00 ST=00100011110011
02E7 106 A=C X DAdd=003 PfAd=00 Base=16
A=000000000690F3 B=00000000000020 C=E1200000000001 Stack=0024 004E 00F0 122E
M=01200000000001 N=01200000000003 Cy=0 P=1 Q=D G=90 FO=00 ST=00100011110011
...
You can also debug the code directly. Edit HP41E.INI and add the following:
[Debugger]
Activate=$02E3
Then start HP-41E, type 12 RCL IND X and the debugger will be automatically activated on the address $02E3. You can then SST the machine code from this point onwards.
Of course, debugger and tracer can be used simultaneously, tracer can be activated/deactivated from the debugger, etc. The debugger can be also be activated on-demand if you double-click on that overlay "latch" inside the emulator.
I hope this can be of some help to you ...
Best regards.
HrastProgrammer
Edited: 20 Nov 2010, 5:07 a.m.
|