Prev: 44262 Up: Map Next: 44338
44283: Handler: Match Item
Used by the routine at Handler_UserInput.
Output
F The carry flag is set to indicate that an item was found
Handler_MatchItem 44283 PUSH HL Stash HL, DE, BC and IX on the stack.
44284 PUSH DE
44285 PUSH BC
44286 PUSH IX
44288 LD HL,(42950) HL=*Pointer_Vocabulary.
44291 LD C,0 C=0.
44293 JR Handler_MatchItem_2 Jump to Handler_MatchItem_2.
Handler_MatchItem_0 44295 LD E,B E=B.
44296 LD D,0 D=0.
44298 ADD HL,DE HL+=DE.
44299 LD A,(HL) A=*HL.
44300 CP 44 Compare A with 44.
44302 JR Z,Handler_MatchItem_1 Jump to Handler_MatchItem_1 if A is equal to 44.
44304 INC C Increment C by one.
44305 JR Handler_MatchItem_2 Jump to Handler_MatchItem_2.
Handler_MatchItem_1 44307 INC HL Increment HL by one.
Handler_MatchItem_2 44308 LD A,(HL) Jump to MatchItem_Return if *HL is equal to 255.
44309 CP 255
44311 JR Z,MatchItem_Return
44313 LD IX,43055 IX=FourLetterBuffer.
44317 LD B,4 B=4.
Handler_MatchItem_3 44319 LD A,(IX+0) Jump to Handler_MatchItem_0 if *IX+0 is not equal to *HL.
44322 CP (HL)
44323 JR NZ,Handler_MatchItem_0
44325 INC HL Increment HL by one.
44326 INC IX Increment IX by one.
44328 DJNZ Handler_MatchItem_3 Decrease counter by one and loop back to Handler_MatchItem_3 until counter is zero.
44330 LD A,C A=C.
44331 SCF Set the carry flag to indicate that an item was successfully found.
MatchItem_Return 44332 POP IX Restore IX, BC, DE and HL from the stack.
44334 POP BC
44335 POP DE
44336 POP HL
44337 RET Return.
Prev: 44262 Up: Map Next: 44338