![]() |
Routines |
Prev: 53772 | Up: Map | Next: 53803 |
Used by the routine at SetUserDefinedKeys.
|
||||||||||
PrintUserDefinedKey | 53773 | PUSH DE | Stash the key position messaging pointer on the stack. | |||||||
53774 | LD E,A | Store the current position in an offset... | ||||||||
53775 | LD A,(53772) | Call InverseOn to highlight this key if it's the one currently in focus (i.e. if *Current_UserDefinedKey is equal to the position currently being printed). | ||||||||
53778 | CP E | |||||||||
53779 | CALL Z,InverseOn | |||||||||
53782 | LD D,0 | D=0 (to finish creating the offset for the current key position using DE). | ||||||||
Point to the key in the user-defined key table relating to the requested key position.
|
||||||||||
53784 | LD HL,23531 | HL=UserDefinedKeys_Left+DE. | ||||||||
53787 | ADD HL,DE | |||||||||
53788 | EX DE,HL | Exchange the DE and HL registers. | ||||||||
53789 | LD A,(DE) | Fetch the key for this position and store it in DE as an offset. | ||||||||
53790 | LD E,A | |||||||||
53791 | LD D,0 | |||||||||
Point to the relevant key in the keymap table.
|
||||||||||
53793 | LD HL,53804 | HL=Table_UserDefinedKeyMap+DE. | ||||||||
53796 | ADD HL,DE | |||||||||
53797 | LD A,(HL) | Fetch the key value from the keymap table and store it in A. | ||||||||
53798 | RST 16 | Print it to the screen using RST 16. | ||||||||
Print the "action" messaging to signify what this key is for, e.g. "LEFT", "RIGHT", etc...
|
||||||||||
53799 | POP DE | Restore the key position messaging pointer from the stack. | ||||||||
53800 | JP PrintString | Jump to PrintString. |
Prev: 53772 | Up: Map | Next: 53803 |