Prev: 29171 Up: Map Next: 29257
29230: Inglish: Compare One Clause Pair
Used by the routine at Inglish_MatchClausePairs.
Compares one pair of clause bytes with the pair the caller addressed. An empty pair matches. Otherwise the low nibbles of the second bytes must agree and the first bytes must be equal. Both pointers then move on by two.
Inglish_CompareOneClausePair 29230 PUSH HL Jump to Inglish_CompareOneClausePair_Advance if this pair is empty.
29231 LD A,(HL)
29232 INC HL
29233 OR (HL)
29234 JR Z,Inglish_CompareOneClausePair_Advance
29236 LD A,(IY+1) Read the second byte of the pair being tested.
29239 XOR (HL) Jump to Inglish_CompareOneClausePair_Advance if its low nibble differs from the clause byte.
29240 AND 15
29242 JR NZ,Inglish_CompareOneClausePair_Advance
29244 DEC HL Step back to the first byte of the pair.
29245 LD A,(HL) Read that first byte.
29246 CP (IY+0) Compare it with the first byte of the pair being tested.
Inglish_CompareOneClausePair_Advance 29249 POP HL Move on to the next pair in the text.
29250 INC HL
29251 INC HL
29252 INC IY Move on to the next pair being tested.
29254 INC IY
29256 RET Return.
View the equivalent code in;
Prev: 29171 Up: Map Next: 29257