🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #13769

Re: Large (> 32K) arrays

#13769
From: David W. Berry
Date: Thu, 11 Dec 1986 14:56
24 lines
1650 bytes
Actually, you can create arrays bigger than 32K, they just can't be in
your global data.  Due to the lack of memory mapping hardware on the
mac, and the desire to make programs and data 100% relocatable, global
data is accessed with a negative index off of a5.  Since the 68000
can't handle anything other than 16 bit offsets real easily you can';t
yet have a global data space larger than 32K.  If someone where to
write some really slick code you could still do it, it would
be kinda troublesome and some of the data wouldn't be as readily
accesible:
	move.l	#offset,d0
	move.l	0(a5,d0.l),d0
instead of:
	move.l	#offset(a5),d0
Then again, apple probably limited the size of the global data area
to a word thinking that nobody needs more global data than that
and nobody would go to that much trouble in a compiler...

If you need a large array, allocate it using NewPtr or NewHandle
and go from there.

-- 
	David W. Berry
	dwb@well.uucp                   dwb@Delphi
	dwb@GEnie                       293-0752@408.MaBell
Technical Details
Message-ID: <2196@well.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!lll-lcc!well!dwb
References: <164500006@uiucdcsb> <1783@batcomputer.tn.cornell.edu>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!lll-lcc!well!dwb
From: dwb@well.UUCP (David W. Berry)
Newsgroups: comp.sys.mac
Subject: Re: Large (> 32K) arrays
Message-ID: <2196@well.UUCP>
Date: Thu, 11-Dec-86 09:56:30 EST
Article-I.D.: well.2196
Posted: Thu Dec 11 09:56:30 1986
Date-Received: Sat, 13-Dec-86 22:06:55 EST
References: <164500006@uiucdcsb> <1783@batcomputer.tn.cornell.edu>
Reply-To: dwb@well.UUCP (David W. Berry)
Organization: Whole Earth Lectronic Link, Sausalito CA
Lines: 24
Summary: Just can't be in the global data segment