mikami@nuesun.ntt.JP (09/21/88)
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
paul@unisoft.UUCP (n) (09/23/88)
In article <MIKAMI.88Sep21152622@nuesun.ntt.JP> mikami@nuesun.ntt.JP writes: >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; > It sounds correct - I use the following piece of code to install my interrupt handlers and it works ... lea ISR, a0 ; get the service routine's move.l a0, ISQAddr(a3) ; address move.w #1, lSQPrio(a3) ; Low prio - lots of buffers move.w #6, lSQType(a3) ; lea lSQ(a3), a0 move.w lSlot(a3), d0 ; (this is where I keep my slot #) _SIntInstall ; Install it OpenSlot is used to by applications that want to open a driver (via the slot manager), SIntInstall is used by the driver to install its interrupt handler eg: ----------------- | | | hardware | | | ----------------- ^ | SIntInstall | ----------------- | | | driver | | | ----------------- ^ | OpenSlot | ----------------- | | | Application | | | ----------------- I hope this helps Paul Campbell -- Paul Campbell, UniSoft Corp. 6121 Hollis, Emeryville, Ca E-mail: ..!{ucbvax,hoptoad}!unisoft!paul Nothing here represents the opinions of UniSoft or its employees (except me) "Nuclear war doesn't prove who's Right, just who's Left" (ABC news 10/13/87)