HP Forums

Full Version: HP-41 MCODE breakpoint/trap instruction?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.)

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.

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

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


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.