[EMAIL PROTECTED] wrote:
> In a message dated 20/09/02 11:24:47 GMT Daylight Time, [EMAIL PROTECTED] 
> writes:
> 
> 
>> Note. In Fabrizio's original code, using:
>>  move.b 0(a4),d1
>> instead of:
>>  move.b (a4),d1
>> typically causes an assembler to generate exactly what is asked: a four
>> byte instruction with a zero offset for a4 in the second word.
>>
> 
> 
> GWASS treats 0(a4) as (a4), so the shorter version is always used here.
> 
> George

It takes some effort to force an assembler that "helps" like that, when 
you really do want it to generate the zero offset. You have to define an 
external that will supply a zero a link time. IIRC there is a bit of 
code in the debugger that I wrote that needed to do it. It wanted to 
generate a live sequence of code to push on the stack with an offset to 
be filled in.

I'm not too sure about assemblers that "help" too much. E.g. when you 
are writing I2C drivers and need to account for every cycle, it's no fun 
if the assembler quietly replaces your instructions with ones it thinks 
are "better".

A good solution is for an assembler to accept an override control saying 
"don't mess with what I write".

-- 
Lau
http://www.bergbland.info
Get a domain from http://oneandone.co.uk/xml/init?k_id=5165217 and I'll 
get the commission!

Reply via email to