![]() |
Routines |
| Prev: 42986 | Up: Map | Next: 43022 |
|
Used by the routine at CheckTokenMatchAndSetFlag.
Picks the token word table from the print mode and shifts the token parameter into place.
|
||||||||
| PrintTokenBasedOnParameters | 42987 | LD HL,41549 | Point HL at the token table and read the print mode into E. | |||||
| 42990 | LD A,(40999) | |||||||
| 42993 | LD E,A | |||||||
| 42994 | LD A,(41642) | Read the object display flag. | ||||||
| 42997 | OR E | Merge in the print mode, so both can be tested for zero at once. | ||||||
| 42998 | JR Z,PrintTokenBasedOnParameters_0 | Jump ahead to PrintTokenBasedOnParameters_0 if the object display flag and the print mode are both zero. | ||||||
| 43000 | LD HL,41557 | Point HL at the other half of the token table. | ||||||
| PrintTokenBasedOnParameters_0 | 43003 | LD A,D | Shift the token parameter in D down by three bits. | |||||
| 43004 | RRCA | |||||||
| 43005 | RRCA | |||||||
| 43006 | RRCA | |||||||
| 43007 | AND %00011110 | Turn the shifted parameter into an even offset into the token word table. | ||||||
| 43009 | PUSH DE | Save DE, index the token table by the shifted parameter and read that word into DE. | ||||||
| 43010 | LD E,A | |||||||
| 43011 | LD D,0 | |||||||
| 43013 | ADD HL,DE | |||||||
| 43014 | LD E,(HL) | |||||||
| 43015 | INC HL | |||||||
| 43016 | LD D,(HL) | |||||||
| 43017 | CALL PrintTextToken | Call PrintTextToken to print the token. | ||||||
| 43020 | POP DE | Restore DE from the stack. | ||||||
| 43021 | RET | Return. | ||||||
| Prev: 42986 | Up: Map | Next: 43022 |