[Coco] Assembly timing question

Robert Gault robert.gault at att.net
Mon Mar 21 23:40:37 EDT 2016


Lee Patterson wrote:
> Looking at 6809 Assembly Language Programming by Leventhal, and trying to figure out cycle counts. Addressing modes
>
> 1) What addressing mode is LDA ,X+ using? I think it's extended direct addressing, which is 5 cycles.

LDA ,X+ is an Indexed non-indirect mode. That is 4 cycles plus whatever the 
index adds which in this case is 2 cycles for a total of 6 cycles.

> 2) leay 1,y is listed as 4+ cycles. How do I know how many the "+" is?

LEAY 1,Y is also an Indexed mode but here the number of cycles added depends on 
the number of bits in the offset.
  ,R = 0cycles
5-bit  n,R = 1cycle
8-bit  n,R = 1cycle
16-bit n,R = 4cycles

Not all assemblers select the minimum number of bits when creating the 
instruction so you won't always know the timing. By rights LEAY 1,Y should be
5 cycles.

>
> Thanks,
> Lee
>
> --- -- -  -
> The 8-bit Coder
> www.8BitCoder.com
>
>
>

Robert



More information about the Coco mailing list