[Coco] 6502 to 6809 translation

Robert Gault robert.gault at att.net
Tue Aug 2 07:25:11 EDT 2011


John Kent wrote:
>
>
> On 2/08/2011 4:09 AM, Robert Gault wrote:
>> There are lots of ways to create 6809 code that does the same thing as some
>> 6502 code. The main questions are what registers do you need to protect and
>> just how closely do you want to emulate the 6502 code?
>>
>> For example, there is a corresponding command to the 6502 iny :: 6809 leay 1,y
>>
>> There is no equivalent to lda [data_addr],y . If data_addr is an address which
>> contains an address, neither lda data_addr,y nor lda [data_addr,y] will work.
>> but you could use:
>>
>> data_addr fdb $8000
>> ldy #$20
>> ldx data_addr
>> loop lda x,y
>> leay 1,y
>> bne loop
>>
>
> I don't there is a lda x,y only accumulator A, B or D offset from the index
> register.
>

Drat! I meant to use regD in that example. RegX is a typo.

Thanks for catching that John.




More information about the Coco mailing list