Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site noscvax.UUCP
Path: utzoo!decvax!tektronix!hplabs!sdcrdcf!sdcsvax!noscvax!broman
From: broman@noscvax.UUCP (Vincent P. Broman)
Newsgroups: net.lang.mod2
Subject: what is a WORD?
Message-ID: <1075@noscvax.UUCP>
Date: Tue, 20-Aug-85 12:32:43 EDT
Article-I.D.: noscvax.1075
Posted: Tue Aug 20 12:32:43 1985
Date-Received: Sat, 24-Aug-85 05:46:19 EDT
Distribution: na
Organization: Naval Ocean Systems Center, San Diego
Lines: 24
Xref: tektronix net.lang.mod2:00245 

<>

The explanation of WORD and ADDRESS in Wirth's "Programming in Modula-2"
has produced fog and confusion in me.  I wonder whether someone who
has worked with an Actual Implementation (I haven't) could shine a light.

Wirth implies repeatedly that contiguous WORDs have consecutive ADDRESSes,
for instance in his code on p127 he increments an ADDRESS by 1 to access the
next WORD.  Since many machines are byte-addressed, this seems to imply that
these would also have WORD=byte.  On the other hand, the impression is given
that a WORD is the natural access unit of the machine, and says on p126
"On the PDP-11, TSIZE(WORD)=2, since the addressable unit of store is the byte"
(even though TSIZE really counts WORDs).  Should a VAX get 4-byte WORDs?

Also, if ADDRESSes are usable as CARDINALs for arithmetic, is this hard
to do on the 8088 family, with 16-bit integers and 20-bit addresses?
I suppose the Turbo Modula coming out now will only implement a small memory
model, avoiding the problem, but do Logitech and the others implement it
with long CARDINALs?


UUCP: ucbvax!sdcsvax!noscvax!broman	Vincent Broman
ARPA: broman@nosc			Naval Ocean Systems Center, code 632
Phone: (619) 225-2365			San Diego, CA 92152