Prev: EEC1 Up: Map Next: EFC7
EF91: Routine at EF91
Used by the routines at F177 and F578.
EF91 PUSH AF Stash AF on the stack.
EF92 EXX Switch to the shadow registers.
EF93 LD A,($F26F) C=*F26F.
EF96 LD C,A
EF97 LD A,($A839) A=*A839.
EF9A AND %00000111 Keep only bits 0-2.
EF9C JR Z,$EFA2 If the result is zero, jump to EFA2.
EF9E LD B,$03 B=03.
EFA0 JR $EFA4 Jump to EFA4.
EFA2 LD B,$02 B=02.
EFA4 LD A,($A839) A=*A839.
EFA7 AND %11111000 Keep only bits 3-7.
EFA9 LD H,$00 Create an offset in HL.
EFAB LD L,A
EFAC ADD HL,HL HL*=04.
EFAD ADD HL,HL
EFAE LD DE,$FB00 DE=FB00.
EFB1 ADD HL,DE HL+=DE.
EFB2 LD DE,$001E DE=001E.
EFB5 LD (HL),C Write C to *HL.
EFB6 INC HL Increment HL by one.
EFB7 LD (HL),C Write C to *HL.
EFB8 INC HL Increment HL by one.
EFB9 LD A,($A838) A=*A838.
EFBC AND %00000111 Keep only bits 0-2.
EFBE JR Z,$EFC1 If the result is zero, jump to EFC1.
EFC0 LD (HL),C Write C to *HL.
EFC1 ADD HL,DE HL+=DE.
EFC2 DJNZ $EFB5 Decrease counter by one and loop back to EFB5 until counter is zero.
EFC4 EXX Switch back to the normal registers.
EFC5 POP AF Restore AF from the stack.
EFC6 RET Return.
Prev: EEC1 Up: Map Next: EFC7