Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site tikal.UUCP
Path: utzoo!decvax!tektronix!uw-beaver!tikal!bobc
From: bobc@tikal.UUCP (Bob Campbell)
Newsgroups: net.lang.mod2
Subject: Re: what is a WORD?
Message-ID: <222@tikal.UUCP>
Date: Fri, 23-Aug-85 12:29:14 EDT
Article-I.D.: tikal.222
Posted: Fri Aug 23 12:29:14 1985
Date-Received: Sun, 25-Aug-85 03:47:45 EDT
References: <1075@noscvax.UUCP>
Reply-To: bobc@tikal.UUCP (Bob Campbell)
Distribution: na
Organization: Teltone Corp., Kirkland, WA
Lines: 34
Xref: tektronix net.lang.mod2:00246 

*** BUG FOOD ***

The general discription on pages 126, and 127 leaves much to be desired
it appears however to be written with machines who's smallest
addressable unit of memory is a "WORD" in mind.  Many of the documents
I have seen from ETHZ make comments about using CYBER computers, which
I believe have a "WORD" (other than 16 or 32 bits) addressed as the
smallest unit of memory.  When running on a CYBER computer I believe
the example on page 127 is valid.

The note "On the PDP-11, TSIZE(WORD) = 2,..." implies that sizes are measured
in the size of the Smallest Addressable unit.  It would appear that a VAX
should have 4-byte WORDS, however would this make LONGINT an 8-byte value?

The ETHZ implementation of Modula-2 for the 68000 has
	CHAR	= 1 Byte
	WORD	= 2 Bytes
	INTEGER	= 2 Bytes
	ADDRESS = 4 Bytes

The is a note with the compiler that 'ADDRESS may be used in the sense of
a "long cardinal (32 bit)".'

It would therefore seem that the example on page 127 should be as follows
to be correct for all machines:

    ReadWord(in,length);
    length := length -1;a := ADR(buffer);
    WHILE length > 0 DO
	ReadWord(in,a^); a := a + TSIZE(WORD); length := length - 1
    END

Bob Campbell
uw-beaver!tikal!bobc