Prev: 6F3E Up: Map Next: 6FCA
6FB1: Compare the typed word with a dictionary word
Compares the letters in 7071 (the typed word) with those in 7082 (the dictionary word), over the length of whichever is shorter. Returns with the Z flag set if they agree. The lengths themselves are dealt with by the caller (6E8E).
Output
F Z set if the letters match
6FB1 LD A,($7081) B = the shorter of the two lengths
6FB4 LD B,A B = A
6FB5 LD A,($7092) A = the dictionary word length
6FB8 CP B Compare with B
6FB9 JR NC,$6FBC If carry clear, go to 6FBC
6FBB LD B,A B = A
6FBC LD HL,$7071 Compare letter by letter
6FBF LD DE,$7082 DE = 7082
6FC2 LD A,(DE) A = (DE)
6FC3 CP (HL) Compare with the byte at (HL)
6FC4 RET NZ Return if no
6FC5 INC DE Increment DE
6FC6 INC HL Increment HL
6FC7 DJNZ $6FC2 Loop back until B reaches 0
6FC9 RET Done
Prev: 6F3E Up: Map Next: 6FCA