print 'starting uBasic demo'; for i= 0 to 5 { print 'i=', i ; for j=1 to 2 {print 'i*j=', i*j;}; }; print 'done' ; end; @ print 'uBasic demo'; print 'cmd line input=', a ; for i= 0 to 5 { print 'i=', i ; k = 0 ; if i=2 {print 'if i=2'; } ; while k<3 {for j=1 to 2 {print 'i*j+k=', i*j+k ;}; k=k+1; delay 10;}; }; print 'done' ; end; @ a = 100 ; i = 10 ; print a, i ; end; @ print 'Blink LED' ; i = 0; while i<50 { outputA 1,-1 ; delay 100 ; i = i+1 ; }; end; @ # Enter 1=on 0=off -1=toggle on b cmd ; print 'cmd line input=', a ; i = 0; while i<50 { outputA 1, a ; delay 100 ; i = i+1 ; }; end; @ outputA(bits,set/clr/toggle) 1=on 0=off -1=toggle # E A test comment ; i = -1 ; # another comment ; print i ; end ; @