![]() |
Routines |
| Prev: A7EA | Up: Map | Next: A80E |
|
Used by the routine at CheckTokenMatchAndSetFlag.
Picks the token word table from the print mode and shifts the token parameter into place.
|
||||||||
| PrintTokenBasedOnParameters | A7EB | LD HL,$A24D | Point HL at the token table and read the print mode into E. | |||||
| A7EE | LD A,($A027) | |||||||
| A7F1 | LD E,A | |||||||
| A7F2 | LD A,($A2AA) | Read the object display flag. | ||||||
| A7F5 | OR E | Merge in the print mode, so both can be tested for zero at once. | ||||||
| A7F6 | JR Z,PrintTokenBasedOnParameters_0 | Jump ahead to PrintTokenBasedOnParameters_0 if the object display flag and the print mode are both zero. | ||||||
| A7F8 | LD HL,$A255 | Point HL at the other half of the token table. | ||||||
| PrintTokenBasedOnParameters_0 | A7FB | LD A,D | Shift the token parameter in D down by three bits. | |||||
| A7FC | RRCA | |||||||
| A7FD | RRCA | |||||||
| A7FE | RRCA | |||||||
| A7FF | AND %00011110 | Turn the shifted parameter into an even offset into the token word table. | ||||||
| A801 | PUSH DE | Save DE, index the token table by the shifted parameter and read that word into DE. | ||||||
| A802 | LD E,A | |||||||
| A803 | LD D,$00 | |||||||
| A805 | ADD HL,DE | |||||||
| A806 | LD E,(HL) | |||||||
| A807 | INC HL | |||||||
| A808 | LD D,(HL) | |||||||
| A809 | CALL PrintTextToken | Call PrintTextToken to print the token. | ||||||
| A80C | POP DE | Restore DE from the stack. | ||||||
| A80D | RET | Return. | ||||||
| Prev: A7EA | Up: Map | Next: A80E |