Prev: 41549 Up: Map Next: 41591
41565: Check Text Token Match
Used by the routine at ProcessTextToken.
Sets the zero flag when pictures are off, the token pointer is zero, or SearchThreeByteTable returns 255.
Input
A Token ID to check
Output
F Zero flag set if token matches or end reached
CheckTextTokenMatch 41565 PUSH BC Jump to CheckTextTokenMatch_0 if the pictures-enabled flag is zero.
41566 LD B,A
41567 LD A,(40977)
41570 AND A
41571 JR Z,CheckTextTokenMatch_0
41573 LD HL,(41176) Jump ahead to CheckTextTokenMatch_0 if the pointer is zero.
41576 LD A,H
41577 OR L
41578 JR Z,CheckTextTokenMatch_0
41580 PUSH HL Copy the pointer into the record and call SearchThreeByteTable with the count in B to search the three-byte table.
41581 POP IX
41583 LD A,B
41584 CALL SearchThreeByteTable
41587 CP 255 See whether the entry is the end marker.
CheckTextTokenMatch_0 41589 POP BC Restore BC from the stack.
41590 RET Return.
Prev: 41549 Up: Map Next: 41591