Routines
| Prev: D5C9 | Up: Map | Next: D5EF |
D5D3: Print how a thing is held: IN, ON, BEHIND, UNDER or TIED TO
|
From bits 0-2 of the container's +4 and the word table at D5C9.
|
||||||||||||||
| D5D3 | LD HL,$D5C9 | Table D5C9: IN, ON, BEHIND, UNDER, TIED | ||||||||||||
| D5D6 | LD A,(IX+$04) | Read the type byte (+4) of the thing record at IX into A - The thing's +4 bits 0-2: how it is held (1-5) | ||||||||||||
| D5D9 | AND $07 | Keep only bits 0, 1, 2 of A (mask $07) | ||||||||||||
| D5DB | CP $05 | Compare A with $05 - Z when it is 5, TIED | ||||||||||||
| D5DD | PUSH AF | Save AF on the stack | ||||||||||||
| D5DE | DEC A | Subtract one from A - Print the word for it (A880) | ||||||||||||
| D5DF | LD E,A | Copy A into E | ||||||||||||
| D5E0 | LD D,$00 | Load D with $00 | ||||||||||||
| D5E2 | ADD HL,DE | Add DE to HL | ||||||||||||
| D5E3 | ADD HL,DE | Add DE to HL | ||||||||||||
| D5E4 | CALL $A880 | Call the routine "Print the dictionary word that HL refers to" (A880) | ||||||||||||
| D5E7 | POP AF | Restore AF from the stack | ||||||||||||
| D5E8 | RET NZ | Not TIED: done | ||||||||||||
| D5E9 | LD DE,$08DB | Load DE with $08DB - TIED is followed by TO ($08DB) | ||||||||||||
| D5EC | JP $A887 | Go back to A887 | ||||||||||||
| Prev: D5C9 | Up: Map | Next: D5EF |