HP-41 MCODE breakpoint/trap instruction?



#6

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


#7

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.


#8

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.


#9

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


#10

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



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

Forum Jump: