home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 October / Ahoy_Magazine_86-10_1986_Double_L.d64 / Environment (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  32 lines

  1. 0 poke53280,0:poke53281,6:poke646,1
  2. 1 print"commodares problem #30-2"
  3. 2 print"    what environment?":print
  4. 3 rem solution by
  5. 4 rem     jim speers
  6. 5 rem
  7. 100 dim c$(32):fori=1 to 32:read c$(i):next
  8. 110 data black,white,red,cyan,purple,green,blue,yellow,orange,brown,light red
  9. 120 data dark gray,medium gray,light green,light blue,light gray,black,white
  10. 130 data dark red,light cyan,light purple,dark green,dark blue,light yellow
  11. 140 data dark purple,dark yellow,light red,dark cyan,medium gray,light green
  12. 150 data light blue,light gray
  13. 160 z=fre(1)-65536*(sgn(fre(1)<0)):ifz>40000 then 190
  14. 170 if z<37000 then 260
  15. 180 goto 250
  16. 190 print"commodore 128":x=(NULL)(0)
  17. 200 if x>=5 then print"80 column mode":print"screen color= ";c$(16+(NULL)(6)):goto 300
  18. 210 if x=0 then print"40 column mode":print"print color= "c$((NULL)(5)):goto 280
  19. 220 if x>0 and x<5 then print"bit map mode":gosub 310:end
  20. 230 print"border color= ";c$((NULL)(4))
  21. 240 print"print color= ";c$((NULL)(5))
  22. 250 print"commodore 64":print"40-column mode":goto 270
  23. 260 print"vic 20":print"20-column mode"
  24. 270 print"print color= ";c$((peek(646)and15)+1)
  25. 280 print"screen color= ";c$((peek(53281)and15)+1)
  26. 290 print"border color= ";c$((peek(53280)and15)+1):if x<>5 then end
  27. 300 print"print color= ";c$((NULL)(5)+16):end
  28. 310 (NULL)1,0,1,"commodore 128":(NULL)1,0,2,"bit map mode"
  29. 320 x$="border color= "+c$((NULL)(4)):(NULL)1,0,3,(x$)
  30. 330 x$="screen color= "+c$((NULL)(0)):(NULL)1,0,4,(x$)
  31. 340 x$="print color= "+c$((NULL)(1)):(NULL)1,0,5,(x$):(NULL)1,0,6,str$((NULL)(0))
  32.