home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 16 / 016.d81 / windowing (.txt) < prev   
Commodore BASIC  |  2022-08-26  |  3KB  |  89 lines

  1. 50 ifll>0then63005
  2. 100 rem ***********************
  3. 110 rem   simple windowing
  4. 120 rem   for the commodore 64
  5. 140 rem ***********************
  6. 160 rem
  7. 170 printchr$(147):poke53280,0:poke53281,0
  8. 180 cc$=chr$(19):forx=1to23:cc$=cc$+chr$(17):next:rem cursor control
  9. 190 bl$="                                     ":rem 38 spaces
  10. 200 forx=1to39:line$=line$+chr$(192):next
  11. 210 gosub810 :rem poke in ml routine
  12. 220 rem
  13. 230 rem ************************
  14. 240 rem print sample text screen
  15. 250 rem ************************
  16. 260 rem
  17. 270 printchr$(147);:rem clear screen
  18. 280 printchr$(5);:rem white
  19. 290 printchr$(14);:rem lowercase
  20. 300 print"[212]his is a sample text screen."
  21. 310 print
  22. 320 printchr$(153);:rem light green
  23. 330 print"[198]ourscore and seven years ago our"
  24. 340 print"fathers brought forth on this conti-"
  25. 350 print"nent a new nation conceived in"
  26. 360 print"liberty and dedicated to the pro-"
  27. 370 print"position that all men are created"
  28. 380 print"equal.  [206]ow we are engaged in a great"
  29. 390 print"civil war testing whether that nation,"
  30. 400 print"or any nation so conceived and so"
  31. 410 print"dedicated, can long endure.  [215]e are"
  32. 420 print"met on a great battlefield of that war."
  33. 430 print"[215]e have come to dedicate a portion of"
  34. 440 print"that field as a final resting-place"
  35. 450 print"for those who here gave their lives"
  36. 460 print"that that nation might live.  [201]t is"
  37. 470 print"altogether fitting and proper that"
  38. 480 print"we should do this..."
  39. 490 print
  40. 500 printchr$(150);:rem light red
  41. 510 print"([198]rom [193]. [204]incoln's [199][197][212][212][217][211][194][213][210][199] [193][196][196][210][197][211][211])"
  42. 520 printcc$;chr$(18);chr$(5);
  43. 530 print"[145][208]ress spacebar for window."
  44. 531 print"[208]ress _ to exit.";
  45. 540 printchr$(19)
  46. 550 poke198,0:wait198,1:geta$:ifa$="_"then63000
  47. 555 ifa$<>" "then550
  48. 560 sys49152:rem memorize screen
  49. 570 rem
  50. 580 rem **********************
  51. 590 rem print window over text
  52. 600 rem **********************
  53. 610 rem
  54. 620 printleft$(cc$,8);
  55. 630 printchr$(158);:rem yellow
  56. 640 printtab(6);chr$(18);chr$(176);left$(line$,19);chr$(174)
  57. 650 printtab(6);chr$(18);chr$(221);" [208]ress any key to  ";chr$(221)
  58. 660 printtab(6);chr$(18);chr$(221);" eliminate window  ";chr$(221)
  59. 670 printtab(6);chr$(18);chr$(221);" and go back to    ";chr$(221)
  60. 680 printtab(6);chr$(18);chr$(221);" the text screen.  ";chr$(221)
  61. 690 printtab(6);chr$(18);chr$(173);left$(line$,19);chr$(189)
  62. 700 printcc$;"[145]"bl$:printbl$chr$(19)
  63. 710 poke198,0:wait198,1:geta$
  64. 720 sys49214:rem recall screen
  65. 730 goto520
  66. 740 rem
  67. 750 rem
  68. 760 rem **************************
  69. 770 rem poke in save/swap routine
  70. 780 rem sys 49152 to save screen
  71. 790 rem sys 49214 to recall screen
  72. 800 rem **************************
  73. 810 forj=49152to49289:reada:pokej,a:next:return
  74. 820 data 32,124,192,162,0,189,0,4,157,0,193,189,0,5,157,0
  75. 830 data 194,189,0,6,157,0,195,189,0,216,157,0,197,189,0,217
  76. 840 data 157,0,198,189,0,218,157,0,199,202,208,217,162,216,189,0
  77. 850 data 7,157,0,196,189,0,219,157,0,200,202,208,241,96,32,124
  78. 860 data 192,162,0,189,0,193,157,0,4,189,0,194,157,0,5,189
  79. 870 data 0,195,157,0,6,189,0,197,157,0,216,189,0,198,157,0
  80. 880 data 217,189,0,199,157,0,218,202,208,217,162,216,189,0,196,157
  81. 890 data 0,7,189,0,200,157,0,219,202,208,241,96,162,0,181,217
  82. 900 data 9,128,149,217,232,224,25,208,245,96
  83. 63000 rem   return to ls
  84. 63005 ifll=0thenll=1:load"sidirq v3",8,1
  85. 63006 ifll=1thenll=2:load"romusic",8,1
  86. 63007 poke51200,75:poke52106,33
  87. 63010 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
  88. 63020 poke631,13:poke632,13:poke198,2:end
  89.