Prev: 06510 Up: Map Next: 06536
06528: THE 'COMPARE LINE NUMBERS' SUBROUTINE
Used by the routines at OUT_LINE and LINE_ADDR.
The given line number in the BC register pair is matched against the addressed line number.
Input
BC First line number
HL Address of the second line number
Output
F Zero flag set if the line numbers match
F Carry flag set if the first line number is greater than the second
CP_LINES 06528 LD A,(HL) Fetch the high byte of the addressed line number and compare it.
06529 CP B
06530 RET NZ Return if they do not match.
06531 INC HL Next compare the low bytes.
06532 LD A,(HL)
06533 DEC HL
06534 CP C
06535 RET Return with the carry flag set if the addressed line number has yet to reach the given line number.
Prev: 06510 Up: Map Next: 06536