Prev: 57706 Up: Map Next: 57817
57761: Routine at E1A1
Used by the routine at 57817.
57761 CALL CalculateScreenAddress Call CalculateScreenAddress.
57764 PUSH DE Stash DE on the stack.
57765 LD A,D A=D.
57766 RRCA RRCA.
57767 RRCA
57768 RRCA
57769 AND %00000011 Keep only bits 0-1.
57771 OR %01011000 Set bits 3-4, 6.
57773 LD D,A D=A.
57774 LD BC,(57758) BC=*57758.
57778 LD A,(DE) A=*DE.
57779 XOR C Flip the bits according to C.
57780 AND B Merge the bits from B.
57781 XOR C Flip the bits according to C.
57782 LD (DE),A Write A to *DE.
57783 POP DE Restore DE from the stack.
57784 LD A,H A=H.
57785 AND %00000111 Keep only bits 0-2.
57787 LD B,A B=A.
57788 INC B Increment B by one.
57789 LD A,254 A=254.
57791 RRCA RRCA.
57792 DJNZ 57791 Decrease counter by one and loop back to 57791 until counter is zero.
57794 LD B,A B=A.
57795 LD A,(57760) C=*57760.
57798 LD C,A
57799 LD A,(DE) A=*DE.
57800 BIT 1,C Jump to 57805 if bit 1 of C is set.
57802 JR NZ,57805
57804 AND B Merge the bits from B.
57805 BIT 3,C Jump to 57811 if bit 3 of C is set.
57807 JR NZ,57811
57809 XOR B Flip the bits according to B.
57810 CPL Invert the bits in A.
57811 LD (DE),A Write A to *DE.
57812 RET Return.
57813 DEFW 1
57815 DEFW 1
Prev: 57706 Up: Map Next: 57817