home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / prt / banner.100 < prev    next >
Text File  |  2006-10-19  |  3KB  |  29 lines

  1. 0 'BANNER.BA - BY Mark Lutton 
  2. 1 'CLUB 100 Library - 415/939-1246 BBS,    937-5039 NEWSLETTER, 932-8856 VOICE
  3. 2 MAXFILES=2:DIMB(8):B1=30481:B2=30960:CLS:PRINT"    BANNER.100 v1.0 by Mark Lutton    ":PRINT:PRINT"This program will print a banner on your printer or to any file.  The text of":PRINT"the banner must be in a file.":PRINT:GOSUB29
  4. 5 CLS:FILES:LINEINPUT"Input file? ";F1$:IFF1$=""THEN5
  5. 6 LINEINPUT"Output file (ENTER for LPT:)? ";F2$:IFF2$=""THENF2$="LPT:
  6. 7 CLS:PRINT"Banner prints sideways on your printer, thus height expansion depends on the ":PRINT"printer's width.  Each character is 8   positions high.  Height expansion of 10 will fill an 80-column print line.":PRINT:GOSUB29
  7. 9 CLS:PRINT"Screen pixels are square but most       printers print 10 characters per inch   and 6 lines per inch.":PRINT"Width expansion should be 3/5 of height expansion, or 4/5 if printing 8 lines  per inch.
  8. 11 H=10:W=6:INPUT"Height expansion (ENTER for 10)";H:INPUT"Width expansion (ENTER for 6)";W:CLS:PRINT"Character used for printing must be one that your printer can print.  It might  not look on the printer like it does on the screen.
  9. 13 C$="":INPUT"Character to use for printing (ENTER to print each character with itself)";C$:IFLEN(C$)>1THENC$=LEFT$(C$,1)
  10. 14 LM=1:INPUT"Left margin for printer(ENTER for 1)";LM:IFLM<1THENLM=1
  11. 15 R$="":INPUT"Print line feed after each line";R$:R1$=LEFT$(R$,1):IFR1$="Y" ORR1$="y"THENLF=1ELSEIFR1$="N" ORR1$="n"THENLF=0ELSE15
  12. 16 CLS:PRINT"If you are using the maximum width of   your printer, and your printer does an  automatic return at the last column,    resulting in double-spacing, answer     the next question 'Y'.
  13. 17 R$="":INPUT"Suppress return in last column";R$:R1$=LEFT$(R$,1):IFR1$="Y" ORR1$="y"THENEL=0ELSEIFR1$="N" ORR1$="n"THENEL=1ELSE17
  14. 18 OPENF1$FORINPUTAS1:OPENF2$FOROUTPUTAS2
  15. 19 IFEOF(1)THEN33
  16. 20 L$=INPUT$(1,1):L=ASC(L$):IFL<32THENFORI=1TOW*6:GOSUB31:NEXTI:GOTO19
  17. 21 IFC$=""THENL1$=L$ELSEL1$=C$
  18. 22 IFL<128THENBS=B1+(L-32)*5:S=5ELSEBS=B2+(L-128)*6:S=6
  19. 23 FORI=1TOS:K=PEEK(BS):B(0)=K AND128:B(1)=K AND64:B(2)=K AND32:B(3)=K AND16:B(4)=K AND8:B(5)=K AND4:B(6)=K AND2:B(7)=K AND1:FORJ=1TOW:IFLM>1THENFORK=1TOLM:PRINT#2," ";:NEXTK
  20. 25 FORK=0TO7:FORI1=1TOH:IFB(K)THENPRINT#2,L1$;ELSEPRINT#2," ";
  21. 26 NEXTI1:NEXTK:IFELTHENGOSUB31
  22. 27 NEXTJ:BS=BS+1:NEXTI:IFS=5THENFORI=1TOW:GOSUB31:NEXTI
  23. 28 GOTO19
  24. 29 PRINT"        Hit any key to continue.
  25. 30 A$=INKEY$:IFA$=""THEN30ELSERETURN
  26. 31 PRINT#2,:IFLFTHENPRINT#2,CHR$(10);
  27. 32 RETURN
  28. 33 CLOSE1,2:MENU:LM=LEFTMARGINFORPRINTING.L$=ACHARACTERFROMFILEFORMAINLOOP.L=ASCVERSION:R$,R1$=VARIABLESFORYES/NORESPONSES.:I,J,K:ITERATIONVARIABLES.
  29.