[Coco] Assembly Help

Chad H chadbh74 at hotmail.com
Wed Sep 3 18:18:38 EDT 2014


DECD was in my 6809 manual and compiled in Rainbow IDE utilizing CCASM without error.  DECU however failed and wasn't on the 6809 chart...I will look at using the LEAU  and see what happens.  Thanks guys!

On Sep 3, 2014 1:38 PM, William Astle <lost at l-w.ca> wrote:
> 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.


--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco


More information about the Coco mailing list