home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 October
/
Ahoy_Magazine_86-10_1986_Double_L.d64
/
Environment
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
32 lines
0 poke53280,0:poke53281,6:poke646,1
1 print"commodares problem #30-2"
2 print" what environment?":print
3 rem solution by
4 rem jim speers
5 rem
100 dim c$(32):fori=1 to 32:read c$(i):next
110 data black,white,red,cyan,purple,green,blue,yellow,orange,brown,light red
120 data dark gray,medium gray,light green,light blue,light gray,black,white
130 data dark red,light cyan,light purple,dark green,dark blue,light yellow
140 data dark purple,dark yellow,light red,dark cyan,medium gray,light green
150 data light blue,light gray
160 z=fre(1)-65536*(sgn(fre(1)<0)):ifz>40000 then 190
170 if z<37000 then 260
180 goto 250
190 print"commodore 128":x=(NULL)(0)
200 if x>=5 then print"80 column mode":print"screen color= ";c$(16+(NULL)(6)):goto 300
210 if x=0 then print"40 column mode":print"print color= "c$((NULL)(5)):goto 280
220 if x>0 and x<5 then print"bit map mode":gosub 310:end
230 print"border color= ";c$((NULL)(4))
240 print"print color= ";c$((NULL)(5))
250 print"commodore 64":print"40-column mode":goto 270
260 print"vic 20":print"20-column mode"
270 print"print color= ";c$((peek(646)and15)+1)
280 print"screen color= ";c$((peek(53281)and15)+1)
290 print"border color= ";c$((peek(53280)and15)+1):if x<>5 then end
300 print"print color= ";c$((NULL)(5)+16):end
310 (NULL)1,0,1,"commodore 128":(NULL)1,0,2,"bit map mode"
320 x$="border color= "+c$((NULL)(4)):(NULL)1,0,3,(x$)
330 x$="screen color= "+c$((NULL)(0)):(NULL)1,0,4,(x$)
340 x$="print color= "+c$((NULL)(1)):(NULL)1,0,5,(x$):(NULL)1,0,6,str$((NULL)(0))