| The Hobbit (v1.0) | Routines |
| Prev: 7CC0 | Up: Map | Next: 7DD5 |
|
A direction on its own ('north') is a complete movement command: if a verb may start here (bit 1 of E), it is treated as GO NORTH (7DFB). After a verb, a direction is stored as the frame's particle, like an adverb (7DBC): bit 2 of E must allow it, and it is put at offset 2 of the frame (7FE2). The entry at 7DBC is the handler for adverbs.
|
||||
| 7DB6 | BIT 1,E | May a verb start here? | ||
| 7DB8 | JR NZ,$7DFB | Yes: treat the direction as "go <direction>" | ||
| 7DBA | LD D,$00 | Otherwise it is used like an adverb | ||
| 7DBC | BIT 2,E | ADVERB: is an adverb allowed here? | ||
| 7DBE | JP Z,$7FF3 | No: syntax error | ||
| 7DC1 | LD A,($B609) | Under ALL EXCEPT... | ||
| 7DC4 | CP $02 | |||
| 7DC6 | JR NZ,$7DCB | |||
| 7DC8 | CALL $7F22 | ...start a new frame for it | ||
| 7DCB | RES 2,E | No more adverbs | ||
| 7DCD | LD L,$02 | Store the word at offset 2 of the frame | ||
| 7DCF | CALL $7FE2 | |||
| 7DD2 | JP $7C7E | Next noun phrase | ||
| Prev: 7CC0 | Up: Map | Next: 7DD5 |