Post Reply 
[HP41] mcode question polling point entries
03-23-2023, 07:12 AM (This post was last modified: 03-23-2023 08:17 AM by Ángel Martin.)
Post: #3
RE: [HP41] mcode question polling point entries
(03-22-2023 04:09 PM)MeindertKuipers Wrote:  Hi mcode guru's,

I am struggling with some mcode using the HP41 polling entries, and I am probably messing up some registers. Is there any definition which CPU registers can be freely used and which must be restored during any of these polling entries?

There's a set of "rules" listed in Ken Emery's book, see the Appendix D, page #151 to #153

1. Restore nybbles 10 through 3 of register C to what they were when you took control at the interrupt
2. Have P as the selected pointer
3. Load flags 48 to 55 of the user flags register into CPU register ST. This set of flags is called status set zero (SS0)
4. Have Chip 0 (the status registers) selected
5. The CPU must be in HEX mode
6. You must do a GOTO to 27F3 to end the interrupt and give control back to the calculator so that it may continue polling.

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [HP41] mcode question polling point entries - Ángel Martin - 03-23-2023 07:12 AM



User(s) browsing this thread: 1 Guest(s)