[comp.sys.amiga] Request for Interrupt Message Port Help

dillon@CORY.BERKELEY.EDU.UUCP (01/23/88)

:ReciISR()
:{
:abort = TRUE;
:}
:
: ...
:   mp = (struct MsgPort *) CreateInterruptPort("intport", 0, ReciISR);

	If you are using the small code model it will not work.  If you
are using the large code model it still might not work.  There are three
problems:

	(1) The registers contain specific information and in no way reflect
	    the registers of the task/process.  Therefore,
	(2) The register used for the global base (small code model) does
	    not hold the proper value and thus the reference to 'abort'
	    will go to a random memory location.
	(3) Certain registers must be saved and restored.  For interrupt
	    service routines, D0/D1/A0/A1/A5/A6 are all scratch.  Thus,
	    if Lattice does not save D2 and D3 (I don't have Lattice so I
	    don't know), they must be saved manually.  I think Lattice does
	    save D2 and D3, in which case you only need to worry about (2).

					-Matt