1000 REM ********************  P R O S E T . B A S  **************************
1010 REM   
1020 REM                    MENU-DRIVEN BASIC PROGRAM
1030 REM         THAT FACILITATES SETTING PRINTER CONFIGURATION
1040 REM       FOR THE C. ITOH PROWRITER AND NEC PC8023A-C PRINTERS
1050 REM *********************************************************************
1060 REM                    COPYRIGHT 1984 HORACE ORY
1070 REM              PERSONAL, NON-COMMERCIAL USE PERMITTED
1080 REM *********************************************************************
1090 CLEAR,,1000: DEFINT I-N,W,Y: DEFSTR A-E,Z: B$=SPACE$(21): A$=B$+SPACE$(10)
1100 D$="                   *** INVALID SELECTION; TRY AGAIN ***"
1110 E$="           *** ENHANCED PRINT NOT ALLOWED FOR CONDENSED FONT ***"
1120 PRINT CHR$(27)CHR$(42):PRINT:PRINT:PRINT:PRINT
1130 PRINT B$+"      ***   P R O S E T   ***": WIDTH LPRINT 255: GOTO 1150
1140 PRINT CHR$(27)CHR$(42):PRINT:PRINT:PRINT:PRINT:PRINT A$+"       DONE"
1150 FOR L=1 TO 1200: NEXT L
1160 REM ************************** FUNCTION MENU ****************************
1170 PRINT CHR$(27)CHR$(42): PRINT:PRINT A$;"FUNCTION MENU": PRINT
1180 PRINT B$"1 - SELECT FONT"
1190 PRINT B$"2 - SELECT LINE SPACING"
1200 PRINT B$"3 - SET LEFT MARGIN"
1210 PRINT B$"4 - SET HORIZONTAL TABS"
1220 PRINT B$"5 - SET VERTICAL TABS"
1230 PRINT B$"6 - ENGAGE DEFAULT SETTINGS"
1240 PRINT B$"7 - EXIT TO BASIC"
1250 PRINT B$"8 - EXIT TO CP/M"
1260 PRINT:PRINT B$"SELECT FUNCTION BY NUMBER (1-8)"
1270 Z$=INKEY$: IF Z$="" THEN GOTO 1270
1280 N=VAL(Z$): W=80          ' <<<<< *** ADJUST W FOR PRINTER WIDTH *** <<<<<
1290 IF N<1 OR N>8 THEN PRINT D$: GOTO 1270
1300 ON N GOTO 1360,1640,1790,1930,2190,2600,1340,1320
1310 REM ************************** EXIT TO CP/M *****************************
1320 WIDTH LPRINT W: SYSTEM
1330 REM ************************** EXIT TO BASIC ****************************
1340 WIDTH LPRINT W: END
1350 REM ************************* FONT SELECTION ****************************
1360 PRINT CHR$(27)CHR$(42): PRINT A$"FONT SELECTION": PRINT
1370 PRINT B$"1 - PICA (10 CHARACTERS PER INCH)"
1380 PRINT B$"2 - ELITE (12 CHARACTERS PER INCH)"
1390 PRINT B$"3 - CONDENSED (17 CHARACTERS PER INCH)"
1400 PRINT B$"4 - PROPORTIONAL SPACING"
1410 PRINT: PRINT B$"SELECT FONT BY NUMBER ( 1-4 )"
1420 Z$=INKEY$: IF Z$="" THEN GOTO 1420
1430 N=VAL(Z$)
1440 IF N<1 OR N>4 THEN PRINT D$: GOTO 1420
1450 LPRINT CHR$(27);CHR$(78);
1460 ON N GOTO 1510,1470,1480,1490
1470 LPRINT CHR$(27);CHR$(69);: GOTO 1510
1480 LPRINT CHR$(27);CHR$(81);: GOTO 1510
1490 LPRINT CHR$(27);CHR$(80);
1500 REM ******************** ENLARGED PRINT SELECTION ***********************
1510 PRINT CHR$(27)CHR$(42): PRINT: PRINT: PRINT A$"ENLARGED (2X) SIZE (Y/N)?"
1520 Z$=INKEY$: IF Z$="" THEN GOTO 1520
1530 IF Z$="N" OR Z$="n" THEN LPRINT CHR$(15);: GOTO 1570
1540 IF Z$="Y" OR Z$="y" THEN LPRINT CHR$(14);: GOTO 1570
1550 PRINT D$: GOTO 1520
1560 REM ******************* ENHANCED PRINT SELECTION ************************
1570 PRINT CHR$(27)CHR$(42): PRINT: PRINT: PRINT A$"ENHANCED PRINT (Y/N)?"
1580 Z$=INKEY$: IF Z$="" THEN GOTO 1580
1590 IF Z$="N" OR Z$="n" THEN LPRINT CHR$(27);CHR$(34);: GOTO 1140
1600 IF Z$="Y" AND N=3 OR Z$="y" AND N=3 THEN PRINT: PRINT E$: GOTO 1150
1610 IF Z$="Y" OR Z$="y" THEN LPRINT CHR$(27);"!";: GOTO 1140
1620 PRINT D$: GOTO 1580
1630 REM ********************* LINE SPACING SELECTION ***********************
1640 PRINT CHR$(27)CHR$(42): PRINT: PRINT: PRINT B$"LINE SPACING MENU": PRINT
1650 PRINT B$"1 - 1/6 INCH SPACING"
1660 PRINT B$"2 - 1/8 INCH SPACING"
1670 PRINT B$"3 - N/144 INCH SPACING"
1680 PRINT B$"4 - ABORT; RETURN TO FUNCTION MENU"
1690 PRINT: PRINT B$"SELECT LINE SPACING BY NUMBER ( 1-4 )"
1700 Z$=INKEY$: IF Z$="" THEN GOTO 1700
1710 N=VAL(Z$): IF N<1 OR N>4 THEN PRINT D$: GOTO 1700
1720 IF N=4 THEN GOTO 1170
1730 IF N=1 THEN LPRINT CHR$(27);"A";: GOTO 1140
1740 IF N=2 THEN LPRINT CHR$(27);"B";: GOTO 1140
1750 PRINT: PRINT B$"ENTER (2 DIGIT) N FOR N/144 INCH LINE SPACING"
1760 INPUT C$
1770 LPRINT CHR$(27);"T"+C$;: GOTO 1140
1780 REM ******************** LEFT MARGIN SELECTION *************************
1790 PRINT CHR$(27)CHR$(42): PRINT: PRINT A$"SET LEFT MARGIN": PRINT
1800 PRINT B$"1 - SET LEFT MARGIN"
1810 PRINT B$"2 - CLEAR LEFT MARGIN"
1820 PRINT B$"3 - ABORT; RETURN TO FUNCTION MENU"
1830 PRINT: PRINT B$"(LEFT MARGIN CANNOT BE SET WHILE IN PROPORTIONAL MODE)"
1840 PRINT: PRINT B$"SELECT BY NUMBER (1-3)"
1850 Z$=INKEY$: IF Z$="" THEN GOTO 1850
1860 N=VAL(Z$): IF N<1 OR N>3 THEN PRINT D$: GOTO 1850
1870 IF N=3 THEN GOTO 1170
1880 IF N=2 THEN LPRINT CHR$(27);"L000";: GOTO 1140
1890 PRINT: PRINT B$"ENTER 3-DIGIT NUMBER FOR POSITION OF LEFT MARGIN"
1900 C$="": INPUT C$
1910 LPRINT CHR$(27);"L"+C$;: GOTO 1170
1920 REM ****************** HORIZONTAL TAB SETTING **************************
1930 PRINT CHR$(27)CHR$(42): PRINT: PRINT B$"HORIZONTAL TAB SETTING": PRINT
1940 PRINT B$"1 - SET HORIZONTAL TABS"
1950 PRINT B$"2 - CLEAR SPECIFIC HORIZONTAL TABS"
1960 PRINT B$"3 - CLEAR ALL HORIZONTAL TABS"
1970 PRINT B$"4 - ABORT; RETURN TO FUNCTION MENU"
1980 PRINT: PRINT B$"SELECT BY NUMBER (1-4)"
1990 Z$=INKEY$: IF Z$="" THEN GOTO 1990
2000 N=VAL(Z$): IF N<1 OR N>4 THEN PRINT D$: GOTO 1990
2010 IF N=4 THEN GOTO 1170
2020 IF N>1 GOTO 2100
2030 PRINT: PRINT B$"ENTER 3-DIGIT NUMBERS FOR TAB POSITIONS": PRINT: PRINT B$"PRESS ENTER AFTER NO ENTRY TO TERMINATE"
2040 C$="": Z$=""
2050 INPUT Z$: IF Z$="" THEN GOTO 2070
2060 C$=C$+Z$+",": Z$="": GOTO 2050
2070 IF C$="" THEN C$=","
2080 C$=LEFT$(C$,LEN(C$)-1)+"."
2090 LPRINT CHR$(27);CHR$(40);C$;: GOTO 1140
2100 IF N=3 THEN LPRINT CHR$(27);CHR$(50);: GOTO 1140
2110 PRINT CHR$(27)CHR$(42): PRINT: PRINT B$"ENTER 3-DIGIT NUMBERS FOR TABS TO BE CLEARED": PRINT: PRINT B$"PRESS ENTER AFTER NO ENTRY TO TERMINATE"
2120 C$="": Z$=""
2130 INPUT Z$: IF Z$="" THEN GOTO 2150
2140 C$=C$+Z$+",": Z$="": GOTO 2130
2150 IF C$="" THEN C$=","
2160 C$=LEFT$(C$,LEN(C$)-1)+"."
2170 LPRINT CHR$(27);CHR$(41);C$;: GOTO 1140
2180 REM ******************** VERTICAL TAB SETTING **************************
2190 PRINT CHR$(27)CHR$(42): PRINT A$"   INITIALIZING"
2200 FOR I=2 TO 6
2210 FOR L=0 TO 9
2220 J(I,L)=0
2230 NEXT L
2240 NEXT I
2250 FOR I=2 TO 6
2260 PRINT CHR$(27)CHR$(42): FOR K=1 TO 50: NEXT K: PRINT: PRINT A$"SET CHANNEL ";I
2270 Z$="": PRINT
2280 PRINT: PRINT B$"ENTER 2-DIGIT LINE NUMBERS (UP TO 10) FOR CH ";I;" STOPS"
2290 PRINT: PRINT B$"PRESS ENTER AFTER NO ENTRY TO TERMINATE"
2300 L=0
2310 INPUT Z$: IF Z$="" THEN GOTO 2360
2320 J(I,L)=VAL(Z$)
2330 Z$=""
2340 IF L=9 THEN GOTO 2360
2350 L=L+1: GOTO 2310
2360 NEXT I
2370 N=0: PRINT CHR$(27)CHR$(42): PRINT: PRINT: PRINT
2380 PRINT B$"NOW ENTER 2-DIGIT NUMBER OF LAST LINE TO PRINT ON PAGE"
2390 PRINT: PRINT B$"(JUST PRESS ENTER TO SKIP)"
2400 INPUT Z$: IF Z$="" THEN GOTO 2420
2410 N=VAL(Z$): Z$=""
2420 PRINT CHR$(27)CHR$(42): PRINT A$"STAND BY - SETTING VFU...."
2430 LPRINT CHR$(29);"A@";
2440 FOR M=2 TO 66
2450 K=0
2460 IF M=N THEN LPRINT "C@";: K=1
2470 FOR L=0 TO 9
2480 IF K=1 THEN L=9: GOTO 2540
2490 IF M=J(2,L) THEN LPRINT "B@";: K=1: GOTO 2540
2500 IF M=J(3,L) THEN LPRINT "D@";: K=1: GOTO 2540
2510 IF M=J(4,L) THEN LPRINT "H@";: K=1: GOTO 2540
2520 IF M=J(5,L) THEN LPRINT "P@";: K=1: GOTO 2540
2530 IF M=J(6,L) THEN LPRINT CHR$(96);"@";: K=1
2540 NEXT L
2550 IF K=0 THEN LPRINT "@@";
2560 NEXT M
2570 LPRINT "A@";CHR$(30);
2580 PRINT CHR$(27)CHR$(42): PRINT A$"VFU IS NOW SET": GOTO 1150
2590 REM *********************** DEFAULT SETTINGS ***************************
2600 LPRINT CHR$(27);;CHR$(78);                   ' FONT DEFAULT
2610 LPRINT CHR$(27);"A";                         ' LINE FEED SPACING DEFAULT
2620 LPRINT CHR$(27);"L";"002";                   ' LEFT MARGIN DEFAULT
2630 LPRINT CHR$(27);CHR$(40);"012,022,032,042."; ' HORIZONTAL TABS DEFAULT
2640 LPRINT CHR$(29);"A@@@@@@@@@";                ' SET TOF
2650 FOR N=1 TO 9
2660 LPRINT "B@@@@@@@@@@@";                       ' CH2 STOPS EVERY 6 LINES
2670 NEXT N
2680 LPRINT "@@@@C@@@@@@@@@A@";CHR$(30);          ' SET BOTTOM AT LINE 62
2690 PRINT CHR$(27)CHR$(42): PRINT: PRINT A$"DEFAULTS SELECTED": GOTO 1150
2700 REM ** DEFAULTS SPECIFIED ARE FOR:
2710 REM **          PICA FONT, NON-ENLARGED, NON-ENHANCED
2720 REM **          1/6 INCH LINE SPACING
2730 REM **          2-SPACE LEFT MARGIN
2740 REM **          HORIZONTAL TABS AT 012, 022, 032, 042
2750 REM **          VFU STOPS AT 6-LINE INTERVALS IN CH2; BOTTOM AT LINE 62
2760 REM ** FOR OTHER DEFAULT PARAMETERS CHANGE STATEMENTS 2600-2680
2770 REM ** PRINTER WIDTH CAN BE CHANGED BY CHANGING W IN LINE 1280
