Prev: CAA3 Up: Map Next: CB12
CAEB: Routine at CAEB
Used by the routines at QuarterFinals, SemiFinals and TheFinal.
CAEB LD HL,$CAA3 HL=CAA3.
CAEE LD DE,$0018 DE=0018.
CAF1 OR A Set the bits from A.
CAF2 JR Z,$CAF8 Jump to CAF8 if the result is zero.
CAF4 LD B,A B=A.
CAF5 ADD HL,DE HL+=DE.
CAF6 DJNZ $CAF5 Decrease counter by one and loop back to CAF5 until counter is zero.
CAF8 LD DE,$B431 DE=B431.
CAFB LD B,$04 B=04.
CAFD PUSH BC Stash BC on the stack.
CAFE EX DE,HL Exchange the DE and HL registers.
CAFF LD (HL),E Write E to *HL.
CB00 INC HL Increment HL by one.
CB01 LD (HL),D Write D to *HL.
CB02 INC HL Increment HL by one.
CB03 EX DE,HL Exchange the DE and HL registers.
CB04 LD BC,$0006 HL+=0006.
CB07 ADD HL,BC
CB08 POP BC Restore BC from the stack.
CB09 DJNZ $CAFD Decrease counter by one and loop back to CAFD until counter is zero.
CB0B EX DE,HL Exchange the DE and HL registers.
CB0C DEC DE Decrease DE by two.
CB0D DEC DE
CB0E LD (HL),E Write E to *HL.
CB0F INC HL Increment HL by one.
CB10 LD (HL),D Write D to *HL.
CB11 RET Return.
Prev: CAA3 Up: Map Next: CB12