8-Bit Software Online Conversion

Basic Envelope Printer - Listing

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