![]() |
Routines |
| Prev: 82FD | Up: Map | Next: 8391 |
|
Slot 0 of SPECIAL_WORDS holds the word reference zero, and a quote mark comes through the tokeniser as a zero word, so this is where everything said in quotes comes. At the opening quote, with IS_ORDER clear, it begins an order (ORDER_BEGINS). At the closing one it clears IS_ORDER and files each command parsed since -- the frames after ORDER_FIRST_FRAME -- into a free slot of ORDERS, eight of 25 bytes, marking the slot taken with $FF and counting them into ORDER_COUNT; then it puts back what ORDER_BEGINS kept and goes on with the sentence at NEW_NOUN_PHRASE. What the character then does with them is its own business: see CHARACTERS.
Nothing in the playthrough that finds the code said anything in quotes, so for a while this disassembly had these 148 bytes as code nothing reaches -- and the fast-draw patch put its own code over them, so that the patched game crashed at the first thing said in quotes. It has moved; see the Patches page.
|
||||
| SPECIAL_QUOTE | 8315 | LD A,(IS_ORDER) | ||
| 8318 | AND A | |||
| 8319 | JR Z,ORDER_BEGINS | |||
| 831B | DEC A | |||
| 831C | LD (IS_ORDER),A | |||
| 831F | LD A,(ORDER_FIRST_FRAME) | |||
| 8322 | LD B,A | |||
| 8323 | LD A,(COMMAND_FRAMES) | |||
| 8326 | SUB B | |||
| 8327 | AND A | |||
| 8328 | LD C,$00 | |||
| 832A | JR Z,SPECIAL_QUOTE_6 | |||
| 832C | POP IY | |||
| 832E | PUSH IY | |||
| 8330 | LD DE,$FFE8 | |||
| 8333 | ADD IY,DE | |||
| 8335 | LD B,A | |||
| SPECIAL_QUOTE_0 | 8336 | LD IX,ORDERS | ||
| 833A | PUSH DE | |||
| 833B | PUSH BC | |||
| 833C | LD DE,$0019 | |||
| 833F | LD B,$08 | |||
| SPECIAL_QUOTE_1 | 8341 | LD A,(IX+$00) | ||
| 8344 | AND A | |||
| 8345 | JR Z,SPECIAL_QUOTE_2 | |||
| 8347 | ADD IX,DE | |||
| 8349 | DJNZ SPECIAL_QUOTE_1 | |||
| SPECIAL_QUOTE_2 | 834B | LD (IX+$00),$FF | ||
| 834F | INC IX | |||
| 8351 | POP BC | |||
| 8352 | POP DE | |||
| 8353 | JR NZ,SPECIAL_QUOTE_6 | |||
| 8355 | BIT 6,(IY+$01) | |||
| 8359 | JR Z,SPECIAL_QUOTE_3 | |||
| 835B | LD (IX-$01),$00 | |||
| 835F | JR SPECIAL_QUOTE_5 | |||
| SPECIAL_QUOTE_3 | 8361 | PUSH BC | ||
| 8362 | LD B,$18 | |||
| SPECIAL_QUOTE_4 | 8364 | LD A,(IY+$00) | ||
| 8367 | LD (IX+$00),A | |||
| 836A | INC IY | |||
| 836C | INC IX | |||
| 836E | DJNZ SPECIAL_QUOTE_4 | |||
| 8370 | POP BC | |||
| 8371 | ADD IY,DE | |||
| SPECIAL_QUOTE_5 | 8373 | ADD IY,DE | ||
| 8375 | INC C | |||
| 8376 | DJNZ SPECIAL_QUOTE_0 | |||
| SPECIAL_QUOTE_6 | 8378 | XOR A | ||
| 8379 | LD (ALL_EXCEPT),A | |||
| 837C | LD A,C | |||
| 837D | LD (ORDER_COUNT),A | |||
| 8380 | POP IY | |||
| 8382 | LD A,(ORDER_FIRST_FRAME) | |||
| 8385 | LD (COMMAND_FRAMES),A | |||
| 8388 | POP BC | |||
| 8389 | POP DE | |||
| 838A | LD A,(ORDER_SAVED_D) | |||
| 838D | LD D,A | |||
| 838E | JP NEW_NOUN_PHRASE | |||
| Prev: 82FD | Up: Map | Next: 8391 |