|Borland Turbo C 2.0 for Atari 68000 machines: ODD behavior email@example.com (1991-04-06)|
|Re: Borland Turbo C 2.0 for Atari 68000 machines: ODD behavior firstname.lastname@example.org (1991-04-08)|
|Re: Borland Turbo C 2.0 for Atari 68000 machines: ODD behavior albaugh@dms.UUCP (1991-04-09)|
|Re: Borland Turbo C 2.0 for Atari 68000 machines: ODD behavior email@example.com (1991-04-12)|
|From:||firstname.lastname@example.org (Checkpoint Technologies)|
|Summary:||Skip this if you're not into 68Ks|
|Date:||Mon, 8 Apr 1991 13:33:07 GMT|
In article <1991Apr6.email@example.com> firstname.lastname@example.org (Gregory Carter) writes:
> (unsigned int)(*((unsigned int *)0x00ff8e20L)) = 0x03;
> MOVE.W #$0003, $00ff8e20
> (unsigned int)(*((unsigned int *)0xffff8e20L)) = 0x03;
> MOVE.W #$0003, $8e20
>This is obviously not correct.
This may not be obvious, but it *is* correct. The compiler is doing you a
The 68K has "absolute short" and "absolute long" addressing. Absolute
long means that a whole 32 bit absoluet address follows.
Absolute short means that only a 16 bit word follows, and it should be
*sign extended* to 32 bits before being used.
The value $8E20, when sign extended into a full 32 bit address becomes
$FFFF8E20. This is just what you asked for, and the compiler found a
briefer way to code it.
[email@example.com (Till Brychcy) also pointed this out.
Return to the
Search the comp.compilers archives again.