'***************************** '* * '* Program START * '* * '***************************** ' 'PROGRAM TO INITIALIZE FILES FOR MICROSOC ' DIM P\$(15),BX(15),EX(15),Y(15),DSK\$(15),L\$(15) ' 'DATA STATEMENT BELOW HAS FOLLOWING FORMAT: 'NUMBER OF X,Y ZONE COORDINATES TO FOLLOW, FOLLOWED BY 'X- AND Y-COORDINATE PAIRS. ' 'THE NEXT DATA STATEMENT GIVES THE DEFAULT STRING VALUES OF EACH PARAMETER. ' DATA 9 DATA "A:","A:","A:","A:","66","13","10","27,65","12" DATA 27,5,27,7,27,9,27,11,27,15,27,17,27,19,27,21,27,23 ' 'PROTOCOL FILE CANNOT BE FOUND OR ERROR WITHIN IT HAS BEEN DETECTED. 'DEFAULTS ARE SET HERE ON ERROR GOTO 1 OPEN "I",#1,"PROTOCOL" FOR N=1 TO 11 INPUT #1,DSK\$(N) DSK\$(N)=RIGHT\$(DSK\$(N),LEN(DSK\$(N))-3) NEXT N P\$(1)=DSK\$(2) P\$(2)=DSK\$(3) P\$(3)=DSK\$(4) P\$(4)=DSK\$(11) LINE INPUT #1,A\$:P\$(5)=RIGHT\$(A\$,LEN(A\$)-3) LINE INPUT #1,A\$:P\$(6)=RIGHT\$(A\$,LEN(A\$)-3) LINE INPUT #1,A\$:P\$(7)=RIGHT\$(A\$,LEN(A\$)-3) LINE INPUT #1,A\$:P\$(8)=RIGHT\$(A\$,LEN(A\$)-6) LINE INPUT #1,A\$:P\$(9)=RIGHT\$(A\$,LEN(A\$)-3) READ ZN FOR N=1 TO ZN READ Z\$ NEXT N CLOSE GOTO 10 1 RESUME 5 5 COLOR 7,0 CLS PRINT"File PROTOCOL which holds the file paths and printer protocol" PRINT"either does not exist or has a defect in it." PRINT"If you know that it exists and you do not want to recreate it," PRINT"type ESC to exit program. Otherwise, type any key to continue." READ ZN FOR N=1 TO ZN READ P\$(N) NEXT N GOTO 16 10 CLS PRINT "Type ESC to exit program, or any other key to continue." 16 FOR N=1 TO ZN READ BX(N),Y(N) NEXT N 2 A\$=INKEY\$ IF LEN(A\$)=0 THEN 2 IF ASC(A\$)=27 THEN 99 CLS COLOR 7,0 PRINT" MICROSOC Path and Parameter Modification Program" PRINT" Current Values Given in Boldface" PRINT" Use up and down arrows to change zones, ENTER when finished." PRINT PRINT"Path for test & del files:" PRINT PRINT"Path for scoring files:" PRINT PRINT"Path for facsimile files:" PRINT PRINT"Path for test item banks:" PRINT PRINT" Printer Parameters (decimal)" PRINT PRINT"Number of lines per page:" PRINT PRINT"Carriage return:" PRINT PRINT"Line Feed:" PRINT PRINT"Half-line feed:" PRINT"Remember to separate decimal values by commas." PRINT"Form feed:" COLOR 0,7 FOR N=1 TO ZN LOCATE Y(N),BX(N),1,7,8 PRINT P\$(N) EX(N)=BX(N)+LEN(P\$(N))-1 NEXT N CN=1 LOCATE Y(CN),EX(CN)+1,1,7,8 3 CX=EX(CN)+1 CY=Y(CN) NFLG=0 CLOSE 4 A\$=INKEY\$ IF LEN(A\$)=0 THEN 4 IF LEN(A\$)=1 THEN 11 IF LEN(A\$)>2 THEN 4 6 V=ASC(MID\$(A\$,2,1)) IF V=72 THEN GOTO UP IF V=80 THEN GOTO DOWN IF V=75 THEN GOTO LEFT IF V=77 THEN GOTO RIGHT IF V=83 THEN GOTO BUILD GO TO 4 11 V=ASC(A\$) IF V=27 THEN 99 IF V=13 THEN 31 IF V>31 AND V<128 OR V=8 THEN GOTO BUILD GOTO 4 BUILD: IF V=8 THEN NFLG=1 IF NFLG<>0 THEN 12 P\$(CN)="" CX=BX(CN) EX(CN)=BX(CN)-1 LOCATE Y(CN),BX(CN),1,7,8 COLOR 7,0 PRINT STRING\$(80-BX(CN)+1,32); COLOR 0,7 LOCATE Y(CN),BX(CN),1,7,8 NFLG=1 P\$(CN)=P\$(CN)+A\$ PRINT P\$(CN); CX=CX+1 EX(CN)=EX(CN)+1 GOTO 4 12 IF LEN(A\$)=2 THEN 13 IF V<>8 THEN 18 IF CX=BX(CN) THEN 4 CX=CX-1 Q\$="" FOR N=1 TO LEN(P\$(CN)) IF CX=BX(CN)+N-1 THEN 15 Q\$=Q\$+MID\$(P\$(CN),N,1) 15 NEXT N EX(CN)=EX(CN)-1 GOTO 17 13 IF CX=EX(CN)+1 THEN 4 Q\$="" FOR N=1 TO LEN(P\$(CN)) IF N=CX-BX(CN)+1 THEN 14 Q\$=Q\$+MID\$(P\$(CN),N,1) 14 NEXT N EX(CN)=EX(CN)-1 17 P\$(CN)=Q\$ COLOR 7,0 LOCATE Y(CN),BX(CN),1,7,8 PRINT STRING\$(80-BX(CN)+1,32); COLOR 0,7 LOCATE Y(CN),BX(CN),1,7,8 PRINT P\$(CN); LOCATE Y(CN),CX,1,7,8 GOTO 4 18 IF CX=EX(CN)+1 THEN 19 IF CX=BX(CN) THEN 20 P\$(CN)=LEFT\$(P\$(CN),CX-BX(CN))+A\$+RIGHT\$(P\$(CN),EX(CN)-CX+1) 21 CX=CX+1 EX(CN)=EX(CN)+1 COLOR 7,0 LOCATE Y(CN),BX(CN),1,7,8 PRINT STRING\$(80-BX(CN)+1,32); COLOR 0,7 LOCATE Y(CN),BX(CN),1,7,8 PRINT P\$(CN); LOCATE Y(CN),CX,1,7,8 GOTO 4 19 P\$(CN)=P\$(CN)+A\$ GOTO 21 20 P\$(CN)=A\$+P\$(CN) GOTO 21 UP: CN=CN-1 IF CN=0 THEN CN=ZN LOCATE Y(CN),EX(CN)+1,1,7,8 CX=EX(CN)+1 NFLG=0 GO TO 4 DOWN: CN=CN+1 IF CN=ZN+1 THEN CN=1 LOCATE Y(CN),EX(CN)+1,1,7,8 CX=EX(CN)+1 NFLG=0 GO TO 4 LEFT: IF CX=BX(CN) THEN 7 CX=CX-1 NFLG=1 7 LOCATE Y(CN),CX,1,7,8 GO TO 4 RIGHT: IF CX=EX(CN)+1 THEN 8 CX=CX+1 8 LOCATE Y(CN),CX,1,7,8 GO TO 4 31 OPEN "O",#1,"PROTOCOL" DSK\$(1)="01="+" " DSK\$(2)="02="+P\$(1) DSK\$(3)="03="+P\$(2) DSK\$(4)="04="+P\$(3) DSK\$(5)="05="+P\$(3) DSK\$(6)="06="+P\$(3) DSK\$(7)="07="+P\$(3) DSK\$(8)="08="+" " DSK\$(9)="09="+" " DSK\$(10)="10="+P\$(1) DSK\$(11)="11="+P\$(4) PL\$="PL="+P\$(5) CR\$="CR="+P\$(6) LF\$="LF="+P\$(7) M=0 FOR N=1 TO LEN(P\$(8)) IF MID\$(P\$(8),N,1)<>"," THEN 32 M=M+1 32 NEXT N M=M+1 HLF\$="HLF="+RIGHT\$(STR\$(M),LEN(STR\$(M))-1)+","+P\$(8) FF\$="FF="+P\$(9) FOR N=1 TO 11 PRINT #1,DSK\$(N) NEXT N PRINT #1,PL\$ PRINT #1,CR\$ PRINT #1,LF\$ PRINT #1,HLF\$ PRINT #1,FF\$ CLOSE RESET CHAIN "MICROSOC" 99 END