|HP41 key press delay (for NULL)|
Message #1 Posted by Vassilis Prevelakis on 28 Aug 2003, 7:24 a.m.
On the HP41 if you hold down a key you will see the function that is assigned to it. If you keep holding it, the key press is cancelled and you see NULL on the display. This is very useful if you want to see which function is assigned to a key (in USER mode) or which program instruction will be executed by SST, etc.
Unfortunately the timeout value is a constant hardwired into the HP41 firmware. It is just a number, independent of the CPU speed.
So under certain HP41 emulators this timeout is extremely painful, as you have to press and release the keys very fast to avoid cancelling their action.
While looking around the HP41 sources I have found the relevant bit of code.
The VASM listing is on the MoHPC CDROM, file 41VASM.pdf, page 113 (in the PDF), 112 in the document.
The line is
1306 460 LDI
1307 1100 CON 576 INITIALIZE NULL TIMER
The timeout is 576 (decimal), or 1100 (octal), or 240 (hex).
So how does this help?
I have looked at the binary ROM dumps and I have found out that the timeout value is in ROM 0, offset 1D8E.
This offset is the same on the F, G, and N ROMs.