home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1998 Special / special1988a.d64 / hrprintdemo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  47 lines

  1. 100 rem 'hrprint' demo
  2. 110 if a=0 then a=1:load "hrprint", 8, 1
  3. 120 if a=1 then a=2:load "hrcharset", 8, 1
  4. 130 poke 53280,15
  5. 140 rem set sys addresses
  6. 150 in=49152: pr=49207
  7. 160 rem bi array is used to draw curve
  8. 170 for j=0 to 7:bi(j)=2^j:next
  9. 180 rem bitmap at 8192
  10. 190 base=8192
  11. 200 poke 53272,peek(53272) or 8
  12. 210 rem hi-res
  13. 220 poke 53265, peek(53265) or 32
  14. 230 rem initialize multi/rvs(2),bitmap at 8192,charset at 16384,color at 1024
  15. 240 sys in, 2, 8192, 16384, 1024
  16. 250 rem clear screen and draw curve
  17. 260 f$="":for j=1 to 40:f$=f$+chr$(32):next
  18. 270 for j=0 to 24:sys pr, 15, 0, j, f$:next
  19. 280 for y=0 to 199 step .5
  20. 290 x = int(160+40 * sin(y/10))
  21. 300 by = base+40 * (y and 248) + (y and 7)+(x and 504)
  22. 310 poke by, peek(by) or (bi(not x and 7))
  23. 320 next y
  24. 330 rem initialize hires(1),bitmap at 8192,charset at 16384,color at 1024
  25. 340 sys in, 1, 8192, 16384, 1024
  26. 350 rem print messages on hi-res screen
  27. 360 sys pr, 6, 1, 1, "print hr demo"
  28. 370 sys pr, 2, 1, 2, "(c) 1987 compute!"
  29. 380 sys pr, 1, 17, 21, "hit any key to exit"
  30. 390 sys pr, 8, 17, 5, "you can print normally"
  31. 400 rem initialize for reverse
  32. 410 sys in, 2, 8192, 16384, 1024
  33. 420 sys pr, 5, 17, 13, "or in reverse letters"
  34. 430 rem normal characters again
  35. 440 sys in, 1, 8192, 16384, 1024
  36. 450 sys pr, 14, 2, 9, "timer:"
  37. 460 sys pr, 14, 2, 17, "score:"
  38. 470 rem update score and timer
  39. 480 for j=0 to 10000
  40. 490 sys pr, 0, 8, 9, ti
  41. 500 sys pr, 0, 8, 17, j
  42. 510 get x$
  43. 520 if x$="" then next j
  44. 530 rem back to normal text screen
  45. 540 poke 53265,27:poke 53272,21
  46. 550 print chr$(147):end
  47.