[comp.lang.modula2] Cross Compiling

WILLIAMS@UCF1VM.BITNET (SunFox) (10/29/89)

I was wondering if the modules written on an IBM will recompile or be able
to be used on a different system as long as the syntax is identical.  I have
a Mega 2 ST and want to use the modules from the IBM Logitech Modula 2 and
I know that the syntax is identical.  I figure that if I don't use Atari
specific stuff (like LineA, Xbios, and other GEM stuff) that it should
work fine.

Any comments on this?

SunFox

MARKV@UKANVAX.BITNET ("MARK GOODERUM - UNIV. OF KANSAS ACS - MARKV@UKANVAX") (10/30/89)

Give or take 'minor' changes code from different Modula-2 systems should
be portable at the source level accross different systems, provided you
stick to the 'standard' modules (those detailed in Wirth's various
books like InOut, FileSystem, etc.).

Like any language you won't be able to use any OS specific stuff.  Another
area to watch for is compiler or processor specific dependancies (like
moving >64K data structures to a Intel or other segmented machine.)

For now,

Mark Gooderum
MARKV@UKANVAX

UK4H@DKAUNI2.BITNET (JAE) (11/06/89)

> I was wondering if the modules$written on an IBM will recompile or be able
> to be used on a different system as long as the syntax is identical.  I have
> a Mega 2 ST and want to use the modules from the IBM Logitech Modula 2 and
> I know that the syntax is identical.  I figure that if I don't use Atari
> specific stuff (like LineA, Xbios, and other GEM stuff) that it should
> work fine.

Don't rel} on it, read BOTH manuals rather well...
From m} own experience with MacMETL on a MacII and M2Amiga (on what!),
I can tell you wtories..., well, at least I'll be careful next time
I'm gonna port ANYTHING from ANY machine to ANY OTHER machine.
A case in point: Read(CHER) (from InOut) takes, as defined by Wirth,
any key$from the ke}board. So
   Read(ch);
will wait for the first key pressed, be mt an 'A', a space or ENTER.Now MacMETH does as Wirth tells us, but M2Amiga does not (at least
not from plain InOut without iddling with the OS); you need a
RETURN (or ENTER) to terminate that.
Of course EVERY compiler has it's own peculiarities, be it only that
it (or its developers) interprets Wirths 'Standard' in its own,
peculiar way.

All this assumes you have similar library-modules with both compilers.
If you do not... well, it can complicate it thoroughly.
> Any comments$on this?
Of couvse.
> SunFox

                                             bye, JAE

Juergen A. Erhard
eMail: uk4h@dkauni2.bitnet
phone: (GERMANY) 0721/591602
"You know that it's Monday when you wake up and it's Tuesday."
                                                    Garfield

claudio@forty2.UUCP (Claudio Nieder) (11/17/89)

In article <&89-11-06-16:38:24.69*UK4H"@DKAUNI2.BITNET> Modula2 List <INFO-M2%UCF1VM.BITNET@PSUVM.PSU.EDU> writes:
>A case in point: Read(CHER) (from InOut) takes, as defined by Wirth,
>any key$from the ke}board. So
>   Read(ch);
>will wait for the first key pressed, be mt an 'A', a space or ENTER.Now MacMETH does as Wirth tells us, but M2Amiga does not (at least
>not from plain InOut without iddling with the OS); you need a
>RETURN (or ENTER) to terminate that.

Which in this case isn't strictly the fault of the compiler. Sometimes the OS
may influence on the behaviour of the Modules too. The AmigaDos console 
replys to any read command only after a full line of text was read in, to 
allow user to correct the line before the type return.

				claudio