/*
C interrupt intialization program interrupt1.c.
*/
#include "standard.h"
#include "SparcSoftcard.h"
#include "SparcSoftcardOps.h"
void InitInterrupts() {
/*
The processor arrives here all interrupt masked, with every potential interrupt soucre in an unknown state.
This procedure reset all interprocessor interrupt lines, sets all peripheral interrupts to inactive and resets the interrupt mask bits.
*/
/* reset all interprocessor interrupt lines */
SparcSoftcardOps←ResetSparcToIOPInt();
SparcSoftcardOps←ResetSparcToMesaInt();
SparcSoftcardOps←ResetSparcToSparcInt();
SparcSoftcardOps←ResetIOPToSparcInt();
SparcSoftcardOps←ResetMesaToSparcInt();
SparcSoftcardOps←ResetSparcAbortInt();
/* sets all peripheral interrupts to inactive */
SparcSoftcardOps←SetPeriphIntMode(InterruptSource←mapInt, InterruptMode�tiveLow, InterruptNumber←interruptA, InterruptProcessor←none);
SparcSoftcardOps←SetPeriphIntMode(InterruptSource←mapInt, InterruptMode�tiveLow, InterruptNumber←interruptB, InterruptProcessor←none);
SparcSoftcardOps←SetPeriphIntMode(InterruptSource←mapInt, InterruptMode�tiveLow, InterruptNumber←interruptC, InterruptProcessor←none);
/* reset the interrupt mask bits */
asm("mov  %g1, %o0");
asm("rd  %psr, %g1");
asm("and  %g1, ~0xf00, %g1");
asm("wr  %g1, %g0, %psr");
asm("nop");
asm("nop");
asm("nop");
asm("mov  %o0, %g1");
};
void SetInterruptA() {
/*
Sets interrupt A to the real time clock interrupt.
*/
SparcSoftcardOps←SetPeriphIntMode(InterruptSource←realTimeClock, InterruptMode←risingEdge, InterruptNumber←interruptA, InterruptProcessor←sparc);
};
void SetInterruptB() {
/*
Sets interrupt B to the real time clock interrupt.
*/
SparcSoftcardOps←SetPeriphIntMode(InterruptSource←PrintVersEnd, InterruptMode←risingEdge, InterruptNumber←interruptB, InterruptProcessor←sparc);
};