home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib33b.dsk
/
VAR.CHART.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
4KB
|
157 lines
10 REM **********************
20 REM * VAR.CHART *
30 REM * BY GARY D. CORBIN *
40 REM * COPYRIGHT (C) 1987 *
50 REM * BY MICROSPARC, INC *
60 REM * CONCORD, MA 01742 *
70 REM **********************
80 REM BRANCH AROUND ALL SUBROUTINES TO START OF MAIN PROGRAM
90 GOTO 1260
100 REM
110 REM ******************
120 REM PRINT THE TITLE LINE FOR THE CHART
130 PRINT
140 PRINT "APPLESOFT VARIABLE CHART ";
150 PRINT "PROGRAM:";: FOR I = 1 TO 24: PRINT UL$;: NEXT : PRINT "DATE:";: FOR I = 1 TO 13: PRINT UL$;: NEXT
160 PRINT
170 PRINT SPC( 34);"MARKING CODE"
180 PRINT "REAL: "VL$"---"VL$" INTEGER: "VL$" / "VL$" STRING: "VL$" "VL$; CHR$(8);"!";
190 PRINT " "VL$" ARRAY: "VL$" "BS$" "VL$
200 PRINT
210 RETURN
220 REM
230 REM *****************
240 REM PRINT THE BOTTOM TITLE LINE
250 PRINT
260 PRINT "DEFINITIONS:"
270 RETURN
280 REM
290 REM ******************
300 REM PRINT THE TOP ROW OF LETTERS
310 FOR T1 = 1 TO LEN(AL$)
320 T2$ = " " + MID$ (AL$,T1,1) +" "
330 PRINT T2$;
340 NEXT T1
350 PRINT
360 RETURN
370 REM
380 REM ****************
390 REM PRINT EACH ROW OF BOXES FOR THE TABLE
400 T2$ = UL$ +UL$ +VL$
410 FOR T1 = 1 TO LEN(BL$)
420 PRINT MID$ (BL$,T1,1);
430 FOR T2 = 1 TO 26
440 PRINT T2$;
450 NEXT T2
460 REM
470 REM IF YOUR OUTPUT COMES OUT DOUBLE-SPACED, PUT A ; AT THE END
480 REM OF THIS NEXT PRINT STATEMENT
490 PRINT MID$ (BL$,T1,1)
500 REM
510 NEXT T1
520 RETURN
530 REM
540 REM *****************
550 REM CENTER STRING P1$
560 REM P1$ ---> STRING TO DISPLAY
570 REM P1% ---> LINE ON WHICH TO DISPLAY STRING
580 REM IF P1% = 0, THEN DISPLAY AT CURRENT OUTPUT CURSOR POSITION
590 REM P2% ---> CODE TO INDICATE OUTPUT MODE
600 REM 0 ---> NORMAL
610 REM 1 ---> INVERSE
620 REM 2 ---> FLASHING
630 VTAB (P1%): HTAB (1)
640 PRINT TAB( 20 - INT( LEN(P1$)/2));
650 IF P2% = 1 GOTO 670
660 GOTO 690
670 INVERSE
680 GOTO 720
690 IF P2% = 2 GOTO 710
700 GOTO 720
710 FLASH
720 PRINT P1$;
730 NORMAL
740 PRINT
750 RETURN
760 REM
770 REM *****************
780 REM ISSUE A FORM FEED TO THE PRINTER
790 REM IF YOUR PRINTER DOESN'T USE CHR$(12), CHANGE THE VALUE
800 REM OF FF$ IN THE SETUP SECTION
810 PRINT FF$
820 RETURN
830 REM
840 REM ******************
850 REM ACTIVATE THE PRINTER. IF YOUR PRINTER IS NOT IN SLOT 1,
860 REM CHANGE THE VALUE OF PN$ IN THE SETUP SECTION
870 PRINT PN$
880 RETURN
890 REM
900 REM *******************
910 REM DE-ACTIVATE THE PRINTER
920 PRINT PF$
930 RETURN
940 REM
950 REM ***************
960 REM WAIT FOR A KEY PRESS
970 POKE -16368,0: WAIT -16384,128: POKE -16368,0
980 RETURN
990 REM
1000 REM *************
1010 REM GET A YES OR NO RESPONSE AND RETURN Y OR N IN R1$
1020 R1$ = ""
1030 GET R1$
1040 IF R1$ = "Y" OR R1$ = CHR$(121) OR R1$ = "N" OR R1$ = CHR$(110) GOTO 1060
1050 GOTO 1080
1060 PRINT R1$
1070 RETURN
1080 PRINT CHR$(7);
1090 GOTO 1020
1100 REM
1110 REM ***************
1120 REM SET UP SECTION. INITIALIZE ALL PROGRAM CONSTANTS
1130 AL$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1140 BL$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
1150 D$ = CHR$(4):UL$ = CHR$(95):BS$ = CHR$(92):VL$ = CHR$(124)
1160 REM
1170 REM CHANGE THESE VALUES TO REFLECT YOUR PRINTER CONFIGURATION
1180 REM PN$ ---> STRING TO ACTIVATE PRINTER IN SLOT 1
1190 REM PF$ ---> STRING TO DEACTIVATE THE PRINTER
1200 PN$ = D$ +"PR#1":PF$ = D$ +"PR#0"
1210 FF$ = CHR$(12)
1220 RETURN
1230 REM
1240 REM ******************
1250 REM MAIN PROGRAM STARTS HERE
1260 GOSUB 1130
1270 TEXT : HOME : SPEED= 255
1280 P1$ = "VARIBLE CHART":P1% = 2:P2% = 1
1290 GOSUB 630
1300 P1$ = "COPYRIGHT 1987":P1% = 4:P2% = 0
1310 GOSUB 630
1320 P1$ = "MICROSPARC, INC.":P1% = 5
1330 GOSUB 630
1340 P1$ = "BY GARY D. CORBIN":P1% = 8
1350 GOSUB 630
1360 PRINT : PRINT : PRINT
1370 PRINT "POSITION PAPER AND PRESS RETURN..."
1380 GOSUB 970
1390 GOSUB 870
1400 GOSUB 130
1410 GOSUB 310
1420 GOSUB 400
1430 GOSUB 310
1440 GOSUB 250
1450 GOSUB 810
1460 GOSUB 920
1470 HOME : VTAB (2)
1480 PRINT "WANT TO DO ANOTHER ONE? (Y/N) ";
1490 GOSUB 1020
1500 IF R1$ = "Y" OR R1$ = CHR$(121) GOTO 1520
1510 GOTO 1540
1520 GOTO 1270
1530 GOTO 1570
1540 HOME
1550 P1$ = "THANK YOU!!" + CHR$(7):P1% = 8
1560 GOSUB 630
1570 END