HP-41 MCODE breakpoint/trap instruction?
#1

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

#2

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.

#3

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

#4

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


#5

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.




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 5,577 12-05-2013, 02:40 AM
Last Post: Hans Brueggemann
  [prime] Insert a breakpoint in a program for debugging ? Olivier Lecluse 3 1,744 11-09-2013, 09:41 PM
Last Post: Joseph Ec
  HP-41 MCODE: The Last Function - at last! Ángel Martin 0 1,023 11-08-2013, 05:11 AM
Last Post: Ángel Martin
  41-MCODE: Auto XEQ+ALPHA possible? Ángel Martin 5 1,922 05-29-2013, 06:15 AM
Last Post: Ángel Martin
  HP 41 Mcode related Questions Michael Fehlhammer 4 1,919 05-10-2013, 07:09 PM
Last Post: Michael Fehlhammer
  x swap (I) hp 35s instruction Denis Doyon 4 1,624 12-25-2012, 11:22 AM
Last Post: Walter B
  41-MCODE: Breaking the FAT barrier. Ángel Martin 0 902 09-03-2012, 06:31 AM
Last Post: Ángel Martin
  41-MCODE: Dr. Jekyll & Mr. Hyde Ángel Martin 9 2,955 07-09-2012, 09:41 AM
Last Post: Monte Dalrymple
  HP41C: Factorial (kind of) in MCODE Frido Bohn 7 2,411 05-26-2012, 09:18 AM
Last Post: Frido Bohn
  41-MCODE: SOLVE & INTEG - 4k ROM Ángel Martin 9 2,693 04-19-2012, 05:29 AM
Last Post: fhub

Forum Jump: