Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!kddlab!icot32!nttlab!mikami
From: mikami@nuesun.ntt.JP
Newsgroups: comp.sys.mac.programmer
Subject: NuBus interrupt routine
Message-ID: 
Date: 21 Sep 88 06:26:22 GMT
Sender: news@nttlab.ntt.JP
Distribution: comp
Organization: NTT Software Laboratories, Tokyo, Japan.
Lines: 22

I made a CPU card which is plugged in the NuBus slot of Macintosh II
and the card works well today. Now I have to make the slot interrupt
service routine, but I'm not familiar with programming on Mac yet.

I think I can use "SIntInstall" to install the interrupt service
routine from the disk.  I wrote a tiny program in MPW Pascal and
executed it.  The result code of "SIntInstall" is -2.  It means
"invalid queue element".  Do any routines need to be executed before
"SIntInstall"?  I cannot understand the relation between "SIntInstall"
and "OpenSlot".

The first argument of "SIntInstall" is "sIntQElmPtr" which is a
pointer to "SlotIntQElement", and SQType field of "SlotIntQElement"
should be set to "SIQType" (Inside Mac V-427).  "SIQType" is undefined
in MPW Pascal.  Why?  I declared it as following.  Is it correct?
    const SIQType = 6;

Any suggestions, examples and help would be appreciated.
Thank you in advance.

                         Hirohide MIKAMI
                         mikami%ntt-20.ntt.jp@RELAY.CS.NET