Prev: 66F6 Up: Map Next: 6704
66F7: Convert Screen Address To Attribute Buffer Address
Input
DE Screen buffer address
Output
DE Attribute buffer address
ConvertScreenToAttributeBufferAddress 66F7 LD A,D Extract bits 3-4 from D (the character row within the display file third).
66F8 AND %00011000
66FA SRA A Shift the result right three positions (divide by 08) to get the attribute row offset.
66FC SRA A
66FE SRA A
6700 ADD A,$58 Add 58 to convert to the attribute buffer address range (5800-5AFF).
6702 LD D,A
6703 RET Return.
Prev: 66F6 Up: Map Next: 6704