10 REM Automatic Envelope Addresser 20 REM By Mark Ainsworth 30 REM 1990 for the Public Domain 40 : 50 MODE 7 60 DIM address$(21) 70 PROCread_data 80 PROCwait 90 IF G$="Q" THEN END 100 REPEAT 110 PROCprint_data 120 PROCwait 130 UNTIL G$="Q" 140 END 150 : 160 DEF PROCread_data 170 READ roller% 180 READ env_length% 190 READ space% 200 addr_no%=1 210 REPEAT 220 READ address$(addr_no%) 230 addr_no%=addr_no%+1 240 UNTIL address$(addr_no%-1)="" 250 ENDPROC 260 : 270 DEF PROCprint_data 280 PRINT'"PRINTING" 290 VDU 2 300 VDU 21 310 FOR move%=1 TO roller%+env_length%/2-1 320 PRINT 330 NEXT 340 addr_no%=1 350 REPEAT 360 PRINT SPC(space%);address$(addr_no%); 370 IF address$(addr_no%+1)="" THEN PRINT"." ELSE PRINT"," 380 addr_no%=addr_no%+1 390 UNTIL address$(addr_no%)="" 400 FOR move%=1 TO env_length%/3*2 410 PRINT 420 NEXT 430 VDU 6 440 VDU 3 450 I%=INKEY(200) 460 ENDPROC 470 : 480 DEF PROCwait 490 CLS 500 PRINT"Place your envelope at the top of the friction feed mechanism." 510 PRINT"Press any key when you are ready" 520 PRINT"Press Q to quit" 530 G$=GET$ 540 ENDPROC 550 : 560 REM Distance the envelope travels from when you put the envelope into the printer to when the top of the envelope is at the print head (use your line feed button to find this out) 570 DATA 16 580 : 590 REM Length of envelope (use your line feed button to find this out) 600 DATA 26 610 : 620 REM Number of spaces you want before the address 630 DATA 10 640 : 650 REM Address (Up to 20 lines). Must finish with a blank DATA statement 660 DATA "Duncan M. Webster" 670 DATA "7, Ashdale" 680 DATA "Thringstone" 690 DATA "Leicestershire" 700 DATA "LE6 4LW" 710 DATA