ggf@jsoft.UUCP (Gary Frederick) (12/21/88)
Look at the following code and see what seems different about it.
MODULE hello;
FROM Terminal IMPORT Write, WriteLn, WriteString;
FROM Minix IMPORT exit;
VAR x: INTEGER;
BEGIN
WriteLn;
WriteString('Hello world');
Write(07C);
WriteLn;
exit(0);
END hello.
It is Modula-2 on Minix!!!!!.
What Jefferson Software has is a version of our linker running on
TOS that produces minix executable code. There is a lot of work to
do, for example the Minix library only has read() write() and exit()
hooked up. HOWEVER, once you can write a 'hello world' program, the
rest is cake.
It was not hard to get the test program up and running. I did
find it a little slower than the Idris version. I think Idris was
a little easier because the docs for Idris covered much of what you
have to do to interface the system. The information for Minix is
there, but spread out through the source and the book.
The sections of the book I read were:
system calls p22
interprocess communication p89
message types p95
messages for memory management p230
messages for file system p300
executable file format p411
The source I read:
/h/callnr.h
/h/type.h
/lib/stcrtso.s
/lib/stsndrec.s
/lib/call.c
/lib/read.c
/lib/exit.c
and the source to relmix. I would have liked to have seen more on
the way minix relocation information is built. I just used the TOS
relocation info with changes that the startup needed.
Minix is nifty. I enjoy working with it and look forward to doing
more. Jefferson Software wants to see about putting shared libraries
into JSM2 and doing a version of JSM2 that follows Motorola's binary
standard. (* Posix compliant *) I want to do them on Minix first.
Well, tis the season to be jolly. I sure am!!!
Gary Frederick
ggf on jsbbs +1 602 276-6102 1200 baud pc pursuitable
ggf on BIX join js.online
ggf@js.UUCP
uunet!noao!asuvax!nud!ggf