8-Bit Software Online Conversion

Banners - Listing

10REM Banners 20REM (C) Allan Kelly 14/8/87 25REM Banners Version 006. Transferr ed to Arc 13/07/1990 30 35ONERROR GOTO 9900 40DIM chars%(94,7) 50DIM data 10 60PROCset`up 70PROCepson`codes 80PROCget`fonts 90 100MODE 7 110REPEAT 120REPEAT 130CLS 140PRINTTAB(0,0);CHR$(129);CHR$(157);C HR$(141);TAB(10,0);CHR$(131);"Printer Ba nners" 150PRINTTAB(0,1);CHR$(129);CHR$(157);C HR$(141);TAB(10,1);CHR$(131);"Printer Ba nners" 160PRINTTAB(7,2);"(C) Allan Kelly 1987 " 170 180PRINT''SPC(5);"S - Save settings" 190PRINT'SPC(5);"L - Save settings" 200PRINT'SPC(5);"C - Change settings" 210PRINT'SPC(5);"E - Enter message" 220PRINT'SPC(5);"P - Print banner" 230PRINT'SPC(5);"Q - Quit" 240 250*FX21,0 260REPEAT key$=GET$ 270UNTIL INSTR("SLCEPQ*",key$) OR INST R("slcepq*",key$) 280key=ASC(key$) AND&DF 290 300IF key=ASC"S" PROCsave 310IF key=ASC"L" PROCload 320IF key=ASC"C" PROCchange 330IF key=ASC"E" PROCmessage 340IF key=ASC"P" MODE3:PROCprint:MODE7 350IF key=10 PROCos 360UNTIL key=ASC"Q" 370UNTIL FNtest("Are you sure?") 380END 390 400DEFPROCos 410LOCAL os$,key 420REPEAT INPUT'"*"os$ 430$&C00=os$ 440X%=0 450Y%=&C 460CALL&FFF7 470*FX21,0 480key=GET 490UNTIL key<>42 500ENDPROC 510 520DEFPROCchange 530LOCAL key 540CLS 550PRINTTAB(4,0);CHR$(141);"Change Set tings" 560PRINTTAB(4,1);CHR$(141);"Change Set tings" 570PRINTTAB(0,2);"Vertical multiplier: ";vm% 580PRINTTAB(0,3);"Horizontal multiplie r:";hm% 590PRINTTAB(0,4);"Left gap:";left% 600PRINTTAB(0,5);"Top gap:";top% 610PRINTTAB(0,6);"Bottom gap:";bottom% 620PRINTTAB(0,8);"Foregound character: ";CHR$(out%);" ";out% 630PRINTTAB(0,9);"Backgound character: ";CHR$(back%);" ";back% 640PRINTTAB(0,11);"Line spacing n/216: ";space% 650 660REPEAT 670PRINTTAB(0,20);SPC(38) 680 690vm%=FNget`value(25,2,10,1,vm%) 700hm%=FNget`value(25,3,10,1,hm%) 710left%=FNget`value(25,4,88,0,left%) 720top%=FNget`value(25,5,40,0,top%) 730bottom%=FNget`value(25,6,40,0,botto m%) 740out%=FNget`ascii(25,8,126,32,out%) 750back%=FNget`ascii(25,9,126,32,back% ) 760space%=FNget`value(25,11,216,1,spac e%) 770PRINTTAB(0,20);"RETURN to repeat, S PACE for menu" 780*FX21,0 790REPEAT key=GET 800UNTIL key=13 OR key=32 810UNTIL key=32 820ENDPROC 830 840DEFPROCmessage 850LOCAL x$ 860CLS 870PRINTTAB(4,1);CHR$(141);"Message" 880PRINTTAB(4,2);CHR$(141);"Message" 890PRINT''"Current message:"message$ 900INPUT'';"New message:"x$ 910IF x$<>"" message$=x$ 920 930PRINT''"Pre message:"pre$ 940INPUT';"Pre message:"x$ 950IF x$<>"" pre$=x$ 960 970PRINT''"Post message:"post$ 980INPUT';"Post message:"x$ 990IF x$<>"" post$=x$ 1000ENDPROC 1010 1020DEFPROCprint 1030LOCAL print%,key,vh% 1040CLS 1050print%=FNtest("Printer on?") 1060PRINT"Vertical (V) or Horizontal (H )?" 1070*FX21,0 1080REPEAT key=GET AND&DF 1090UNTIL key=ASC"H" OR key=ASC"V" 1100IF key=ASC"H" vh%=FALSE ELSE vh%=TR UE 1110IF print% VDU 2,1,esc%,1,sp`code%,1 ,space% 1120IF pre$<>"" PRINTpre$' 1130IF vh% PROCvertical(message$) ELSE PROChorizontal(message$) 1140IF post$<>"" PRINTpost$' 1150IF print% VDU 3 1160PROCreturn 1170ENDPROC 1180 1190DEFPROChorizontal(x$) 1200LOCAL char,x%,hl%,y%,vl% 1210FOR char=LEN(x$) TO 1 STEP -1 1220IF top%>0 PROClines(top%) 1230FOR x%=0 TO 7 1240FOR hl%=1 TO hm% 1250PRINT'SPC(left%); 1260FOR y%=0 TO 7 1270FOR vl%=1 TO vm% 1280IF chars%(ASC(MID$(message$,char,1) )-32,y%) AND 2^x% VDU out% ELSE VDU back % 1290NEXT 1300NEXT 1310NEXT 1320NEXT 1330IF bottom%>0 PROClines(bottom%) 1340NEXT 1350ENDPROC 1360 1370DEFPROCvertical(x$) 1380LOCAL char,x%,hl%,y%,vl% 1390FOR char=1 TO LEN(x$) 1400IF top%>0 PROClines(top%) 1410FOR x%=0 TO 7 1420FOR hl%=1 TO hm% 1430PRINT'SPC(left%); 1440FOR y%=7 TO 0 STEP -1 1450FOR vl%=1 TO vm% 1460IF chars%(ASC(MID$(message$,char,1) )-32,x%) AND 2^y% VDU out% ELSE VDU back % 1470NEXT 1480NEXT 1490NEXT 1500NEXT 1510IF bottom%>0 PROClines(bottom%) 1520NEXT 1530ENDPROC 1540 1550DEFPROCsave 1560LOCAL file,file$ 1570PROCcat 1580file$=FNfile`name 1590file=OPENIN(file$) 1600IF file<>0 PRINT"File exists.":IF F Ntest("Continue?")=FALSE ENDPROC 1610CLOSE#file 1620file=OPENOUT(file$) 1630PRINT#file,vm%,hm% 1640PRINT#file,left%,top%,bottom% 1650PRINT#file,space%,out%,back% 1660PRINT#file,message$,pre$,post$ 1670CLOSE#file 1680ENDPROC 1690 1700DEFPROCload 1710LOCAL file,file$ 1720PROCcat 1730file$=FNfile`name 1740file=OPENIN(file$) 1750IF file=0 PRINT"File does not exist ":PROCreturn:ENDPROC 1760 1770INPUT#file,vm%,hm% 1780INPUT#file,left%,top%,bottom% 1790INPUT#file,space%,out%,back% 1800INPUT#file,message$,pre$,post$ 1810CLOSE#file 1820ENDPROC 1830 1840DEFPROCcat 1850IF FNtest("Catalogue?") THEN *. 1860ENDPROC 1870 1880DEFFNfile`name 1890LOCAL x$ 1900REPEAT 1910INPUT'"Filename:"x$ 1920UNTIL x$<>"" 1930:=x$ 1940 1950DEFPROCset`up 1960print%=FALSE 1970vm%=1 1980hm%=1 1990left%=0 2000out%=ASC"X" 2010back%=ASC" " 2020message$="" 2030pre$="" 2040post$="" 2050top%=0 2060bottom%=0 2070space%=36 2080ENDPROC 2090 2100DEFPROCepson`codes 2110esc%=27 2120REM line spacing code for n/216 2130sp`code%=ASC"3" 2140ENDPROC 2150 2160DEFPROCget`fonts 2170LOCAL get%,x 2180PRINT''"Reading Character fonts" 2190FOR get%=32 TO 126 2200?data=get% 2210A%=10 2220X%=data MOD 256 2230Y%=data DIV 256 2240CALL&FFF1 2250FOR x=0 TO 7 2260chars%(get%-32,x)=?(data+1+x) 2270NEXT 2280NEXT 2290ENDPROC 2300 2310DEFFNtest(x$) 2320LOCAL key 2330PRINT'x$ 2340*FX21,0 2350REPEAT key=GET AND&DF 2360UNTIL key=ASC"Y" OR key=ASC"N" 2370IF key=ASC"Y" :=TRUE 2380:=FALSE 2390 2400DEFPROCreturn 2410PRINT'SPC(10);"Press RETURN" 2420*FX21,0 2430REPEAT UNTIL GET=13 2440ENDPROC 2450 2460DEFFNget`value(x,y,max,min,v) 2470LOCAL z$,z 2480PRINTTAB(x,y); 2490INPUT z$ 2500IF z$="" z=v ELSE z=EVAL(z$) 2510IF z>=min OR z<=max PRINTTAB(x,y);z ;" " 2520IF z>max PRINTTAB(x,y);max;" MAX":z =max 2530IF z<min PRINTTAB(x,y);min;" MIN":z =min 2540:=z 2550 2560DEFPROClines(x) 2570LOCAL y 2580FOR y=1 TO y 2590PRINT' 2600NEXT 2610ENDPROC 2620 2630DEFFNget`ascii(x,y,max,min,v) 2640LOCAL z$,z 2650PRINTTAB(x,y); 2660z$=GET$ 2670IF z$=CHR$(13) z=v ELSE z=ASC(z$) 2680IF z>=min OR z<=max PRINTTAB(x,y);C HR$(z);" " 2690IF z>max PRINTTAB(x,y);CHR$(max);" MAX":z=max 2700IF z<min PRINTTAB(x,y);CHR$(min);" MIN":z=min 2710:=z 9900IF ERR=17 THEN 100 9910REPORT 9920PRINT;" at line ";ERL 9930END