Prev: 25378 Up: Map Next: 25592
25518: Noun check
Used by the routine at START_TURN.
NOUN_CHECK 25518 LD (IX+34),255 Set noun to 'no noun'
NOUN_CHECK_0 25522 LD A,(HL) Get next character
25523 INC HL
25524 CP 13 Is it newline?
25526 JR Z,NOUN_CHECK_4 If so, process verb only
25528 CP 32 Is it space?
25530 JR NZ,NOUN_CHECK_0 If not, process next character
NOUN_CHECK_1 25532 CALL LOOKUP_WORD Lookup word in vocabulary (A contains id of word)
25535 CP 0 Was word found?
25537 JR NZ,NOUN_CHECK_2
25539 DEC A If no word found, set id to 255
NOUN_CHECK_2 25540 LD (23330),A Set current noun
25543 CP 255 Was word found?
25545 JR NZ,NOUN_CHECK_4 If not, process words
NOUN_CHECK_3 25547 LD A,(HL)
25548 INC HL
25549 CP 32 Is it space?
25551 JR Z,NOUN_CHECK_1 If so, lookup word in vocab
25553 CP 13 Is it newline?
25555 JR NZ,NOUN_CHECK_3 If not, process next character
NOUN_CHECK_4 25557 LD HL,(27555) HL = Address of connections table
25560 LD BC,(23331) BC = current location
25564 ADD HL,BC
25565 ADD HL,BC Find connections entry for current location
25566 LD E,(HL) E=LSB of connections entry
25567 INC HL
25568 LD D,(HL) D=MSB of connections entry
25569 EX DE,HL HL=address of connections entry
This entry point is used by the routine at NOUN_CHECK_6.
NOUN_CHECK_5 25570 LD A,(HL) Read direction
25571 CP 255 End of connections table
25573 JR Z,PROCESS_RESPONSE_TABLE If so, skip to response processing
25575 CP (IX+33) Does it match the curtent verb?
25578 JR NZ,NOUN_CHECK_6
25580 INC HL Point to destination location
25581 LD A,(HL) A=destination location
25582 LD (23331),A Set current location to A
25585 JP DESC_LOCATION Describe location
NOUN_CHECK_6 25588 INC HL
25589 INC HL Increment HL to point at next connection entry
25590 JR NOUN_CHECK_5 Process next connection entry
Prev: 25378 Up: Map Next: 25592