Compucolor.org – Virtual Media

Listing of file='IOTEST.BAS;01' on disk='vmedia/chip_129-sector.ccvf'

10 PLOT 12
11 REM 
20 INPUT "ENSURE THAT THE I/O TEST SOCKET IS CONNECTED.( C/R TO CONTINUE) ";Q
30 PLOT 3,0,4,11:OUT 35,139:OUT 39,139:PRINT "TEST PORTS 32 & 36 AS O/P OTHERS AS I/P
40 FOR Q= 0TO 255:OUT 32,Q:OUT 36,Q
50 W= INP (33):X= INP (34):Y= INP (37):Z= INP (38):U= WAND YAND Z
51 REM 
60 PLOT 6,2,3,0,6,11:PRINT Q,W,X,Y,Z
70 IF ((QAND 16)= 16)AND (X= (QAND 240)+ (QAND 240)/ 16)THEN X= (XAND 240)+ (QAND 15)
80 IF Q= (UAND X)THEN NEXT
90 IF Q< 255THEN T1= T1+ 1:E= E+ 1:PLOT 3,0,7+ E,6,1,11:PRINT Q,W,X,Y,Z:IF E< 20THEN NEXT
95 IF Q< 255THEN E= E- 20:EE= 1+ EE:NEXT
100 PLOT 3,0,4,11:OUT 35,153:OUT 39,153:PRINT "TEST PORTS 33 & 37 AS O/P OTHERS AS I/P
101 REM 
110 FOR Q= 0TO 255:OUT 33,Q:OUT 37,Q
120 W= INP (33):X= INP (34):Y= INP (37):Z= INP (38):U= WAND YAND Z
130 PLOT 6,2,3,0,6,11:PRINT Q,W,X,Y,Z
140 IF ((QAND 16)= 16)AND (X= (QAND 240)+ (QAND 240)/ 16)THEN X= (XAND 240)+ (QAND 15)
150 IF Q= (UAND X)THEN NEXT
160 IF Q< 255THEN T2= T2+ 1:E= E+ 1:PLOT 3,0,7+ E,6,1,11:PRINT Q,W,X,Y,Z:IF E< 20THEN NEXT
170 IF Q< 255THEN E= E- 20:EE= 1+ EE:NEXT
180 PLOT 3,0,4,11:OUT 39,146:PRINT "TEST PORT 38 AS O/P PORTS 36 & 37 AS I/P
190 FOR Q= 0TO 255:OUT 38,Q
200 Y= INP (36):Z= INP (37):U= YAND Z
201 REM 
210 PLOT 6,2,3,0,6,11:PRINT Q,Y,Z
220 IF Q= UTHEN NEXT
230 IF Q< 255THEN T3= T3+ 1:E= E+ 1:PLOT 3,0,7+ E,6,1,11:PRINT Q,Y,Z:IF E< 20THEN NEXT
240 IF Q< 255THEN E= E- 20:EE= 1+ EE:NEXT
250 PLOT 3,0,4,11:OUT 35,147:PRINT "TEST PORT 34(MSB) AS O/P PORTS 32 & 33 AS I/P
260 FOR Q= 16TO 240STEP 16:OUT 34,Q
270 W= INP (32):X= INP (33):U= XAND WAND 240
280 PLOT 6,2,3,0,6,11:PRINT Q,W,X
290 IF Q= UTHEN NEXT
300 IF Q< 255THEN T4= T4+ 1:E= E+ 1:PLOT 3,0,7+ E,6,1,11:PRINT Q,W,X:IF E< 20THEN NEXT
301 REM 
310 IF Q< 255THEN E= E- 20:EE= 1+ EE:NEXT
320 PLOT 3,0,4,11:OUT 39,146:PRINT "BIT TEST PORT 38 AS O/P USING PORT 36 AS I/P
330 FOR Q= 1TO 15STEP 2:OUT 39,Q:W= INP (36):OUT 39,Q- 1:X= INP (36)
350 PLOT 6,2,3,0,6,11:PRINT Q,W,X
360 IF (W= 2^ ((Q- 1)/ 2))AND (X= 0)THEN NEXT
370 IF Q< 15THEN T5= T5+ 1:E= E+ 1:PLOT 3,0,7+ E,6,1,11:PRINT Q,W,X:IF E< 20THEN NEXT
380 IF Q< 15THEN E= E- 20:EE= 1+ EE:NEXT
400 PLOT 3,0,4,11:OUT 35,147:PRINT "BIT TEST PORT 34 UPPER AS O/P USING PORT 32 AS I/P
401 REM 
410 FOR Q= 9TO 15STEP 2:OUT 35,Q:W= INP (32)AND 240:OUT 35,(Q- 1):X= INP (32)AND 240
420 PLOT 6,2,3,0,6,11:PRINT Q,W,X
430 IF (W= 2^ ((Q- 1)/ 2))AND (X= 0)THEN NEXT
440 IF Q< 15THEN T6= T6+ 1:E= E+ 1:PLOT 3,0,7+ E,6,1,11:PRINT Q,W,X:IF E< 20THEN NEXT
450 IF Q< 15THEN E= E- 20:EE= 1+ EE:NEXT
500 PLOT 12,6,2
501 REM 
520 IF T1< > = 0THEN PRINT T1,"ERROR(S) IN TEST 1.":PRINT
530 IF T2< > = 0THEN PRINT T2,"ERROR(S) IN TEST 2.":PRINT
540 IF T3< > = 0THEN PRINT T3,"ERROR(S) IN TEST 3.":PRINT
550 IF T4< > = 0THEN PRINT T4,"ERROR(S) IN TEST 4.":PRINT
560 IF T5< > = 0THEN PRINT T5,"ERROR(S) IN TEST 5.":PRINT
570 IF T6< > = 0THEN PRINT T6,"ERROR(S) IN TEST 6.":PRINT
600 IF T1+ T2+ T3+ T4+ T5+ T6= 0THEN PLOT 3,27,15:PRINT "TEST GOOD"
601 REM