[Coco] lwtools assembler difference
Dave Philipsen
dave at davebiz.com
Wed Sep 2 03:14:01 EDT 2015
Just out of curiosity, does EDTASM do anything differently with this?
org $0000
Symbol rmb 1
ldb Symbol,x
To me, the most logical way to handle that would be to assume that you
want the machine code optimized for zero offset indexed addressing
instead of the 5-bit. I can see how a program in a very rare case might
want to force the 5-bit offset for timing issues but most likely the
desired outcome of the example above would be for the assembler to
automatically translate it to ldb ,x. The idea of forcing it to the
5-bit offset when the programmer uses ldb 0,x is probably a good one as
most programmers would not code it that way unless there was a good reason.
Dave Philipsen
> EDTASM will give you the following results:
>
> ldb ,x
> get
> $E6 $84
>
> ldb 0,x
> get
> $E6 $00
>
> Robert
>
>
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the Coco
mailing list