#ADDRESS etc, question
27-Jul-89 13:35:52
Sb: #10646-#ADDRESS etc, question
Fm: Avant-Garde Software 76004,2002
To: Richard Bielak 75716,352
Richie:
The sample of code in your message is perfectly legal. Type coersion has
virtually no limitations placed on it in Modula-2. In most cases all that
happens is that either high-bits are truncated or zero-extended depending on if
you are going smaller to larger or vice-versa. One possible reason for the
problem in porting from the VAX is that BM-2 defines ADDRESS as POINTER TO
BYTE, where as your VAX compiler probably defines it as POINTER TO WORD (with
WORD being 32-bits, probably). So on the VAX this picks up a 32-bit pointer
value on the Amiga it only gets the first 8-bits of the pointer, which is
probably why the system crashed later as you mentioned.
>> Leon Frenkel <<