How to "rotate" a character..
Posted: Sat Mar 29, 2014 6:56 pm
For a simple animation, I plan to rotate a character over itself to the left.
$109D A0 07 LDY #$07 ..
$109F 18 CLC .
$10A0 B1 00 LDA ($00),Y ..
$10A2 0A ASL A .
$10A3 69 00 ADC #$00 i.
$10A5 91 00 STA ($00),Y ..
$10A7 C8 INY .
$10A8 D0 F5 BNE $109F ..
$10AA 60 RTS `
I plan to set DEEK(0) memory to set address of which character to rotate first. This should work if our character sets are 8x8 matrix but as oric character set is 6x8 pixels it does not work properly.
I think I have to check bit 7 after each ASL command but carry is set when bit 8 is on..
My brain stopped here. How can we achieve this simple action? Check bit 7 with operand AND with number "63" and then transfer it to carry? What could be the shortest code to do it?
$109D A0 07 LDY #$07 ..
$109F 18 CLC .
$10A0 B1 00 LDA ($00),Y ..
$10A2 0A ASL A .
$10A3 69 00 ADC #$00 i.
$10A5 91 00 STA ($00),Y ..
$10A7 C8 INY .
$10A8 D0 F5 BNE $109F ..
$10AA 60 RTS `
I plan to set DEEK(0) memory to set address of which character to rotate first. This should work if our character sets are 8x8 matrix but as oric character set is 6x8 pixels it does not work properly.
I think I have to check bit 7 after each ASL command but carry is set when bit 8 is on..
My brain stopped here. How can we achieve this simple action? Check bit 7 with operand AND with number "63" and then transfer it to carry? What could be the shortest code to do it?