🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #15945

Re: C compiler for Mac: responses

#15945
From: Dave Brown
Date: Mon, 01 Jun 1987 17:04
18 lines
1674 bytes
It is also possible to use more than 32k words of data under MPW:
If you allocate 2 or more segments, confirm that they are contiguous
and provide an assembler or in-line access function, you can manipulate
64k objects, where an object in this case is a struct of plausable size.
  You would be well-advised to dispose of them carefully, though, and
make sure they aren't declared relocatable!
  For an object called "memword", the MPW Pascal incantation was:
    x:= memword(pointer(org4(base)+4*org4(index)));
  This assigns x the address of the first byte of something called a
"memword" at &base[index], which happens to be 4 bytes long.  (its easier
in c: the compiler doesn't frog on pointers to large things, just attempts
to create large things).
  Incidentally, the code generated is only one instruction worse than
optimal: the multiply comes out as a shift, but an extra index-to-address
register transfer gets done, as the ord4() calculations are done in index
(general, actually) registers.
  --dave (this limitation does NOT exist on Mac II) brown
Technical Details
Message-ID: <720@geac.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!yetti!geac!daveb
References: <2068@emory.UUCP. <3243@sdcsvax.UCSD.EDU> <6366@dartvax.UUCP> <3252@sdcsvax.UCSD.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!yetti!geac!daveb
From: daveb@geac.UUCP (Dave Brown)
Newsgroups: comp.sys.mac,comp.lang.c
Subject: Re: C compiler for Mac: responses
Message-ID: <720@geac.UUCP>
Date: Mon, 1-Jun-87 13:04:14 EDT
Article-I.D.: geac.720
Posted: Mon Jun  1 13:04:14 1987
Date-Received: Wed, 3-Jun-87 05:01:07 EDT
References: <2068@emory.UUCP. <3243@sdcsvax.UCSD.EDU> <6366@dartvax.UUCP> <3252@sdcsvax.UCSD.EDU>
Reply-To: daveb@geac.UUCP (Dave Brown)
Organization: /etc/newsname
Lines: 18
Summary: Greater then 64k-byte data.