| The Hobbit (v1.0) | Routines |
| Prev: 7F2E | Up: Map | Next: 7F56 |
|
Reads the next token from the token buffer (pointer at $B5CD), which it then advances by two. On return D holds the class (the top nibble of the first byte) and BC the word: B the top nibble of the offset and C the bottom byte. The previous class is saved at $B5CF (so that handlers can see what came before), and the position of the token is saved at B5CB for error messages. A also holds the class.
|
||||||||||||
| 7F3D | LD HL,($B5CD) | HL = the token pointer | ||||||||||
| 7F40 | LD ($B5CB),HL | Remember where this word is, for error messages | ||||||||||
| 7F43 | LD A,D | Remember the previous class | ||||||||||
| 7F44 | LD ($B5CF),A | |||||||||||
| 7F47 | LD A,(HL) | B = the top four bits of the word offset | ||||||||||
| 7F48 | AND $0F | |||||||||||
| 7F4A | LD B,A | |||||||||||
| 7F4B | LD A,(HL) | D = A = the class | ||||||||||
| 7F4C | AND $F0 | |||||||||||
| 7F4E | LD D,A | |||||||||||
| 7F4F | INC HL | |||||||||||
| 7F50 | LD C,(HL) | C = the bottom eight bits of the offset | ||||||||||
| 7F51 | INC HL | |||||||||||
| 7F52 | LD ($B5CD),HL | Move the token pointer on | ||||||||||
| 7F55 | RET | |||||||||||
| Prev: 7F2E | Up: Map | Next: 7F56 |