![]() |
Routines |
| Prev: 55656 | Up: Map | Next: 55710 |
|
Used by the routine at ReadCommandLine_CommandLinePrints.
Turns a cursor key into a compass letter: right (9) to E, left (8) to W, down (10) to S and up (91) to N.
|
||||
| MapCursorKeys | 55672 | CP 9 | Jump ahead to MapCursorKeys_East if the key is cursor right (9). | |
| 55674 | JR Z,MapCursorKeys_East | |||
| 55676 | CP 8 | Jump ahead to MapCursorKeys_West if the key is cursor left (8). | ||
| 55678 | JR Z,MapCursorKeys_West | |||
| 55680 | CP 10 | Jump ahead to MapCursorKeys_South if the key is cursor down (10). | ||
| 55682 | JR Z,MapCursorKeys_South | |||
| 55684 | CP 91 | Return unless the key is cursor up (91). | ||
| 55686 | RET NZ | |||
| 55687 | LD A,78 | Take N for cursor up. | ||
| MapCursorKeys_0 | 55689 | LD (HL),A | Store it at the line buffer and step to the next entry, then call Print_Character to print character. | |
| 55690 | INC HL | |||
| 55691 | CALL Print_Character | |||
| 55694 | DEC B | Count down the remaining steps. | ||
| 55695 | LD A,13 | Leave 13 as the result. | ||
| 55697 | RET | Return. | ||
|
Cursor down selects the letter S.
|
||||
| MapCursorKeys_South | 55698 | LD A,83 | Take the direction letter S and go to MapCursorKeys_0 to store it in the line buffer and print it. | |
| 55700 | JR MapCursorKeys_0 | |||
|
Cursor right selects the letter E.
|
||||
| MapCursorKeys_East | 55702 | LD A,69 | Take the direction letter E and go to MapCursorKeys_0 to store it in the line buffer and print it. | |
| 55704 | JR MapCursorKeys_0 | |||
|
Cursor left selects the letter W.
|
||||
| MapCursorKeys_West | 55706 | LD A,87 | Take the direction letter W and go to MapCursorKeys_0 to store it in the line buffer and print it. | |
| 55708 | JR MapCursorKeys_0 | |||
|
View the equivalent code in;
|
||||
| Prev: 55656 | Up: Map | Next: 55710 |