home *** CD-ROM | disk | FTP | other *** search
- 100 option base 1 :' sets lower bound of arrays at zero or one
- 120 dim line1$(100),line2$(100),line3$(100),line4$(100),line5$(100)
- 140 fullw 2: clearw 2
- 160 color 1,3,3,2,2 : fill 0,0
- 180 tc=1:th=14:te=9 :wm=2
- 200 gosub set
- 220 gotoxy 10,1: ? "L A B E L P R T vers 3.147 "
- 240 tc=2:th=12:te=1 :wm=3
- 260 gosub set
- 280 gotoxy 40,1:? "Gary Hilbert"
- 300 tc=2:th=9 :te=0 :wm=0
- 320 gosub set
- 340 gotoxy 10,5 :? "leave messages on HelpKey II "
- 360 gotoxy 10,6 : ? "or on DELPHI leave mail for KAPTANMW"
- 380 th=9
- 400 gosub set
- 420 gotoxy 10,17:? " much useful information from: "
- 440 gotoxy 10,18:? "James Luczak, ANALOG-June 1986--GEM stuff "
- 460 gotoxy 10,19:? "Mathew Spolin, ANALOG-November 1986--ALERT boxes"
- 480 gotoxy 10,20:? "COMPUTE's 1st Book of ATARI ST for file handling info"
- 500 gotoxy 10,22:? " compiled with LDW Basic Compiler v1.0"
- 520 goto fini
- 1340 fini:
- 1360 tc=1:th=9:te=0: ' normal settings
- 1380 gosub set
- 1400 for i = 1 to 1500: next i
- 1420 box$= "ok let's make labels"
- 1440 button$="continue|quit"
- 1460 icon=0:priority=1
- 1480 gosub boxform
- 1500 on keychoice goto disklabl,quitter
- 1540 disklabl: ' COMPUTE 1st book of atarti ST pg 155
- 1560 ' address list this source program works with LDW compiler
- 1580 gosub initialize
- 1600 goto readfile
- 1620 recovery:
- 1640 gosub enternames
- 1660 gosub printlist
- 1680 if c-1>recordsread then gosub writefile
- 1700 goto choice : ' the setup routine for label printing
- 1720 '
- 1740 initialize:
- 1760 c=0
- 1780 fullw 2:clearw 2
- 1800 return
- 1820 '
- 1840 readfile:
- 1860 on error goto 2900
- 1880 open "I",#1,"labelprt.dat"
- 1900 rem on error goto 0
- 1920 while not eof(1)
- 1940 c=c+1
- 1960 input #1, line1$(C),line2$(C),line3$(C),line4$(C),line5$(C)
- 1980 wend
- 2000 recordsread=c
- 2020 close #1
- 2040 retread:
- 2060 goto recovery
- 2080 '
- 2100 enternames:
- 2120 print " enter end End or END to quit inputting addresses"
- 2140 print "for MAIL or RETURN ADDRESS size | dont pass this mark"
- 2150 print "for SPECIAL mode using 3 inch label stock |"
- 2155 print "for SPECIAL mode using 3 1/2 inch label stock |"
- 2160 c=c+1
- 2180 input "line1: ";line1$(c)
- 2200 if line1$(c)="END" or line1$(c)="end" or line1$(c)="End" then goto endent
- 2220 input "line2: ";line2$(c)
- 2240 input "line3: ";line3$(c)
- 2260 input "line4: ";line4$(c)
- 2280 input "line5: ";line5$(c)
- 2300 print
- 2320 goto enternames
- 2340 endent:
- 2360 return
- 2380 '
- 2400 writefile:
- 2420 open "O",#1,"labelprt.dat"
- 2440 for i=1 to c-1
- 2460 write #1, line1$(i),line2$(i),line3$(i),line4$(i),line5$(i)
- 2480 next
- 2500 close #1
- 2520 print "the file labelprt.dat has been modified on your disk"
- 2540 print "press any key to continue":keepontruckin=inp(2)
- 2560 return
- 2580 '
- 2600 printlist:
- 2620 clearw 2
- 2640 for i=1 to c
- 2660 if line1$(i)="END" or line1$(i)="end" or line1$(i)="End" then goto nxtrev
- 2680 print i,line1$(i)
- 2700 print i,line2$(i)
- 2720 print i,line3$(i)
- 2740 print i,line4$(i)
- 2760 print i,line5$(i)
- 2780 next
- 2800 nxtrev:
- 2820 print "hit ANY key to continue"
- 2840 keepontruckin=inp(2)
- 2860 return
- 2880 '
- 2900 errtrap:
- 2920 if err=53 then goto 2040
- 2940 if err=62 then goto 2000
- 2960 print "error # ";err; "in line ";erl
- 2980 end
- 3000 choice:
- 3020 clearw 2 :fullw 2
- 3040 color 1,3 : fill 0,0
- 3060 box$="WARNING if paper-out|detector disabled,|count repeats carefully"
- 3080 button$="continue|quit"
- 3100 icon=1:priority=1
- 3120 gosub boxform
- 3140 on keychoice goto poalert,quitter
- 3160 poalert: rem this is the alert box
- 3180 box$="want to disable|printers paper-out|cutoff switch"
- 3200 button$="yes|no|quit"
- 3220 icon=2 :priority=2
- 3240 gosub boxform
- 3260 lprint chr$(27);chr$(64):rem re-initialize printer control codes
- 3280 on keychoice goto poyes,pono,quitter
- 3300 poyes: lprint chr$(27);chr$(56)
- 3320 pono:
- 3340 clearw 2
- 3360 for i = 1 to c
- 3380 if line1$(i)="END" or line1$(i)="end" or line1$(i)="End" then goto nxtpr
- 3400 print i,line1$(i)
- 3420 if i=20 then goto view
- 3421 if i=40 then goto view
- 3422 if i=60 then goto view
- 3423 if i=80 then goto view
- 3445 goto dontview
- 3450 view: ' a crude "MORE?" facility with return to top of list capability
- 3460 print " remember the number you want...and hit ANY key to continue"
- 3470 viewer=inp(2)
- 3480 if viewer = 1 then goto pono
- 3490 dontview:
- 3500 next
- 3520 nxtpr:
- 3620 picker:
- 3640 input "pick a number";pick
- 3660 input "enter number of repeats";num
- 3680 box$= "1 large MAIL label | 2 RETURN ADDRESS per label | the SPECIAL-- maximum | characters @17/inch"
- 3700 button$="mail|retrnadr|special"
- 3720 icon=0:priority=1
- 3740 gosub boxform
- 3760 on keychoice goto twomail,fourreturn,special
- 3780 fourreturn:
- 3800 width lprint 66
- 3820 lprint chr$(15):rem condensed
- 3840 lprint chr$(27);chr$(71):rem /dble-strike
- 3860 printrl:
- 3880 box$="adjust printer to|top of labels|CAUTION do not turn|printer off"
- 3900 button$="ok|quit"
- 3920 icon=3:priority=1
- 3940 gosub boxform
- 3960 on keychoice goto doitrl,quitter
- 3980 doitrl:
- 4000 for repeats=1 to num
- 4020 lprint
- 4040 x1$=line1$(pick)
- 4060 x2$=line2$(pick)
- 4080 x3$=line3$(pick)
- 4100 x4$=line4$(pick)
- 4120 x5$=line5$(pick)
- 4140 lprint x1$;tab(32);x1$
- 4160 lprint x2$;tab(32);x2$
- 4180 lprint x3$;tab(32);x3$
- 4200 lprint x4$;tab(32);x4$
- 4220 lprint x5$;tab(32);x5$
- 4240 next repeats
- 4260 goto choice
- 4280 twomail:
- 4300 width lprint 35
- 4320 lprint chr$(18):rem pica
- 4340 lprint chr$(27);chr$(71):rem /dble-strike
- 4360 printml:
- 4380 box$="adjust printer to|top of labels|CAUTION do not turn|printer off"
- 4400 button$="ok|quit"
- 4420 icon=3:priority=1
- 4440 gosub boxform
- 4460 on keychoice goto doitml,quitter
- 4480 doitml:
- 4500 for repeats=1 to num
- 4520 lprint
- 4540 x1$=line1$(pick)
- 4560 x2$=line2$(pick)
- 4580 x3$=line3$(pick)
- 4600 x4$=line4$(pick)
- 4620 x5$=line5$(pick)
- 4640 lprint x1$
- 4660 lprint x2$
- 4680 lprint x3$
- 4700 lprint x4$
- 4720 lprint x5$
- 4740 next repeats
- 4760 goto choice
- 4765 special:
- 4767 width lprint 66
- 4769 lprint chr$(15):rem condensed
- 4771 lprint chr$(27);chr$(71):rem /dble-strike
- 4773 printspc:
- 4775 box$="adjust printer to|top of labels|CAUTION do not turn|printer off"
- 4779 button$="ok|quit"
- 4781 icon=3:priority=1
- 4783 gosub boxform
- 4785 on keychoice goto doitspc,quitter
- 4787 doitspc:
- 4789 for repeats=1 to num
- 4791 lprint
- 4793 x1$=line1$(pick)
- 4795 x2$=line2$(pick)
- 4797 x3$=line3$(pick)
- 4799 x4$=line4$(pick)
- 4800 x5$=line5$(pick)
- 4802 lprint x1$
- 4804 lprint x2$
- 4806 lprint x3$
- 4808 lprint x4$
- 4810 lprint x5$
- 4812 next repeats
- 4814 goto choice
- 5600 quitter:
- 5610 goto finish
- 5620 boxform:' Subroutine to make alert box
- 5640 BOX2$=STR$(icon)+"][|"+box$+"|]["+button$+"]"
- 5660 box$=box2$
- 5680 a#=gb:gintin=peek(A#+8):gintout=peek(A#+12)
- 5700 n#=peek(A#+16):poke gintin,priority
- 5720 ' poke n#,varptr(box2$) : ' for ST Basic
- 5740 ptsp#=varptr(box2$):strngaddr#=peek(ptsp#): 'for LDW compiler
- 5960 poke n#,strngaddr#: ' modified for LDW compiler
- 5980 gemsys(52):keychoice=peek(gintout)
- 6000 return
- 6540 settings:
- 6560 set:
- 6580 poke contrl,22:'OPCODE
- 6600 poke contrl+2,0
- 6620 poke contrl+6,1
- 6640 poke intin,tc:'Text color index
- 6660 vdisys(1)
- 6680 poke contrl,106:'OPCODE
- 6700 poke contrl+2,0
- 6720 poke contrl+6,1
- 6740 poke intin,te:'Text effect word
- 6760 vdisys(1)
- 6780 ' theight
- 6800 poke contrl,12:'OPCODE
- 6820 poke contrl+2,1
- 6840 poke contrl+6,0
- 6860 poke ptsin,0
- 6880 poke ptsin+2,th:'Character height
- 6900 vdisys(1)
- 6920 charw=peek(ptsout):'Character width
- 6940 charh=peek(ptsout+2):'Character height
- 6960 cellw=peek(ptsout+4):'Cell width
- 6980 cellh=peek(ptsout+6):'Cell height
- 7000 ' THEIGHTP:
- 7020 poke contrl,107:'OPCODE
- 7040 poke contrl+2,0
- 7060 poke contrl+6,1
- 7080 poke intin,th:'Cell height
- 7100 vdisys(1)
- 7120 charw=peek(ptsout):'Character width
- 7140 charh=peek(ptsout+2):'Character height
- 7160 cellw=peek(ptsout+4):'Cell width
- 7180 cellh=peek(ptsout+6):'Cell height
- 7200 ' WMODE
- 7220 poke contrl,32:' OPCODE
- 7240 poke contrl+2,0
- 7260 poke contrl+6,1
- 7280 poke intin,wm: 'writing mode code
- 7300 vdisys(1)
- 7320 return
- 8020 finish:
- 8040 end
-