MCODE: XKD another bug fixed
|
09-01-2019, 03:35 AM
Post: #1
|
|||
|
|||
MCODE: XKD another bug fixed
I found and fixed another bug in the HP-41 firmware. The XKD feature is partially broken for XROMs.
XKD stands for eXecute Key Direct and is used by instructions such as R/S and SST. Such instructions are executed on key down, before showing its name and doing a NULL test when key is held. Looking at comments in the source, this feature was also intended to work for plug-in XROM instructions, but it turns out that it only works in program mode. In run mode the XKD ability is silently ignored and behaves as any other XROM instruction (with NULL test). Apparently, no one has ever felt a need for having XKD for XROM as I do not think this has been discussed in the past. For an XROM, XKD requires two NOPs as the first instructions at its entry point. The first NOP signals that the instruction is non-programmable, the second that it is XKD. This is also described in comments in the HP-41 firmware. But it does not work as the branch after testing for program mode skips the XKD test for the run mode case. The fix is trivial. Why I need this you might wonder. Well, my semi-merged prompting XROM instructions used in Ladybug (LDI - load integer, SL - shift left and so on) are actually non-programmable XKD instructions. They take control immediately and provide the illusion that they are plain programmable prompting instructions, as such instructions are not supported by the HP-41. So there we have it. Now these semi-merged prompting instructions no longer perform any NULL test in run mode if key is held, instead they immediately put up the prompt like all the built-in prompting instructions (both in run mode and program mode). The changed source (just a changed branch destination): Code:
|
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
MCODE: XKD another bug fixed - hth - 09-01-2019 03:35 AM
RE: MCODE: XKD another bug fixed - Ángel Martin - 09-01-2019, 04:35 PM
RE: MCODE: XKD another bug fixed - hth - 09-01-2019, 08:01 PM
RE: MCODE: XKD another bug fixed - Ángel Martin - 09-06-2019, 07:36 AM
RE: MCODE: XKD another bug fixed - hth - 09-06-2019, 07:07 PM
|
User(s) browsing this thread: 1 Guest(s)