Technical data
BIOS and System Programming
68 VIPA GmbH CP486 ⋅ 00/14
BEGIN
GOTOXY(1,10);
WRITE('INTERRUPT 12 was not initiated by PLC ')
END;
PROCEDURE BASP_INT;
BEGIN
GOTOXY(1,10);
WRITE('INTERRUPT 12 was not initiated by BASP ')
END;
PROCEDURE KACHEL_INT;
BEGIN
MEM[$C000:$9F8E]:=0; { Reset interrupt by accessing }
{ the interrupt reset register }
GOTOXY(1,10);
WRITE('INTERRUPT 12 was initiated by PLC via bank access ')
END;
PROCEDURE INT_ANZAHL;
BEGIN
GOTOXY(1,1);
WRITE('Number of initiated INTERRUPTs :',I);
END;
PROCEDURE INT_AKTIV;
BEGIN
INT_AKTIVBIT:=FALSE;
HEX2BIN(S5_STATUS,S5_STATUSBIT); { HEX --> BIN - conversion }
HEX2BIN(CP_STATUS,CP_STATUSBIT);
IF (S5_STATUSBIT[1]<>0) THEN
BASP_INT { INT via BASP signal }
ELSE BEGIN
IF (CP_STATUSBIT[0]=0) THEN { INT via S5-bank access }
KACHEL_INT
ELSE { another hardware interrupt }
FEHLER;
END;
END;
BEGIN {*********** MAIN ******************}
CLRSCR;
I:=0; { Preset counter }
INT_AKTIVBIT:=FALSE;
PORT[PIC_2+1]:=PORT[PIC_2+1] and $EF; { Enable interrupt 12 }
GETINTVEC($74,OLD_VEC); { Save old IRQ 12-vector, }
SETINTVEC($74,@INT_74); { and refer to own Int-routine }
gotoxy(1,24);
write(' Interruption with optional key ');
REPEAT
INT_ANZAHL; { Output current Int-number }
IF INT_AKTIVBIT THEN INT_AKTIV { Is there an Interrupt ? }
UNTIL KEYPRESSED;
SETINTVEC($74,OLD_VEC); { Recover old Int-vector }
PORT[PIC_2+1]:=PORT[PIC_2+1] or $10; { Disable interrupt 12 }
END.