home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 1 #4
/
Commodore_Disk_User_Vol.1_4_1988_-.d64
/
hires
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
66 lines
10 rem*********************************
20 rem* *
30 rem* demo program for hires *
40 rem* routines *
50 rem* *
60 rem*********************************
70 rem
80 rem
90 if a=0then a=1:load "hires.mc",8,1
100 ad=49152
110 sh=ad:rem set up hires
120 tx=ad+3:rem text restore
130 ch=ad+6:rem clear screen
140 cc=ad+9:rem clear colour
150 ph=ad+12:rem plot hires
160 pc=ad+15:rem plot colour
170 pb=ad+18:rem plot both
180 xl=251:rem x low
190 xh=252:rem x high
200 yl=253:rem y coord
210 cb=2:rem colour byte
220 px=254:rem plot indicator
230 rem
240 rem menu
250 rem
260 print "[147]"
270 print "[158] height of resolution - demo"
280 print:print tab(10);"1. random dot plot"
290 print:print tab(10);"2. random colour boxes"
300 print:print tab(10);"3. both together"
310 print:print tab(10);"[158]enter option"
320 get i$:if i$="" then 320
330 if i$>"3" or i$<"1" then 320
331 i=val(i$)
340 on i gosub 1000,2000,2000
360 sys tx:goto 260
900 rem
910 remrandom dots
920 rem
1000 poke cb,7:sys sh:poke px,1
1010 gosub 5000
1020 get i$:if i$="" then 1010
1030 return
1900 rem
1910 rem random boxes
1920 rem
2000 poke cb,7:sys sh:poke px,1
2010 gosub 6000
2020 get i$:if i$="" then 2010
2030 return
4900 rem
4910 rem do a dot
4920 rem
5000 x=int(rnd(1)*319):y=int(rnd(1)*200)
5010 poke yl,y:poke xh,int(x/256):poke xl,x-256*int(x/256)
5020 sys ph
5040 return
5900 rem
5910 rem random colour box
5920 rem
6000 x=int(rnd(1)*319):y=int(rnd(1)*200)
6010 poke yl,y:poke xh,int(x/256):poke xl,x-256*int(x/256)
6020 co=int(rnd(1)*255):poke cb,co:if i=2 then sys pc:goto 6030
6025 sys pb
6030 return