[Coco] Assembly Help

William Astle lost at l-w.ca
Wed Sep 3 14:38:42 EDT 2014


> Is DECD a common shortcut for SUBD #$0001?

If DECD isn't defined as a macro anywhere, then the source code is 
probably aimed at the 6309 since DECD isn't a valid 6809 opcode.

>> Register D is a combination of registers A and B. So if you load A,
>> you will overwrite the D value. Use for instance U for your counter.
>
> As we all know with LEAU -1,U (or DECU !? according to the writing from above ;) )

X or Y would be better a counters because LEAX and LEAY set the Z flag 
but LEAU and LEAS do not. Using U as a counter, you'd need a "CMPU #0" 
after the LEAU -1,U instruction. Using X and U as the pointers and Y as 
the counter would work. Or Y and U as the pointers and X as the counter.



More information about the Coco mailing list