Prev: 604D Up: Map Next: 60E8
60D6: Convert To Screen Buffer Address
Used by the routines at 6114 and 739D.
On entry HL is a number between 0000-0F20 corresponding to the playarea.
ScreenBufferAddress 60D6 PUSH AF Stash AF on the stack.
60D7 LD A,H A=H.
60D8 RRA
60D9 RRA
60DA RRA
60DB RRA
60DC AND %11100000 Keep only bits 5-7.
60DE OR L Set the bits from L.
60DF LD C,A C=A.
60E0 LD A,H A=H.
60E1 AND %00011000 Keep only bits 3 and 4.
60E3 OR %01000000 Set bit 6 of B which converts BC to a screen address.
60E5 LD B,A
60E6 POP AF Retrieve AF from the stack.
60E7 RET Return.
Prev: 604D Up: Map Next: 60E8