The Museum of HP Calculators

HP Forum Archive 20

[ Return to Index | Top of Index ]

HP-41 MCODE breakpoint/trap instruction?
Message #1 Posted by Håkan Thörngren on 13 Mar 2011, 5:12 p.m.

Has someone defined/allocated an opcode for a breakpoint instruction in HP-41 MCODE? (Similar to what was done with the WRITE-MLDL 040 instruction.)

      
Re: HP-41 MCODE breakpoint/trap instruction?
Message #2 Posted by Eric Smith on 13 Mar 2011, 6:55 p.m.,
in response to message #1 by Håkan Thörngren

Not that I've heard. In my simulator, I track breakpoints in a separate array, so that I don't have to modify the code at all. Alternatively, one could use an extra bit stored in the same array as the code, effectively extending the word from ten to eleven (or more) bits. Some simulators have used extra bits in that fashion to define new instructions, extend the addressing range of existing instructions, etc.

            
Re: HP-41 MCODE breakpoint/trap instruction?
Message #3 Posted by Håkan Thörngren on 15 Mar 2011, 8:40 a.m.,
in response to message #2 by Eric Smith

Great ideas! They are both easier than rewriting the instructions.

I will start with the challenge of rewriting the code anyway, as I am interested in trying it out.

Quote:
Not that I've heard. In my simulator, I track breakpoints in a separate array, so that I don't have to modify the code at all. Alternatively, one could use an extra bit stored in the same array as the code, effectively extending the word from ten to eleven (or more) bits. Some simulators have used extra bits in that fashion to define new instructions, extend the addressing range of existing instructions, etc.


      
Re: HP-41 MCODE breakpoint/trap instruction?
Message #4 Posted by J-F Garnier on 14 Mar 2011, 4:09 a.m.,
in response to message #1 by Håkan Thörngren

I used the 080h opcode for breakpoints in Emu41.

BTW, I also defined a FPU extension opcode (0C0h), but I never implemented it. It was supposed to be a 2-word opcode (0C0h xxxh) to speed up math routines in emulators.

J-F

            
Re: HP-41 MCODE breakpoint/trap instruction?
Message #5 Posted by Håkan Thörngren on 15 Mar 2011, 8:22 a.m.,
in response to message #4 by J-F Garnier

Great! Then I go for 080h.

Quote:
I used the 080h opcode for breakpoints in Emu41.

BTW, I also defined a FPU extension opcode (0C0h), but I never implemented it. It was supposed to be a 2-word opcode (0C0h xxxh) to speed up math routines in emulators.

J-F



[ Return to Index | Top of Index ]

Go back to the main exhibit hall