DECLARE DECLARE DECLARE DECLARE DECLARE DECLARE DECLARE DECLARE DECLARE DECLARE DIM DIM DIM DIM

SUB SUB SUB SUB SUB SUB SUB SUB SUB SUB

Port888Status () Port890Status () Port889Status () InitScreen () DrawPort888 () DrawPort890 () DrawPort889 () OutPort888 (Port888Num) OutPort890 (Port890Num) KeyPressed (ActionKey$) BinaryPort888(8) AS INTEGER BinaryPort890(4) AS INTEGER BinaryPort889(5) AS INTEGER ActionKey AS STRING

SHARED SHARED SHARED SHARED

InitScreen Port888Status Port890Status Port889Status DrawPort888 DrawPort890 DrawPort889 DO ActionKey$ = INKEY$ IF ActionKey$ = "x" OR ActionKey$ = "X" THEN CLS : END ELSE IF ActionKey$ <> "" THEN KeyPressed (ActionKey$) Port889Status DrawPort889 LOOP SUB DrawPort888 FOR i = 1 TO 4 LOCATE (i + 5), 13 PRINT RIGHT$(STR$(BinaryPort888(i)), 1); NEXT i FOR i = 5 TO 8 LOCATE (i + 1), 34 PRINT RIGHT$(STR$(BinaryPort888(i)), 1); NEXT i END SUB SUB DrawPort889 FOR i = 1 TO 3 LOCATE (i + 18), 13 PRINT RIGHT$(STR$(BinaryPort889(i)), 1); NEXT i FOR i = 4 TO 5 LOCATE (i + 15), 34 PRINT RIGHT$(STR$(BinaryPort889(i)), 1); NEXT i

