Help Translating a BASIC 7.0 Script to BASIC 2.0
I wrote a small program on the C128 to plot a sin function and I'm using basic 7.0-exclusive commands to draw onto the HiRes bitmap (graphics mode 1). I'm wondering if anyone could be able to help me translate it into a script that would run on the C64 with basic 2.0, because POKE's scare me and Google doesn't seem to have my answers. Here is the program:
1 GRAPHIC 1
HiRes Mode
3 SCNCLR
Clear graphics screen
5 LOCATE 0,100 : DRAWTO 320,100
Draw horizonal bar
7 LOCATE 160,0 : DRAWTO 160,200
Draw vertical bar
9 LOCATE 0,100
Move to position where function will begin drawing
10 FOR X = 1 TO 320
X axis, display is 320 pixels wide
15 S = X * PI / 160
convert X from degrees to radians
20 Y = INT(100+100*SIN(S))
Scale funtion to screen size
25 DRAWTO X,Y
Draw to next point
30 NEXT
increment X
I'm new to Commodore BASIC programming so please give me any suggestions to improve/optimize my code. Thanks!