Source:Manual Labels

From Eamon Wiki
Jump to navigation Jump to search
This page is a verbatim reproduction of original source material and should not be edited except for maintenance.
Description

The Applesoft BASIC source code of the Eamon utility program Manual Labels.

Source

Eamon Utilities I

Date

c. 1984

Author

John Nelson

License

The use of this item is permitted on the grounds that it's free or in the public domain.

1  REM        GENERAL PURPOSE
2  REM         LABEL PROGRAM
3  REM 
4  REM         BY JOHN NELSON
5  REM 
6  REM 
10  TEXT :D$ =  CHR$ (4)
20  FOR X = 1 TO 6
30  PRINT "LINE ";X;":";
40 L$(X) = ""
50  GET X$: PRINT X$;: IF X$ =  CHR$ (13) THEN 90
60  IF X$ =  CHR$ (8) AND  LEN (L$(X)) = 1 THEN L$(X) = "": GOTO 50
70  IF X$ =  CHR$ (8) THEN L$(X) =  LEFT$ (L$(X), LEN (L$(X)) - 1): GOTO 50
80 L$(X) = L$(X) + X$: GOTO 50
90  IF L$(X) = "" THEN L$(X) = "  ":DR$(X) = "R":DS$(X) = "R":CR$(X) = "R": GOTO 200
100  PRINT "COMP./REG.:";
110  GET CR$(X): IF CR$(X) <  > "C" AND CR$(X) <  > "R" THEN 110
120  PRINT CR$(X)
130  PRINT "DOUBLE WIDE/REG.  (D/R):";
140  GET DS$(X): IF DS$(X) <  > "D" AND DS$(X) <  > "R" THEN 140
150  PRINT DS$(X)
160  PRINT "DOUBLE STRIKE/REG. (D/R)";
170  GET DR$(X): IF DR$(X) <  > "D" AND DR$(X) <  > "R" AND DR$(X) <  > "" THEN 170
180  IF DR$(X) = "" THEN DR$ = "R"
190  PRINT DR$(X)
200  NEXT 
210  INPUT "HOW MANY LABELS:";NL
220  PRINT "TEST LABELS WANTED? (Y/N)";
230  GET YN$: IF YN$ <  > "Y" AND YN$ <  > "N" THEN 230
240  PRINT YN$: PRINT D$"PR#1"
250  IF YN$ = "Y" THEN  GOSUB 440
260  FOR N = 1 TO NL: FOR X = 1 TO 6
270  IF CR$(X) = "C" THEN CR$ =  CHR$ (15)
280  IF CR$(X) = "R" THEN CR$ =  CHR$ (18)
290  IF DS$(X) = "D" THEN DW$ =  CHR$ (14)
300  IF DS$(X) = "R" THEN DW$ = ""
310  IF DR$(X) = "D" THEN DS$ =  CHR$ (27) +  CHR$ (71)
320  IF DR$(X) = "R" THEN DS$ =  CHR$ (27) +  CHR$ (72)
330  IF CR$(X) = "R" THEN CL% = 80
340  IF CR$(X) = "C" THEN CL% = 132
350  IF DS$(X) = "D" THEN CL% =  INT (CL% / 2)
360 CL% =  INT (CL% / 8 * 3.5)
370 SP% = (CL% -  LEN (L$(X))) / 2
380 SP$ = "": FOR Y = 1 TO SP%:SP$ = SP$ + " ": NEXT Y
390  PRINT CR$;DS$;DW$;SP$;L$(X)
400  NEXT X
410  NEXT N: IF PF THEN  RETURN 
420  PRINT D$"PR#0"
430  GOTO 530
440  REM  ///PRINT TEST LABELS
450 NB = NL:NL = 1
460 PF = 1: GOSUB 260
470  PRINT D$"PR#0": PRINT "IS PRINTER ALIGNED? (Y/N)";
480  GET YN$: IF YN$ = "Y" THEN PF = 0: PRINT YN$:NL = NB: GOTO 510
490  IF YN$ <  > "N" THEN 480
500  PRINT YN$: PRINT D$"PR#1": GOTO 460
510  IF NL = 1 THEN 530
520  PRINT D$"PR#1": RETURN 
530  PRINT "MORE LABELS? (Y/N):";
540  GET YN$: IF YN$ <  > "Y" AND YN$ <  > "N" THEN 540
550  PRINT : IF YN$ = "N" THEN  END 
560  GOTO 20