Routines
Prev:
ADC9
Up:
Map
Next:
ADF3
ADE5: Roll the clock's digits a row
Used by the routine at
RUN_CLOCK
.
Used by
RUN_CLOCK
. From the last digit up, takes one off each count until it meets a digit that is not rolling: the digits changed by one borrow always roll together.
ROLL_CLOCK
ADE5
LD HL,
CLOCK_LAST
the last digit first
ADE8
LD B,$04
ROLL_CLOCK_0
ADEA
LD A,(HL)
ADEB
AND $07
ADED
RET Z
ADEE
DEC (HL)
ADEF
DEC HL
ADF0
DJNZ
ROLL_CLOCK_0
ADF2
RET
Prev:
ADC9
Up:
Map
Next:
ADF3