1 include {
2 "lib//Graphics.g"
3 "lib//InputDevice.g"
4 }
5 func Main <entry> {
6 int x = 0
7
8 InputDevice.UseKeyboard()
9
10 Screen.Create(640,480,32)
11 while (!Keyboard.isPushed($BTN_ALL)) {
12 //Misc.Delay(1)
13 x++
14 if (x >= 640) {
15 x = 0
16 }
17 Graphics.StartDraw(Screen)
18 Graphics.Plot(x,int(sin(double(x)*0.017453)*100.0) + 100,0x00FF00)
19 Graphics.StopDraw()
20 Screen.FlipBuffers()
21 Keyboard.Examine()
22 }
23 }
24