TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: SCOTT HOWELL 70270,641 (X)
from: James Jones 76257,562
date: 1992-01-30 21:22:38
subject: #14127-arrays in `C`

#: 14135 S12/OS9/68000 (OSK)
    30-Jan-92  21:22:38
Sb: #14127-arrays in 'C'
Fm: James Jones 76257,562
To: SCOTT HOWELL 70270,641 (X)

It's true for the 680x0, x < 2 or == 7.  The reason is that OS-9 wants to use
position-independent and re-entrant code, and also that the compiler can't look
into the future and tell how much data space will be linked together to make a
finished program.  It therefore generates code presuming that the 68K base plus
signed 16-bit offset will suffice to access a variable by name, unless you use
the "remote" storage class, which will cause it to use a rather longer (but
sufficient to access anything anywhere) code sequence to get to the variable.

(The 680x0, x >= 2 and x != 7, have addressing modes that avoid the limitation,
so it's not as big a deal for those processors, though there is a definite code
savings for the 16-bit offset vs. 32-bit offset addressing modes, of course!)

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.