![]() |
Routines |
| Prev: A2B1 | Up: Map | Next: A2E4 |
|
Used by the routines at ProcessObjectDisplay, ProcessObject_Display, SwapObjectDisplayPointers and ProcessDisplayAction.
Packs two attribute nibbles from the object record into A01E and ObjectAttributeValue.
|
||||||||
|
Extract the first attribute value from bit-packed object data.
|
||||||||
| ExtractObjectAttributes | A2BD | LD A,(IX+$05) | Read the object attribute. | |||||
| A2C0 | RRCA | |||||||
| A2C1 | RRCA | |||||||
| A2C2 | RRCA | |||||||
| A2C3 | RRCA | |||||||
| A2C4 | AND %00001111 | Keep the high nibble of the object attribute (now in bits 0-3) as the low half of the display flag. | ||||||
| A2C6 | LD C,A | Read the character record. | ||||||
| A2C7 | LD A,(IX+$07) | |||||||
| A2CA | AND %11110000 | Take the high nibble of byte 07 of the object data as the high half of the display flag. | ||||||
| A2CC | ADD A,C | Join the two halves into one byte. | ||||||
| A2CD | LD ($A01E),A | Record the result in the display flag at A01E. | ||||||
|
Extract the second attribute value from bit-packed object data.
|
||||||||
| A2D0 | LD A,(IX+$01) | Read the moved marker. | ||||||
| A2D3 | RRCA | |||||||
| A2D4 | RRCA | |||||||
| A2D5 | RRCA | |||||||
| A2D6 | RRCA | |||||||
| A2D7 | AND %00001111 | Keep the high nibble of the moved marker (now in bits 0-3) as the low half of the object attribute value. | ||||||
| A2D9 | LD C,A | Read the action flags. | ||||||
| A2DA | LD A,(IX+$03) | |||||||
| A2DD | AND %11110000 | Take the high nibble of the action flags (byte 03) as the high half of the object attribute value. | ||||||
| A2DF | ADD A,C | Join the two halves into one byte. | ||||||
| A2E0 | LD ($A01D),A | Record the result in the object attribute value at ObjectAttributeValue. | ||||||
| A2E3 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: A2B1 | Up: Map | Next: A2E4 |