Prev: 26358 Up: Map Next: 26372
26359: Convert Screen Address To Attribute Buffer Address
Input
DE Screen buffer address
Output
DE Attribute buffer address
ConvertScreenToAttributeBufferAddress 26359 LD A,D Extract bits 3-4 from D (the character row within the display file third).
26360 AND %00011000
26362 SRA A Shift the result right three positions (divide by 8) to get the attribute row offset.
26364 SRA A
26366 SRA A
26368 ADD A,88 Add 88 to convert to the attribute buffer address range (22528-23295).
26370 LD D,A
26371 RET Return.
Prev: 26358 Up: Map Next: 26372