home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 19 / 019.d81 / headliner (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  81 lines

  1. 10 print chr$(147):print:print"choose printing mode"
  2. 11 print" 1: regular upper case"
  3. 12 print" 2: upper & lower case"
  4. 13 print" 3: reversed characters"
  5. 20 getk$:ifk$<>"1"andk$<>"2"andk$<>"3"then 20
  6. 21 ifk$="1"then sa=53248:open4,4:tp=15:printchr$(142):goto 30
  7. 22 ifk$="2"then sa=55296
  8. 23 ifk$="3"then sa=56320
  9. 25 printchr$(14):open4,4,7:tp=17
  10. 30 printchr$(147):print" one moment please....":gosub 6000
  11. 40 forx=1to4:read mx(x):next
  12. 42 data 10,20,80,40
  13. 50 print chr$(8);chr$(147):printtab(15)"headliner"
  14. 55 if sa=56320 thenprint"reverse mode"
  15. 60 print:print:print" choose a size":print
  16. 71 print" 1: 10 characters per line"
  17. 72 print" 2: 20 characters per line"
  18. 73 print" 3: standard size"
  19. 74 print" 4: standard double width"
  20. 75 print" 5: quit program"
  21. 80 getk$:ifk$=""then80
  22. 85 if asc(k$)<49 or asc(k$)>53 then 80
  23. 90 k=val(k$)
  24. 95 ifk=5 then close4:printchr$(9):goto5995
  25. 100 print:print:print" do you want it centered?  (y/n)"
  26. 105 getc$:ifc$<>"y"andc$<>"n"then105
  27. 110 print#4,chr$(15);chr$(tp);
  28. 115 ifk=2then print#4,chr$(8);
  29. 120 ifk=4then print#4,chr$(14);
  30. 200 print chr$(147):print" size";k:nl=1
  31. 205 print" a maxiumn of";mx(k);"letters per line"
  32. 210 input" how many lines of this size";nl:ifnl=0 then50
  33. 220 print"type a \ for menu":print:print
  34. 225 for l=1 to nl
  35. 230 print"line";l;:w$(l)="":input w$(l)
  36. 232 if w$(l)="\"then50
  37. 235 if len(w$(l))>mx(k) then print "last line too long":goto 230
  38. 240 next
  39. 251 if k=1 then d=1:gosub 6200
  40. 252 if k=2 then d=0:gosub 6200
  41. 253 ifk=3 or k=4 then gosub 300
  42. 260 goto 50
  43. 300 for l=1 to nl:print#4,
  44. 310 t=40-len(w$(l))/((k=3)*-1+1)
  45. 320 a%=t/10+48:b%=t-(a%-48)*10+48
  46. 330 ifc$="y"then print#4,chr$(16)chr$(a%)chr$(b%);
  47. 340 print#4,w$(l):next
  48. 350 return
  49. 5995 load"hello connect",8
  50. 5999 rem*** the headliner subroutines
  51. 6000 rem peek into rom character set
  52. 6010 dim p(7,21),b%(7,128),l$(21),s$(1),w$(30)
  53. 6020 l$(0)="":s$(0)="":s$(1)=" "
  54. 6030 forx=1to3:l$(0)=l$(0)+chr$(255):next
  55. 6040 forx=1to3:s$(0)=s$(0)+chr$(128):next
  56. 6049 rem turn keyboard off & switch in character rom
  57. 6050 poke56334,peek(56334)and254:poke1,peek(1)and251
  58. 6070 for c=0 to 127:for x=0 to 7
  59. 6080 b%(x,c)=peek(sa+x+c*8):next:next
  60. 6099 rem switch in i/o & turn keyboard back on
  61. 6100 poke1,peek(1)or4:poke56334,peek(56334)or1
  62. 6130 b%(1,49)=56:b%(2,49)=24
  63. 6140 return
  64. 6200 rem prints big letters
  65. 6210 for wd=1to nl:w$=w$(wd)
  66. 6212 ifw$=""then 6355
  67. 6230 for y=1to len(w$)
  68. 6240 l$(y)=mid$(w$,y,1):c=asc(l$(y))
  69. 6250 if c>64 then c=c-64:if c>127 then c=c-64
  70. 6260 forx=0to7:p(x,y)=b%(x,c):next:next
  71. 6270 t=40-len(w$)*(2+2*d):a%=t/10+48:b%=t-(a%-48)*10+48
  72. 6290 forx=0to7:print#4,
  73. 6300 ifc$="y"then print#4,chr$(16)chr$(a%)chr$(b%);
  74. 6310 fory=1to len(w$)
  75. 6320 forpw=7to 0 step-1
  76. 6330 if p(x,y)<>(p(x,y)or2^pw) then print#4,s$(d);:next:goto6350
  77. 6340 print#4,l$(y*d);:next
  78. 6350 next:next
  79. 6355 print#4,:print#4,:next
  80. 6360 return
  81.