![]() |
Routines |
| Prev: A2B1 | Up: Map | Next: A2E4 |
|
Used by the routines at ProcessObjectDisplay, ProcessObject_Display, ProcessDisplayPointer and ProcessDisplayAction.
|
||||||||
|
Extract the first attribute value from bit-packed object data.
|
||||||||
| ExtractObjectAttributes | A2BD | LD A,(IX+$05) | A=*IX+05 (load byte from offset +5). | |||||
| A2C0 | RRCA | Shift right by 4 bits (extract low nibble from offset +5). | ||||||
| A2C1 | RRCA | |||||||
| A2C2 | RRCA | |||||||
| A2C3 | RRCA | |||||||
| A2C4 | AND %00001111 | Keep only bits 0-3. | ||||||
| A2C6 | LD C,A | C=A (store the low nibble). | ||||||
| A2C7 | LD A,(IX+$07) | A=*IX+07 (load byte from offset +7). | ||||||
| A2CA | AND %11110000 | Keep only bits 4-7 (extract high nibble from offset +7). | ||||||
| A2CC | ADD A,C | A+=C (combine high and low nibbles). | ||||||
| A2CD | LD ($A01E),A | Write A to *A01E (store the first attribute value). | ||||||
|
Extract the second attribute value from bit-packed object data.
|
||||||||
| A2D0 | LD A,(IX+$01) | A=*IX+01 (load byte from offset +1). | ||||||
| A2D3 | RRCA | Shift right by 4 bits (extract low nibble from offset +1). | ||||||
| A2D4 | RRCA | |||||||
| A2D5 | RRCA | |||||||
| A2D6 | RRCA | |||||||
| A2D7 | AND %00001111 | Keep only bits 0-3. | ||||||
| A2D9 | LD C,A | C=A (store the low nibble). | ||||||
| A2DA | LD A,(IX+$03) | A=*IX+03 (load byte from offset +3). | ||||||
| A2DD | AND %11110000 | Keep only bits 4-7 (extract high nibble from offset +3). | ||||||
| A2DF | ADD A,C | A+=C (combine high and low nibbles). | ||||||
| A2E0 | LD ($A01D),A | Write A to *ObjectAttributeValue (store the second attribute value). | ||||||
| A2E3 | RET | Return. | ||||||
| Prev: A2B1 | Up: Map | Next: A2E4 |