NEXT i END SUB SUB InitScreen CLS PRINT CHR$(201). 1. 11 PRINT CHR$(218). LOCATE 2. FOR i = 1 TO 30 PRINT CHR$(196). LOCATE 5. 5 PRINT "Outputs:". NEXT i LOCATE 4. 1). 13 PRINT RIGHT$(STR$(BinaryPort890(i)). 11 . 14 FOR i = 1 TO 26 PRINT CHR$(196). NEXT i PRINT CHR$(187) FOR i = 1 TO 22 PRINT CHR$(186). 34 PRINT RIGHT$(STR$(BinaryPort890(i)).END SUB SUB DrawPort890 FOR i = 1 TO 2 LOCATE (i + 12). FOR i = 1 TO 50 PRINT CHR$(205). FOR i = 1 TO 50 PRINT CHR$(205). CHR$(186) NEXT i PRINT CHR$(200). 1). NEXT i PRINT CHR$(188). 14 PRINT "Interface Control Ver. NEXT i FOR i = 3 TO 4 LOCATE (i + 10). NEXT i PRINT CHR$(191) LOCATE 6. TAB(52).0". LOCATE 3.

FOR i = 1 TO 30 PRINT CHR$(196). PRINT "I". LOCATE 7. CHR$(179). 41 PRINT RIGHT$(STR$(i). ". NEXT i COLOR 7 LOCATE 10. 11 PRINT CHR$(192). CHR$(179). 11 PRINT CHR$(179). [ ] Bit 7". "[ ] Strobe LOCATE 14. LOCATE 9. CHR$(179) FOR i = 1 TO 4 LOCATE (i + 5). NEXT i PRINT CHR$(217) LOCATE 12. FOR i = 1 TO 38 PRINT CHR$(196). 11 PRINT CHR$(218). PRINT "L". [ ] Bit 6". COLOR 4 "[ ] Bit 1 "[ ] Bit 2 "[ ] Bit 3 "[ ] Bit 4 [ ] Bit 5". 11 PRINT CHR$(179). 5 PRINT "Control Lines:". [ ] Bit 8". 19 PRINT i. 11 PRINT CHR$(179). LOCATE 15. NEXT i FOR i = 5 TO 8 LOCATE (i + 1). 1). LOCATE 14. PRINT "e". LOCATE 8. LOCATE 14. LOCATE 13. LOCATE 13. NEXT i PRINT CHR$(191) LOCATE 11. COLOR 7 16 16 37 38 [ ] Initialize [ ] Sel/Desel ". PRINT "S".PRINT CHR$(179). CHR$(179). "[ ] LF/CR COLOR 4 LOCATE 13. CHR$(179). 11 PRINT CHR$(179). 11 . CHR$(179). 11 PRINT CHR$(179).

. NEXT i PRINT CHR$(217) LOCATE 23. 11 PRINT CHR$(179). 5 PRINT "Inputs:". "[ ] Bit 3 LOCATE 22. 11 PRINT CHR$(179). 11 PRINT CHR$(218). NEXT i PRINT CHR$(217) LOCATE 17. [ ] Bit 5". "[ ] Bit 2 LOCATE 21. FOR i = 1 TO 30 PRINT CHR$(196). FOR i = 1 TO 30 PRINT CHR$(196). LOCATE 18.PRINT CHR$(192). "[ ] Bit 1 LOCATE 20. ". CHR$(179). CHR$(179). NEXT i PRINT CHR$(191) LOCATE 19. 3: PRINT "Press X to Exit" END SUB SUB KeyPressed (ActionKey$) IF ActionKey$ = "1" AND BinaryPort888(1) = 1 THEN OutPort888 (-1): Port888Status : DrawPort888: EXIT SUB IF ActionKey$ = "1" AND BinaryPort888(1) = 0 THEN OutPort888 (1): Port888Status: DrawPort888: EXIT SUB IF ActionKey$ = "2" AND BinaryPort888(2) = 1 THEN OutPort888 (-2): Port888Status : DrawPort888: EXIT SUB IF ActionKey$ = "2" AND BinaryPort888(2) = 0 THEN OutPort888 (2): Port888Status: DrawPort888: EXIT SUB IF ActionKey$ = "3" AND BinaryPort888(3) = 1 THEN OutPort888 (-4): Port888Status : DrawPort888: EXIT SUB IF ActionKey$ = "3" AND BinaryPort888(3) = 0 THEN OutPort888 (4): Port888Status: DrawPort888: EXIT SUB IF ActionKey$ = "4" AND BinaryPort888(4) = 1 THEN OutPort888 (-8): Port888Status : DrawPort888: EXIT SUB IF ActionKey$ = "4" AND BinaryPort888(4) = 0 THEN OutPort888 (8): Port888Status: DrawPort888: EXIT SUB IF ActionKey$ = "5" AND BinaryPort888(5) = 1 THEN OutPort888 (-16): Port888Statu [ ] Bit 4". CHR$(179). 11 PRINT CHR$(179). 11 PRINT CHR$(192). FOR i = 1 TO 38 PRINT CHR$(196).

s: DrawPort888: EXIT SUB IF ActionKey$ = "5" AND BinaryPort888(5) = 0 THEN OutPort888 (16): Port888Status : DrawPort888: EXIT SUB IF ActionKey$ = "6" AND BinaryPort888(6) = 1 THEN OutPort888 (-32): Port888Statu s: DrawPort888: EXIT SUB IF ActionKey$ = "6" AND BinaryPort888(6) = 0 THEN OutPort888 (32): Port888Status : DrawPort888: EXIT SUB IF ActionKey$ = "7" AND BinaryPort888(7) = 1 THEN OutPort888 (-64): Port888Statu s: DrawPort888: EXIT SUB IF ActionKey$ = "7" AND BinaryPort888(7) = 0 THEN OutPort888 (64): Port888Status : DrawPort888: EXIT SUB IF ActionKey$ = "8" AND BinaryPort888(8) = 1 THEN OutPort888 (-128): Port888Stat us: DrawPort888: EXIT SUB IF ActionKey$ = "8" AND BinaryPort888(8) = 0 THEN OutPort888 (128): Port888Statu s: DrawPort888: EXIT SUB IF ActionKey$ = "s" OR ActionKey$ = "S" AND BinaryPort890(1) = 1 THEN OutPort890 (-1): Port890Status: DrawPort890: EXIT SUB IF ActionKey$ = "s" OR ActionKey$ = "S" AND BinaryPort890(1) = 0 THEN OutPort890 (1): Port890Status: DrawPort890: EXIT SUB IF ActionKey$ = "l" OR ActionKey$ = "L" AND BinaryPort890(2) = 1 THEN OutPort890 (-2): Port890Status: DrawPort890: EXIT SUB IF ActionKey$ = "l" OR ActionKey$ = "L" AND BinaryPort890(2) = 0 THEN OutPort890 (2): Port890Status: DrawPort890: EXIT SUB IF ActionKey$ = "i" OR ActionKey$ = "I" AND BinaryPort890(3) = 1 THEN OutPort890 (-4): Port890Status: DrawPort890: EXIT SUB IF ActionKey$ = "i" OR ActionKey$ = "I" AND BinaryPort890(3) = 0 THEN OutPort890 (4): Port890Status: DrawPort890: EXIT SUB IF ActionKey$ = "e" OR ActionKey$ = "E" AND BinaryPort890(4) = 1 THEN OutPort890 (-8): Port890Status: DrawPort890: EXIT SUB IF ActionKey$ = "e" OR ActionKey$ = "E" AND BinaryPort890(4) = 0 THEN OutPort890 (8): Port890Status: DrawPort890: EXIT SUB END SUB SUB OutPort888 (Port888Num) tempport = INP(888) Port888Num = Port888Num + tempport OUT 888. Port888Num END SUB SUB OutPort890 (Port890Num) tempport = INP(890) Port890Num = Port890Num + tempport OUT 890. Port890Num .

END SUB SUB Port888Status InPort = INP(888) FOR i = 1 TO 8 BinaryPort888(i) = 0 NEXT i FOR i = 1 TO 8 BinaryPort888(i) = InPort MOD 2 InPort = FIX(InPort / 2) NEXT i END SUB SUB Port889Status InPort = INP(889) FOR i = 1 TO 5 BinaryPort889(i) = 0 NEXT i FOR i = 1 TO 5 BinaryPort889(i) = InPort MOD 2 InPort = FIX(InPort / 2) NEXT i END SUB SUB Port890Status InPort = INP(890) FOR i = 1 TO 4 BinaryPort890(i) = 0 NEXT i FOR i = 1 TO 4 BinaryPort890(i) = InPort MOD 2 InPort = FIX(InPort / 2) NEXT i END SUB .

Sign up to vote on this title
UsefulNot useful