![]() |
Routines |
| Prev: 7864 | Up: Map | Next: 788C |
|
Used by the routines at PARSE_COMMAND, PARSE_AND, PARSE_VERB, PARSE_PREPOSITION and PARSE_ADJECTIVE.
From the pointer in TOKEN_POINTER, which it moves on. The previous position is kept in VARIABLES, which is what the main loop echoes back when a word is not known, and the previous class in LAST_CLASS, which PARSE_IN looks at.
|
||||||||||
| NEXT_TOKEN | 7873 | LD HL,(TOKEN_POINTER) | Keep where this token is, for the echo of an unknown word | |||||||
| 7876 | LD (VARIABLES),HL | |||||||||
| 7879 | LD A,D | Keep the class of the last token | ||||||||
| 787A | LD (LAST_CLASS),A | |||||||||
| 787D | LD A,(HL) | B = the top of the word's offset, D = the class | ||||||||
| 787E | AND $0F | |||||||||
| 7880 | LD B,A | |||||||||
| 7881 | LD A,(HL) | |||||||||
| 7882 | AND $F0 | |||||||||
| 7884 | LD D,A | |||||||||
| 7885 | INC HL | C = the low byte; move the pointer on | ||||||||
| 7886 | LD C,(HL) | |||||||||
| 7887 | INC HL | |||||||||
| 7888 | LD (TOKEN_POINTER),HL | |||||||||
| 788B | RET | |||||||||
| Prev: 7864 | Up: Map | Next: 788C |