home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Software
/
FORM-MAKER
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
4KB
|
105 lines
100 REM*** KEY BUFFER IS C64 ONLY!!
110 :
120 PRINT"[147][158] FORM MAKER - LOUIS F. SANDER [146] "
130 POKE53280,6:POKE53281,6
140 PRINT"[153] THIS MAKES A FORM ON YOUR PRINTER."
150 INPUT" YOUR PRINTER WIDTH IN SPACES 80[157][157][157][157]";PW:PW=PW-1
160 INPUT" YOUR PAPER LENGTH IN INCHES 11[157][157][157][157]";PL:PL=INT(9*PL)
170 PRINT" COLUMN 1 COLUMN 2"
180 PRINT"[153] [207][183][183][183][183][183][183][183][183][183][183][207][183][183][183][183][183][183][183][183][183][183][183][183][183][165]"
190 PRINT" ROW 1 [153][165] [165] [165]"
200 PRINT" [207][183][183][183][183][183][183][183][183][183][183][207][183][183][183][183][183][183][183][183][183][183][183][183][183][165]"
210 PRINT" ROW 2 [153][204][175][175][175][175][175][175][175][175][175][175][204][175][175][175][175][175][175][175][175][175][175][175][175][175][165]"
220 PRINT" [165] [165] [165]"
230 PRINT" ROW 3 [153][204][175][175][175][175][175][175][175][175][175][175][204][175][175][175][175][175][175][175][175][175][175][175][175][175][165]"
240 PRINT"[158]THE FORM CAN HAVE ANY NUMBER OF COLUMNS"
250 PRINT"AND ROWS. IT CAN BE UP TO";PW;"[158]PRINTER"
260 PRINT"SPACES WIDE AND";PL;"[158]PRINTER LINES LONG,"
270 PRINT"INCLUDING LABELS FOR COLUMNS AND ROWS."
280 PRINT"YOU CHOOSE ANINDIVIDUAL WIDTH FOR EACH"
290 PRINT"COLUMN, AND ONE HEIGHT FOR ALL THE ROWS."
300 INPUT" HOW MANY COLUMNS ON THE FORM";NC%:DIMCW(NC%):PRINT:IFNC%<1THEN1020
310 W=0:FORJ=1TONC%
320 PRINT" HOW MANY SPACES IN COLUMN";J;"[157]";:CW(J)=0:INPUTCW(J)
330 IFCW(J)<1THENPRINTTAB(35)"[145][158]_ ???":GOTO320
340 W=W+CW(J):NEXT
350 PRINT"[158]THESE COLUMNS TAKE UP";W;"[158]OF THE";PW
360 PRINT"[158]AVAILABLE SPACES ON YOUR PRINTER."
370 IFW>PWTHENPRINT" ABORTED - MAXIMUM WIDTH IS";PW;"[157] SPACES. ":GOTO1020
380 INPUT" IS THIS O.K. (Y OR N) Y[157][157][157]";A$:IFA$<>"Y"THENPRINT:GOTO310
390 INPUT" LABEL THE COLUMNS (Y OR N) Y[157][157][157]";A$:IFLEFT$(A$,1)<>"Y"THEN470
400 GOSUB1090:FORJ=1TONC%
410 PRINT"LABEL FOR COLUMN";J;"-";CW(J);"SPACES"
420 PRINT" ";CHR$(34);CHR$(20);CHR$(34);
430 FORK=1TOCW(J):PRINT" ";:NEXT:A=POS(0):PRINTCHR$(34):IFA>38THENPRINT"[145]";
440 PRINT"[145]";:POKE631,29:POKE198,1:INPUTA$
450 IFLEN(A$)<>CW(J)THENPRINT"[158] ERROR!! - TRY AGAIN ":GOTO410
460 L$=L$+A$:NEXT
470 PRINT"[158]THAT FINISHES THE VERTICAL COLUMNS."
480 PRINT"NOW WE WILL DO THE HORIZONTAL ROWS,"
490 PRINT"WHICH CAN FILL UP TO";PL-1;"[158]PRINTER LINES."
500 INPUT" HOW MANY ROWS ON THE FORM";NR%:IFNR%<1THEN500
510 NW=LEN(STR$(NR%))-1:NW$=LEFT$(" ",NW)
520 INPUT"HOW MANY PRINTER LINES PER ROW";LR%:IFLR%<1THEN520
530 TL=NR%*LR%+1:DIML$(TL+2)
540 PRINT"[158]THESE ROWS TAKE UP";TL;"[158]PRINTER LINES,"
550 PRINT"INCLUDING A LINE FOR COLUMN LABELS."
560 PRINT"YOUR PAPER HAS";PL;"[158]LINES, LEAVING";PL-TL
570 PRINT"[158]LINES UNPRINTED."
580 IFTL>PLTHENPRINT" ABORTED - TOO LONG FOR THE PAPER.":GOTO1020
590 PRINT"[158]THE FORM IS";W;"[158]SPACES WIDE, LEAVING"
600 PRINT"[157]";PW-W;"[158]SPACES FOR ";
610 IFNW=<PW-WTHENPRINT"NUMBERING OR ";
620 PRINT"LABELING"
630 PRINT"ITS";NR%;"[158]HORIZONTAL ROWS."
640 IFNW>PW-WTHENPRINT"THERE IS NO ROOM TO NUMBER THEM.":GOTO690
650 INPUT" NUMBER THE ROWS (Y OR N)";A$:IFLEFT$(A$,1)<>"Y"THEN690
660 FORJ=0TOTL:L$(J)=NW$:NEXT:J=1
670 FORK=1+INT((LR%-1)/2)TOTL-1STEPLR%:L$(K)=RIGHT$(" "+STR$(J),NW):J=J+1
680 NEXT:GOTO830
690 INPUT" LABEL THE ROWS (Y OR N)";A$:IFLEFT$(A$,1)<>"Y"THEN830
700 GOSUB1090
710 INPUT" # SPACES IN LONGEST LABEL";LW
720 IFLW>PW-WTHENPRINT"[158] ERROR!! -";PW-W;"[157] MAXIMUM ":GOTO710
730 FORJ=1TOLW:LW$=LW$+" ":NEXT
740 FORJ=0TOTL:L$(J)=LW$:NEXT:J=1
750 FORK=1+INT((LR%-1)/2)TOTL-1STEPLR%
760 PRINT"LABEL FOR ROW";J;"-";LW;"SPACES"
770 PRINT" ";CHR$(34);LW$;:A=POS(0):PRINTCHR$(34):IFA>38THENPRINT"[145]";
780 PRINT"[145]";:POKE631,29:POKE198,1:INPUTA$
790 IFLEN(A$)<>LWTHENPRINT"[158] ERROR!! - TRY AGAIN ":GOTO760
800 L$(K)=A$:J=J+1:NEXT
810 :
820 REM PRINT THE FORM
830 PRINT"[158]THE FORM IS" LEFT$(STR$((LW+W)/10),5);CHR$(34);" WIDE BY";
840 PRINTLEFT$(STR$(TL/9),5);CHR$(34);" LONG,"
850 PRINT"OR";LW+W;"SPACES WIDE BY";TL;"LINES LONG."
860 PRINT"[153][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
870 PRINT" ALIGN THE PAPER IN THE PRINTER, "
880 PRINT" THEN PRESS THE 'P' KEY... "
890 GETA$:IFA$<>"P"THEN890
900 T$=CHR$(15) :REM TEXT MODE **TARGET
910 G$=CHR$(8) :REM GRAPHICS MODE (FOR LINE SPACING)
920 OPEN4,4:CMD4:GOSUB1060:PRINTL$
930 FORH=1TONR%:GOSUB1060;:FORJ=1TONC%:PRINTCHR$(207);:FORK=1TOCW(J)-1
940 IFCW(J)>1THENPRINTCHR$(163);
950 NEXT:NEXT:PRINTCHR$(165);G$:IFLR%<2THEN990
960 FORI=1TOLR%-1:GOSUB1060;:FORJ=1TONC%:PRINTCHR$(165);:FORK=1TOCW(J)-1
970 IFCW(J)>1THENPRINT" ";
980 NEXT:NEXT:PRINTCHR$(165);G$:NEXT
990 NEXT:GOSUB1060;:FORJ=1TONC%:FORK=1TOCW(J):PRINTCHR$(163);:NEXT:NEXT
1000 PRINT#4:CLOSE4: PRINT"[147][158] FORM MAKER - LOUIS F. SANDER [146] "
1010 PRINT" YOUR FORM IS FINISHED!"
1020 POKE53280,14:POKE53281,6:PRINT"[154]";
1030 END
1040 :
1050 REM ROW LABELS SUBROUTINE
1060 PRINTT$;L$(LC);:LC=LC+1:RETURN
1070 :
1080 REM LABEL SUBROUTINE
1090 PRINT"[158]ENTER THE LABELS RIGHT NOW. YOU MUST"
1100 PRINT"KEEP THEM BETWEEN THE QUOTATION MARKS,"
1110 PRINT"BUT YOU CAN CENTER THEM OR POSITION"
1120 PRINT"THEM AS YOU LIKE."
1130 RETURN