home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
diagnose
/
pcconfig.arj
/
IRQ.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-02-17
|
1KB
|
39 lines
1100 REM ======== TEST IRQ ACTIVATION ========
1105 DEF SEG=&HF000: E0%=PEEK(&HFFFE): AT%=0
1107 IF E0%=248 THEN AT%=1
1108 IF E0%=252 THEN AT%=1
1120 I%=INP(&H21)
1130 FOR N%=0 TO 7
1131 PRINT "IRQ";N%;" - ";
1132 J%=INT(I%/2)
1133 GOSUB 1160
1134 I%=J%
1135 NEXT N%
1138 IF AT%=0 THEN 1158
1140 I%=INP(&HA1)
1150 FOR N%=8 TO 15
1151 PRINT "IRQ";N%;" - ";
1152 J%=INT(I%/2)
1153 GOSUB 1160
1154 I%=J%
1155 NEXT N%
1158 END
1160 IF N%=0 THEN PRINT "System Timer",
1161 IF N%=1 THEN PRINT "Keyboard",
1162 IF N%=2 THEN IF AT%=0 THEN PRINT "(Reserved)", ELSE PRINT "Slave PIC",
1163 IF N%=3 THEN PRINT "Serial COM2",
1164 IF N%=4 THEN PRINT "Serial COM1",
1165 IF N%=5 THEN IF AT%=0 THEN PRINT "Hard Disk", ELSE PRINT "Parallel LPT2",
1166 IF N%=6 THEN PRINT "Diskette",
1167 IF N%=7 THEN PRINT "Parallel LPT1",
1168 IF N%=8 THEN PRINT "Real-time clock",
1169 IF N%=9 THEN PRINT "Redirected IRQ2",
1170 IF N%=10 THEN PRINT "(Reserved)",
1171 IF N%=11 THEN PRINT "(Reserved)",
1172 IF N%=12 THEN PRINT "(Reserved)",
1173 IF N%=13 THEN PRINT "Maths coprocessor",
1174 IF N%=14 THEN PRINT "Hard disk",
1175 IF N%=15 THEN PRINT "(Reserved)",
1176 IF I%=J%+J% THEN PRINT "- Active" ELSE PRINT "- Inactive"
1178 RETURN