home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 July / 1986-07.d64 / marquee_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  96 lines

  1. 100 print"[147]"spc(14)"please wait":gosub910
  2. 110 dim c1$(256),g$(256),j(256)
  3. 120 print"[147]                marquee"
  4. 130 print"enter distance of display from top"
  5. 140 input"(range:50-200; default:100)";h$
  6. 150 h=val(h$):if h=0 then h=100
  7. 160 if h<50 then h=50
  8. 170 if h>200 then h=200
  9. 180 print"enter speed":input"(range:1-9; default:5)";sp$
  10. 190 sp=val(sp$):if sp=0 then sp=5
  11. 200 if sp<1 then sp=1
  12. 210 if sp>9 then sp=9
  13. 220 print"[147]        color menu"
  14. 230 print"   1) black    9) orange"
  15. 240 print"   2) white   10) brown"
  16. 250 print"   3) red     11) light red"
  17. 260 print"   4) cyan    12) dark gray"
  18. 270 print"   5) purple  13) medium gray"
  19. 280 print"   6) green   14) light green"
  20. 290 print"   7) blue    15) light blue"
  21. 300 print"   8) yellow  16) light gray "
  22. 310 print"enter background color (default 12)":inputcl$(0)
  23. 320 cl(0)=val(cl$(0)):if cl(0)=0 then cl(0)=12
  24. 330 print"enter border color (default 14)":inputcl$(4)
  25. 340 cl(4)=val(cl$(4)):if cl(4)=0 then cl(4)=14
  26. 350 print"enter marquee color (default 1)":inputcl$(2)
  27. 360 cl(2)=val(cl$(2)):if cl(2)=0 then cl(2)=1
  28. 370 print"[147]enter your message:"
  29. 380 print " [146]";
  30. 390 poke198,0:wait198,1:getb$
  31. 400 if b$=chr$(17) or b$=chr$(145) or       b$=chr$(157) or b$=chr$(29)then390
  32. 410 print "[157]";b$;
  33. 420 if b$=chr$(34) then print chr$(34)chr$(20);
  34. 430 if b$=chr$(13) and a$<>"" then470
  35. 440 if b$=chr$(13) then370
  36. 450 if b$<>chr$(20) then a$=a$+b$:goto380
  37. 460 l=len(a$):a$=left$(a$,l-1):goto380
  38. 470 a$=a$+"     "
  39. 480 l=len(a$):a=0
  40. 490 a=a+1
  41. 500 print "[147]countdown . .";4*l-4*a+4
  42. 510 c$=mid$(a$,a,1)
  43. 520 n=asc(c$):if n>64 then n=n-64
  44. 530 if j(n)=1 then760
  45. 540 cm=0:j(n)=1
  46. 550 if n=44 or n=59 then cm=1
  47. 560 poke56334,0:poke1,51:for f=1 to 8
  48. 570 b=peek(53247+8*n+f):r$=chr$(b)
  49. 580 c1$(n)=c1$(n)+r$
  50. 590 next f:poke1,55:poke56334,129
  51. 600 d$=""
  52. 610 for d=1+cm to 21+cm
  53. 620 c2=asc(mid$(c1$(n),d,1)+chr$(0))
  54. 630 c6=(c2 and 1)*7+(c2 and 2)*56/2+(c2 and 4)*192/4
  55. 640 if d=6 then  print "[147]countdown . .";4*l-4*a+3
  56. 650 if d=12 then  print "[147]countdown . .";4*l-4*a+2
  57. 660 if d=18 then  print "[147]countdown . .";4*l-4*a+1
  58. 670 c5=(c2 and 4)*1/4+(c2 and 8)*14/8+(c2 and 16)*112/16+(c2 and 32)*128/32
  59. 680 c4=(c2 and 32)*3/32+(c2 and 64)*28/64+(c2 and 128)*224/128
  60. 690 d$=d$+chr$(c4)+chr$(c5)+chr$(c6)
  61. 700 next d
  62. 710 e$="":f$=""
  63. 720 for d=1to21 step 3
  64. 730 e$=mid$(d$,d,3):f$=f$+e$+e$+e$
  65. 740 next d
  66. 750 g$(n)=f$
  67. 760 if a<l then490
  68. 770 poke53281,cl(0)-1:poke53280,cl(4)-1
  69. 780 print"[147]":b=248:fora=2040to2047:pokea,b:b=b+1:next:poke53271,255
  70. 790 poke53277,255:fora=858to867:pokea,110+sp*15:next:sys 49158
  71. 800 sn=0:q=l-3
  72. 810 q=q+1:if q>l then q=1
  73. 820 n=asc(mid$(a$,q,1))
  74. 830 if n>64 then n=n-64
  75. 840 sn=sn+1:if sn>8 then sn=1
  76. 850 so=sn-6:if so<1 then so=so+8
  77. 860 sys49155,sn-1,340,h
  78. 870 sys49152,g$(n),sn-1
  79. 880 poke53269,peek(53269)and(255-2^(so-1))or2^(sn-1):poke53287+sn-1,cl(2)-1
  80. 890 for ct=1 to (7-sp)*25:next ct
  81. 900 goto810
  82. 910 c=0:fora=49152to49363:readb:pokea,b:c=c+b:nexta:ifc=25321thenreturn
  83. 920 print"error in data":stop
  84. 930 data 76,125,192,76,187,192,169,27,141,17,208,169,127,141,13,220,169,32,141
  85. 940 data 20,3,169,192,141,21,3,169,129,141,26,208,96,169,1,141,25,208,162
  86. 950 data 3,32,93,192,202,16,250,162,14,160,7,169,0,133,2,185,70,3,157
  87. 960 data 0,208,165,3,157,1,208,185,80,3,74,38,2,202,202,136,16,234,165
  88. 970 data 2,141,16,208,173,13,220,41,1,240,3,76,49,234,76,188,254,160,7
  89. 980 data 185,60,3,56,237,90,3,153,60,3,185,70,3,233,0,153,70,3,185
  90. 990 data 80,3,233,0,153,80,3,136,16,227,96,32,253,174,32,139,176,160,1
  91. 1000 data 177,71,153,250,0,200,192,3,208,246,32,178,192,169,0,133,254,132,253
  92. 1010 data 162,5,6,253,38,254,202,16,249,165,254,24,105,62,133,254,160,63,177
  93. 1020 data 251,145,253,136,16,249,96,32,253,174,32,158,173,76,170,177,32,178,192
  94. 1030 data 132,253,32,178,192,166,253,157,80,3,152,157,70,3,32,178,192,166,253
  95. 1040 data 132,3,96
  96.