Prev: 98D2 Up: Map Next: 9BC1
9BA2: Calculate Screen Address
ScreenAddress 9BA2 LD A,L A=L.
9BA3 RRCA A=A / 08.
9BA4 RRCA
9BA5 RRCA
9BA6 AND %00011111 Keep only bits 0-4.
9BA8 LD L,A L=A.
9BA9 LD A,H A=H.
9BAA RLCA A=A * 04.
9BAB RLCA
9BAC AND %11100000 Keep only bits 5-7.
9BAE OR L
9BAF LD L,A L=A.
9BB0 LD A,H A=H.
9BB1 AND %00000111 Keep only bits 0-2.
9BB3 EX AF,AF' Switch to the shadow AF register.
9BB4 LD A,H A=H.
9BB5 RRCA A=A / 08.
9BB6 RRCA
9BB7 RRCA
9BB8 AND %00011000 Keep only bits 3-4.
9BBA OR %01000000 Set bit 6.
9BBC LD H,A H=A.
9BBD EX AF,AF' Switch to the shadow AF register.
9BBE OR H
9BBF LD H,A H=A.
9BC0 RET Return.
View the equivalent code in;
Prev: 98D2 Up: Map Next: 9BC1