[comp.os.xinu] Macintosh II XINU

sbm@PURDUE.EDU (10/30/87)

     XINU runs on the Macintosh II now, and I have heard that it works
on a Macintosh SE.  The only change to get it running on the Mac II was
to accomodate the RTE instruction, which expects information in a
different format on the stack on the 68000 and 68020.  The 68020 puts a
"format word" below the PC and SR on the stack, which indicates what
further status information might be on the stack.  The further status
information might be necessary if a page fault interrupted an
instruction or to preserve the status of the coprocessor, etc. (I didn't
look into it very deeply).

     The routines that used RTE were clkint, ctxsw, and panic.  Panic
simply had to be modified to handle the different exception format.
Clkint and ctxsw were changed by replacing the RTE instruction with a
move to SR followed by RTS.  Since RTS does not affect the condition
codes, everything works, and the same binary runs on all Macs from 512K
to II.

     Additional modifications were needed because the interrupt vectors
that used to be used for the interrupt switch were taken for other
devices on the Mac II, and my code that polled the keyboard with
interrupts disabled didn't work any more.  Does anyone know what the
interrupt switch does on the Mac II?  It causes a trap to the debugger
even when interrupts are disabled.

     After a few weeks of cleaning up and testing, the new XINU will be
available for distribution to anyone that wants to run it on a Mac II.

					Steve Munson
----------