| quill | Routines |
| Prev: 25368 | Up: Map | Next: 25518 |
|
Used by the routine at PROCESS_RESPONSE_TABLE.
|
||||
| START_TURN | 25378 | XOR A | A=0 | |
| 25379 | CP (IX+5) | Is flag 5=0? | ||
| 25382 | JR Z,START_TURN_0 | If so, skip decrement | ||
| 25384 | DEC (IX+5) | Decrement flag 5 by 1 | ||
| START_TURN_0 | 25387 | CP (IX+6) | Is flag 6=0? | |
| 25390 | JR Z,START_TURN_1 | If so, skip decrement | ||
| 25392 | DEC (IX+6) | Decrement flag 6 by 1 | ||
| START_TURN_1 | 25395 | CP (IX+7) | Is flag 7=0? | |
| 25398 | JR Z,START_TURN_2 | If so, skip decrement | ||
| 25400 | DEC (IX+7) | Decrement flag 7 by 1 | ||
| START_TURN_2 | 25403 | CP (IX+8) | Is flag 8=0? | |
| 25406 | JR Z,START_TURN_3 | If so, skip decrement | ||
| 25408 | DEC (IX+8) | Decrement flag 8 by 1 | ||
| START_TURN_3 | 25411 | CP (IX+0) | Is it dark? | |
| 25414 | JR Z,START_TURN_5 | If not, skip flags 9 and 10 | ||
| 25416 | CP (IX+9) | Is flag 9=0? | ||
| 25419 | JR Z,START_TURN_4 | If so, skip decrement | ||
| 25421 | DEC (IX+9) | Decrement flag 9 by 1 | ||
| START_TURN_4 | 25424 | CP (IX+10) | Is flag 10=0? | |
| 25427 | JR Z,START_TURN_5 | If so skip check for light | ||
| 25429 | LD A,(23333) | A=location of light source (object 0) | ||
| 25432 | CP (IX+35) | Is it at current location? | ||
| 25435 | JR Z,START_TURN_5 | If so, skip decrement of flag 10 | ||
| 25437 | CP 253 | Is it worn or carried? | ||
| 25439 | JR NC,START_TURN_5 | If so, skip decrement of flag 10 | ||
| 25441 | DEC (IX+10) | Decrement flag 10 by 1 | ||
| START_TURN_5 | 25444 | LD HL,(23327) | HL=number of turns | |
| 25447 | INC HL | Increment turn count | ||
| 25448 | LD (23327),HL | Store turns | ||
| 25451 | CALL RANDOM_NUMBER | Generate random number | ||
| 25454 | LD HL,2 | Prompt 1 | ||
| 25457 | CP 30 | Is number < 30? | ||
| 25459 | JR C,START_TURN_6 | Display prompt 1 | ||
| 25461 | LD HL,3 | Prompt 2 | ||
| 25464 | CP 60 | Is number < 60? | ||
| 25466 | JR C,START_TURN_6 | Display prompt 2 | ||
| 25468 | LD HL,4 | Prompt 3 | ||
| 25471 | CP 90 | Is number < 69? | ||
| 25473 | JR C,START_TURN_6 | Display prompt 3 | ||
| 25475 | LD HL,5 | Prompt 4 | ||
| START_TURN_6 | 25478 | CALL PRINT_SYSMSG_NEWLINE | Display prompt (HL contains system message number) | |
| 25481 | CALL KEYBOARD_HANDLER | Keyboard processing loop | ||
| START_TURN_7 | 25484 | CALL LOOKUP_WORD | Lookup word in vocabulary (A contains id of word) | |
| 25487 | CP 0 | Was a word found? | ||
| 25489 | JR NZ,START_TURN_8 | If word found, skip over next statement | ||
| 25491 | DEC A | If no word found, set A to 255 | ||
| START_TURN_8 | 25492 | LD (23329),A | Set current verb to A | |
| 25495 | CP 255 | Was a word found? | ||
| 25497 | JR NZ,NOUN_CHECK | If so, move to noun check | ||
| START_TURN_9 | 25499 | LD A,(HL) | Read character entered | |
| 25500 | INC HL | Move to next character entered | ||
| 25501 | CP 32 | Was it a space? | ||
| 25503 | JR Z,START_TURN_7 | If so, return to word lookup | ||
| 25505 | CP 13 | Was it a newline? | ||
| 25507 | JR NZ,START_TURN_9 | If not, read next character | ||
| 25509 | LD HL,6 | "I don't understand" | ||
| 25512 | CALL PRINT_SYSMSG_NEWLINE | Print system message | ||
| 25515 | JP PROCESS_STATUS | |||
| Prev: 25368 | Up: Map | Next: 25518 |