5 CLS$=CHR$(26)
10 REM "ADDRESSR.BAS" COPR 1983 MARK GARDNER
20 ELITE$ = CHR$(27)+"E" :EDGE=4 : CENTER = 36 : TRACTOR = 1
25 ' Enter Return Address in Lines 20 - 70
30 DATA "Robert J. Thomson"
40 DATA "1808 Lenore Drive"
50 DATA "Tacoma, WA, 98406"
60 DATA ""
70 DATA ""
80 DIM A$(25,4) : FOR I = 0 TO 4 : READ RETADR$(I) : NEXT I : PRINT
85 PRINT CLS$:PRINT:PRINT:PRINT
90 RETFLAG = 1 : PRINT "Choose one: 'E' for envelopes"
100 PRINT "            'L' for labels"
110 PRINT "            '<RETURN> to exit program"; : GOSUB 810
120 PRINT ANS$ : PRINT : IF ANS$="L" OR ANS$="l" THEN GOTO 140
130 GOTO 160
140	GOSUB 790
150	GOTO 180
160 IF ANS$<>"E" AND ANS$<>"e" THEN SYSTEM
170 GOSUB 800
180 PRINT "Choose one: <RETURN> for regular operation "
190 PRINT "            'N' for no return addresses "
200 PRINT "            'S' for self-addressed sets"
210 PRINT "            'C' for combination of 'N' and 'S' ";: GOSUB 810
220 PRINT ANS$ : PRINT
230 IF ANS$="N" OR ANS$="n" OR ANS$="C" OR ANS$="c" THEN RETFLAG = 0
240 IF ANS$="S" OR ANS$="s" OR ANS$="C" OR ANS$="c" THEN GOTO 730
250 PRINT "        "+WHAT$+"Addressing Program; Enter Addresses --"
260 PRINT "        Terminate each address with one empty line." : PRINT
270 ADDRESS = 0 : ALINE = 0
280 GOSUB 840
290 A$(ADDRESS,ALINE) = C$ : PRINT
300 IF A$(ADDRESS,ALINE) <> "" THEN GOTO 380
310	LINES(ADDRESS) = ALINE - 1
320	PRINT "        Hit return if address Ok, 'N' if not";
330	GOSUB 810
340	IF ANS$="N" OR ANS$="n" THEN GOTO 360
350	ADDRESS = ADDRESS + 1
360 PRINT CHR$(13)+"       Enter address (#"ADDRESS+1") or a '.' to start printing."
370 ALINE = 0 : PRINT : GOTO 280
380 IF A$(ADDRESS,ALINE)="." THEN GOTO 410
390	ALINE = ALINE + 1 : IF ALINE = 5 THEN PRINT : GOTO 310
400	GOTO 280
410 MAXADR = ADDRESS - 1 : ADDRESS = 0
420 PRINT "Insert "+WHAT$+" in printer, hit <RETURN>" : INPUT DUMMY
430 LPRINT ELITE$;
440 IF RETFLAG=1 THEN FOR I = 0 TO 4 : LPRINT SPC(MARGIN1) RETADR$(I) : NEXT I
450 IF RETFLAG=1 AND LABELS=0 THEN LPRINT
460 IF RETFLAG=0 AND LABELS=0 THEN FOR I = 1 TO 7 : LPRINT : NEXT I
470 IF RETFLAG=1 THEN LPRINT
480 FOR I = 0 TO LINES(ADDRESS) : LPRINT SPC(MARGIN2) A$(ADDRESS,I) : NEXT I
490 IF LABELS = 1 THEN GOTO 510
500 FOR I = 0 TO 3 :LPRINT : NEXT I : GOTO 530
510 EXTRA = 5-((LINES(ADDRESS)+1) MOD 6)
520 FOR I = 0 TO EXTRA : LPRINT : NEXT I
530 ADDRESS = ADDRESS + 1 :IF ADDRESS > MAXADR THEN GOTO 560
540 IF LABELS=0 THEN GOTO 420
550 IF LABELS=1 THEN GOTO 440
560 PRINT : PRINT "Done! Enter 'R' to restart ... OR"
570 PRINT "Hit <RETURN> to annotate addresses "; : GOSUB 810
580 PRINT ANS$ : PRINT : IF ANS$="R" OR ANS$="r" THEN RUN
590 IF SELFFLAG = 1 THEN PRINT "SAE's -- skipping annotation" : RUN
600 PRINT "Put paper in printer (top of form) and enter date - ";: GOSUB 840
610 PRINT : LPRINT "        Mail sent -- notes for " C$ : LPRINT : LINES =0
620 FOR J = 0 TO MAXADR
630	FOR I = 0 TO LINES(J): PRINT SPACE$(10)+A$(J,I) : NEXT I
640	PRINT "Give annotation to go with the above address:" : GOSUB 840
650	LPRINT : LPRINT SPACE$(10)+C$ : LINES = LINES+2 : PRINT : PRINT
660	FOR I = 0 TO LINES(J) : LPRINT SPACE$(20)+A$(J,I)
670	  LINES = LINES + 1 : NEXT I
680	IF LINES < 55 THEN GOTO 710
690	  LPRINT CHR$(12) : LPRINT : LPRINT : LINES = 0
700	  IF TRACTOR = 0 THEN INPUT "Put in new page, hit <RETURN>."; DUMMY
710 NEXT J
720 RUN
730 INPUT "How many sets do you want?"; NUMSLF
740 IF NUMSLF > 25 THEN NUMSLF = 25
750 FOR J = 0 TO NUMSLF-1
760	FOR I = 0 TO 4
762	    A$(J,I) = RETADR$(I)
766	NEXT I
770	LINES(J) = 4
775 NEXT J
780 MAXADR = NUMSLF-1
782 SELFFLAG = 1
784 GOTO 420
790 LABELS = 1:WHAT$ = "LABELS" : MARGIN1 = EDGE : MARGIN2 = EDGE : RETURN
800 LABELS = 0:WHAT$ = "ENVELOPE ": MARGIN1 = 1 : MARGIN2 = CENTER : RETURN
810 ANS$ = INKEY$ : IF ANS$ = "" THEN GOTO 810
820 IF ANS$ =CHR$(13) THEN ANS$ = ""
830 RETURN
840 C$ = ""
850 B$ = INKEY$ : IF B$ = CHR$(13) THEN RETURN
860 IF B$ <> CHR$(8) AND B$ <> CHR$(127) THEN GOTO 890
870 PRINT CHR$(8)+" "+CHR$(8);
880 IF LEN(C$)>0 THEN C$=LEFT$(C$,LEN(C$)-1) : GOTO 850
890 PRINT B$; : C$ = C$ + B$ : GOTO 850
 PRINT CHR$(8)+" "+CHR$(8);
880 IF LEN(C$)>0 THEN C$=LEFT$(C$,L