home *** CD-ROM | disk | FTP | other *** search
- 10 rem *** makewave.bas ***
- 20 (NULL) 0,1:(NULL) 4,1:(NULL) 1,1
- 30 (NULL) 0:poke 2604,120:(NULL) 15:rem put bit map at $2000, color map at $1c00
- 40 poke 216,32:rem set bit-map flag
- 50 poke 53265,peek(53265)or32:rem enable bit-map mode
- 60 base=8192:rem start bit map at $2000
- 70 rem *** draw base line ***
- 80 y=100:rem place y axis at midscreen
- 90 for x=0 to 319:rem draw x axis
- 100 gosub 170:next x
- 110 rem *** draw sine wave ***
- 120 for x=0 to 319 step .5
- 130 y=int(100+80*sin(x/10))
- 140 gosub 170:next x
- 150 goto 150
- 160 for x=0 to 319: rem draw x axis
- 170 col=int(x/8)
- 180 row=int(y/8)
- 190 line=y and 7
- 200 byte=base+row*320+8*col+line
- 210 bitt=7-(x and 7)
- 220 poke byte,peek(byte) or (2^bitt)
- 230 return
-