[Coco] lwtools assembler difference
Dave Philipsen
dave at davebiz.com
Tue Sep 1 16:51:52 EDT 2015
I'm not actually using the lwtools assembler. I'm just comparing the
output of the stock OS9 assembler to a dump of the Boot module that I
obtained from the OS9Boot file that was in a disk image that was given
to me. Perhaps whomever compiled that disk image disabled the pragma.
Thanks for the explanation though.
Dave Philipsen
On , Tormod Volden wrote:
> On Tue, Sep 1, 2015 at 9:16 PM, Dave Philipsen wrote:
>> Well, in my comparison of the code generated by the lwtools assembler
>> and
>> the stock OS9 assembler I have found a quirk of the lwtools assembler.
>> I
>> won't call it an error because it appears that the outcome is not
>> affected
>> and it seems to be a minor thing. On every other assembler I've used
>> including AS6809, CSC6809, and the stock OS9 assembler the following
>> assembly source:
>>
>> ldb ,x
>> or
>> ldb 0,x
>>
>> is assembled in machine code as:
>>
>> E6 84
>>
>> which is the indexed addressing mode with no offset
>> However, the lwtools assembler (evidently) assembles in machine code
>> as:
>>
>> E6 00
>>
>> which is the indexed addressing mode with a 5-bit offset with the
>> offset
>> being zero.
>
> Please read about the "index0tonone" pragma in the manual
> http://lwtools.projects.l-w.ca/manual/manual.html#AEN628
>
> Is it possible that you have disabled this pragma?
>
> Regards,
> Tormod
>
>>
>> I dont have a copy of EDTASM anymore so I can't say how it would
>> assemble
>> it. This just seems to be the case of a smart assembler which
>> determines
>> the given offset to be zero and thus translates it as a "no offset"
>> postbyte
>> as opposed to a "5-bit offset" postbyte.
>>
>> Dave Philipsen
More information about the Coco
mailing list