Routines |
Prev: $39C7 | Up: Map | Next: $3AB3 |
Used by the interrupt routine at $39C7.
|
||||||||||
$3A90 | SEC | Subtract the x-coordinate of the leftmost column of the skool on screen to obtain the object's screen x-coordinate. | ||||||||
$3A91 | SBC $58 | |||||||||
$3A93 | CLC | Add this screen x-coordinate to the base colour information address at $F2. | ||||||||
$3A94 | ADC $F2 | |||||||||
$3A96 | BCC $3A9A | |||||||||
$3A98 | INC $F3 | |||||||||
$3A9A | STA $F2 | |||||||||
$3A9C | LDY #$00 | Set the index in Y to 0. | ||||||||
$3A9E | STY $F5 | Initialise $F5 to 0. | ||||||||
$3AA0 | LDA ($F2),Y | Pick up the current colour information byte for the object. | ||||||||
$3AA2 | LSR A | Copy bits 0-3 of the colour information byte into bits 4-7 at $F5. | ||||||||
$3AA3 | ROR $F5 | |||||||||
$3AA5 | LSR A | |||||||||
$3AA6 | ROR $F5 | |||||||||
$3AA8 | LSR A | |||||||||
$3AA9 | ROR $F5 | |||||||||
$3AAB | LSR A | |||||||||
$3AAC | ROR $F5 | |||||||||
$3AAE | ORA $F5 | Copy bits 4-7 of the colour information byte into bits 0-3 at $F5. The background and foreground colours have now been swapped. | ||||||||
$3AB0 | STA ($F2),Y | Update the colour information for the object. | ||||||||
$3AB2 | RTS |
Prev: $39C7 | Up: Map | Next: $3AB3 |