1 ' ### Pull-up Resistors Test Tool by KdL (2021.10.16) / TEST IN A,(P)
2 '
10 SCREEN0: WIDTH80: KEYOFF: CLEAR 100,&HBFFE: DEFUSR=&HC000: DEFSNGA-Z
20 FOR P=0 TO 255
30 POKE&HC000,&HDB: POKE&HC001,P                     :' IN A,(P)
40 POKE&HC002,&H32: POKE&HC003,&HFF: POKE&HC004,&HBF :' LD (&HBFFF),A
50 POKE&HC005,&HC9                                   :' RET
60 B=INP(P): A=USR(0): A=PEEK(&HBFFF)
70 PRINT "IN A,(#"+RIGHT$("0"+HEX$(P),2)+")  A= #"+RIGHT$("0"+HEX$(A),2)+"   ";
80 IF A<>B THEN PRINT "FAILED! It does not match #";RIGHT$("0"+HEX$(B),2) ELSE PRINT "PASSED."
90 IF Z=0 THEN PRINT"PRESS ANY KEY OR RETURN ";: K$=INPUT$(1) ELSE 120
100 IF K$=CHR$(13) THEN Z=1
110 PRINT CHR$(13);SPC(23);CHR$(13);
120 IF K$=CHR$(27) THEN END
130 K$=INKEY$
140 IF K$=CHR$(13) THEN Z=0
150 NEXT P
