home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 16
/
016.d81
/
windowing
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
89 lines
50 ifll>0then63005
100 rem ***********************
110 rem simple windowing
120 rem for the commodore 64
140 rem ***********************
160 rem
170 printchr$(147):poke53280,0:poke53281,0
180 cc$=chr$(19):forx=1to23:cc$=cc$+chr$(17):next:rem cursor control
190 bl$=" ":rem 38 spaces
200 forx=1to39:line$=line$+chr$(192):next
210 gosub810 :rem poke in ml routine
220 rem
230 rem ************************
240 rem print sample text screen
250 rem ************************
260 rem
270 printchr$(147);:rem clear screen
280 printchr$(5);:rem white
290 printchr$(14);:rem lowercase
300 print"[212]his is a sample text screen."
310 print
320 printchr$(153);:rem light green
330 print"[198]ourscore and seven years ago our"
340 print"fathers brought forth on this conti-"
350 print"nent a new nation conceived in"
360 print"liberty and dedicated to the pro-"
370 print"position that all men are created"
380 print"equal. [206]ow we are engaged in a great"
390 print"civil war testing whether that nation,"
400 print"or any nation so conceived and so"
410 print"dedicated, can long endure. [215]e are"
420 print"met on a great battlefield of that war."
430 print"[215]e have come to dedicate a portion of"
440 print"that field as a final resting-place"
450 print"for those who here gave their lives"
460 print"that that nation might live. [201]t is"
470 print"altogether fitting and proper that"
480 print"we should do this..."
490 print
500 printchr$(150);:rem light red
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])"
520 printcc$;chr$(18);chr$(5);
530 print"[145][208]ress spacebar for window."
531 print"[208]ress _ to exit.";
540 printchr$(19)
550 poke198,0:wait198,1:geta$:ifa$="_"then63000
555 ifa$<>" "then550
560 sys49152:rem memorize screen
570 rem
580 rem **********************
590 rem print window over text
600 rem **********************
610 rem
620 printleft$(cc$,8);
630 printchr$(158);:rem yellow
640 printtab(6);chr$(18);chr$(176);left$(line$,19);chr$(174)
650 printtab(6);chr$(18);chr$(221);" [208]ress any key to ";chr$(221)
660 printtab(6);chr$(18);chr$(221);" eliminate window ";chr$(221)
670 printtab(6);chr$(18);chr$(221);" and go back to ";chr$(221)
680 printtab(6);chr$(18);chr$(221);" the text screen. ";chr$(221)
690 printtab(6);chr$(18);chr$(173);left$(line$,19);chr$(189)
700 printcc$;"[145]"bl$:printbl$chr$(19)
710 poke198,0:wait198,1:geta$
720 sys49214:rem recall screen
730 goto520
740 rem
750 rem
760 rem **************************
770 rem poke in save/swap routine
780 rem sys 49152 to save screen
790 rem sys 49214 to recall screen
800 rem **************************
810 forj=49152to49289:reada:pokej,a:next:return
820 data 32,124,192,162,0,189,0,4,157,0,193,189,0,5,157,0
830 data 194,189,0,6,157,0,195,189,0,216,157,0,197,189,0,217
840 data 157,0,198,189,0,218,157,0,199,202,208,217,162,216,189,0
850 data 7,157,0,196,189,0,219,157,0,200,202,208,241,96,32,124
860 data 192,162,0,189,0,193,157,0,4,189,0,194,157,0,5,189
870 data 0,195,157,0,6,189,0,197,157,0,216,189,0,198,157,0
880 data 217,189,0,199,157,0,218,202,208,217,162,216,189,0,196,157
890 data 0,7,189,0,200,157,0,219,202,208,241,96,162,0,181,217
900 data 9,128,149,217,232,224,25,208,245,96
63000 rem return to ls
63005 ifll=0thenll=1:load"sidirq v3",8,1
63006 ifll=1thenll=2:load"romusic",8,1
63007 poke51200,75:poke52106,33
63010 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
63020 poke631,13:poke632,13:poke198,2:end