![]() |
Routines |
| Prev: 7434 | Up: Map | Next: 7478 |
|
Used by the routines at Message_PrintTheClassToken and Message_ChooseTheNounByte.
Turns a class token into a dictionary word and prints it. Bit 7 of the token selects the class table; a zero neighbour ends the line.
|
||||
| Message_ChooseAClassToken | 743F | BIT 7,D | Jump to Message_ChooseAClassToken_ChooseTheTokenTable if the token is not a class token. | |
| 7441 | JR Z,Message_ChooseAClassToken_ChooseTheTokenTable | |||
| 7443 | LD A,E | Jump to Message_ChooseAClassToken_SetTheCapitaliseFlag if the low byte is not YOU. | ||
| 7444 | LD HL,$07A8 | |||
| 7447 | CP L | |||
| 7448 | JR NZ,Message_ChooseAClassToken_SetTheCapitaliseFlag | |||
| 744A | LD A,D | Return if the high nibble matches YOU. | ||
| 744B | AND $0F | |||
| 744D | CP H | |||
| 744E | RET Z | |||
| Message_ChooseAClassToken_SetTheCapitaliseFlag | 744F | LD A,$01 | Set the capitalise-the-next-letter flag. | |
| 7451 | LD ($B704),A | |||
| 7454 | RET | Return. | ||
| Message_ChooseAClassToken_ChooseTheTokenTable | 7455 | LD HL,$AD2D | Point HL at AD2D. | |
| 7458 | LD A,($B701) | Read *WaitCountdown. | ||
| 745B | LD E,A | Jump to Message_ChooseAClassToken_ShiftTheClassToken if *WaitCountdown and *70DF are both zero. | ||
| 745C | LD A,($70DF) | |||
| 745F | OR E | |||
| 7460 | JR Z,Message_ChooseAClassToken_ShiftTheClassToken | |||
| 7462 | LD HL,$AD35 | Point HL at AD35. | ||
| Message_ChooseAClassToken_ShiftTheClassToken | 7465 | LD A,D | Shift the class token two places. | |
| 7466 | RRCA | |||
| 7467 | RRCA | |||
| 7468 | RRCA | |||
| 7469 | AND $1E | |||
| 746B | PUSH DE | Save DE and keep A in E. | ||
| 746C | LD E,A | |||
| 746D | LD D,$00 | The class-token offset's high byte is zero. | ||
| 746F | ADD HL,DE | Add the class index to the token table. | ||
| 7470 | LD E,(HL) | Read the low byte of AD35. | ||
| 7471 | INC HL | Step to the high byte of the token entry. | ||
| 7472 | LD D,(HL) | Read the high byte of AD35. | ||
| 7473 | CALL PrintToken | Call PrintToken to print a dictionary token. | ||
| 7476 | POP DE | Restore DE from the stack. | ||
| 7477 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 7434 | Up: Map | Next: 7478 |