Your code runs as expected... Remember that your C64 loop is 15 seconds long. If you hit the escape key and wait 15 seconds the program ends.
In your C64 Loop maybe just use something simple like
In your C64 Loop maybe just use something simple like
Function c64(timerval:Int) While timerval+15000 > MilliSecs() Cls Local y=0,h Repeat h=Rand(5,60) SetColor Rand(255),Rand(255),Rand(255) DrawRect 0,y,GraphicsWidth(),h y:+h Until y>=GraphicsHeight() Flip If KeyHit(KEY_ESCAPE) Then End '<------------------------------- Wend End Function