          "MobileBasic 1.8" (   ).        .!!!

          .
  
 ,      .    "run"
:
10 cls
20 print ""
run
        .(10,20,30...)    ,   .

 1.

10 cls
20 print ""
30 end
run

    :
10 cls - 
20 print ""-    ""
30 end-  

(      ,       "")

  print     .     ( )  
   . 
   ,    "%". 
:
a%,x%,raketa%,1%
   ()
       !
-  ,    "$"
:
$,word$,1$

    .

     
:
x,y,fack

      (1.95  0.5)

   ?   .     %   "5".   :

%=5

    $       "",  :

$=""

      ,       "3.14"

=3.14

   

 2.

10 cls
20 s$=""
30 print s$
40 end

 
10 cls - 
20 s$=""- o s$  ""
30 print s$-    
40 end-

(     ,     "")

    :

10 cls
20 h%=1985
30 print h%

.    .   2+2

  2+2?
 :

10 cls
20 %=2
30 b%=2
40 %=%+b%
50 print %
60 end

   .?

    %=2,    ? !

   :
 
input "",%

:
10 cls
20 input " ",g%
30 print g%
40 end
 
10 cls-    ,  
20 input " ",g%-   g%
30 print g% -   
40 
   end     (      )

       .      .(   ) 
       0  100

:
%=50+mod(rnd(0),50)
:
%- ()
50 -
md-
rnd(0)- 
 50?       0  100. 
50+50=100
50-50=0 
   

  0  150

%=75+mod(rnd(0),75)

       ,      !

    :
      ,   
(fire%,Fire%,FIRE%  FiRe%-   )

     !!!

 !

3. "  "

  ""?
     ,      
if "" then " "

 :
 ""  " "

   :

 "  "  ""

 :

if %=5 then %=0

 :

if %>0 then print "--!!!"

   "and"       

:
if %>5 and %<10 then print ""

:
 %  5    %  10      
       %   6,7,8,9    (%=1,2, 20,100)   

        .

 :
10 cls
20 pas%=1742
30 input "   ",p%
40 if p%=pas% then print " "

    :
10 cls-?

20 pas%=1742-  pas%  1742(  )

30 input "   ",p%- p%

40 if p%=pas% then print " "
 p%(   )=pas%(1742)     " "

 ?
 "1742" -       20

  .
  ?   ( )           .    .  .

  ? 

  ,  .

 :
  goto

 :

10 cls
20 %=0
30 %=%+1
40 print %
50 goto 30

:
10 cls
20 %=0- %  0
 
30 %=%+1   % 1

40 print %  
50 goto 30    30    

 goto    

 :

10 cls
20 input " ",%
30 if %=3 then goto 60
40 print "  "
50 goto 10
60 print " !!!"

:

10 cls
20 input " ",%-    %

30 if %=3 then goto 60
    3     60

40 print "  "


50 goto 10    ( 10)
60 print " !!!"

        "3"

    goto  .

        

  :

for i%=0 to %
next i%
:
For i%=0- 
to %- 
(  )

%     

for i%=0 to 20

  ?

 
10 cls
15 %=0
20 for i%=0 to 5
30 %=%+1
40 print %
50 next i%

:
10 cls
15 %=0
20 for i%=0 to 5 -  ( 5 )

30 %=%+1
40 print %
50 next i% -   30

 :
   ,        .          .

  :
        . 

 :

1      0  10
2    
3  
4  

 :

10 cls
20 nomer%=5+mod(rnd(0),5)
30 input " ",you%
40 if you%=nomer% then print " ":goto 10
50 print "  "
60 goto 20
 
     6 .
   ,        .    ":"
 :

 
10 cls
20 %=2
30 b%=2
40 %=%+b%
50 print %
60 end
   

10 cls:%=2:b%=2:%=%+b%:print %:end


     .

4. ""

       - .    .

fire(0)-  "5"(   ) 

up(0) - "2" ( )

down(0)- "8" ( )

right(0)- "4"( )

left(0) -"6" ()

  

   

"1","3","7","9"         

      ?       1, 3, 7, 9   .

 

   

if fire(0) then .....

   5    .

:

if fire(0) then goto 50


 
if fire(0) then print % 

 .?

   

if left(0) then goto 150

 5. ""

  -    ,      .

     .
      .

    .

     

plot %,% 

plot-  

%-   
%- 

       %  %     

      20,50
( 20     ,  50   )

 

10 cls
20 %=20
30 %=50
40 plot %,%

               .

10 cls
20 %=50
30 %=0
40 %=%+1
50 plot %,%
60 goto 40

:
10 cls

20 %=50 (   50     )

30 %=0 (   0   , ..   ) 

40 %=%+1 (       )

50 plot %,% (   )

60 goto 40 (   40,           )
 
   .    : 

setcolor r%,g%,b%

setcolor- 

r%-  

g%-

b%-

           0  255

       

setcolor 255,255,255

 :

setcolor 0,0,0


setcolor 0,0,255


setcolor 0,255,0


setcolor 255,0,0


setcolor 255,255,0

        .

      50,50)

10 cls
20 %=50
30 %=50
40 setcolor 255,0,0
50 plot %,%

    

10 cls
20 r%=0
30 %=50
40 %=50
50 r%=r%+1
60 setcolor r%,0,0
70 plot %,%
80 if r%>255 then r%=0
90 goto 50



10 cls
20 r%=0    0
30 %=50
40 %=50
50 r%=r%+1  1   


60 setcolor r%,0,0
 

70 plot %,%

80 if r%>255 then r%=0       255   

90 goto 50    50

 !     .

        drawline    

drawline %,%,1%,1%

 %  %    ,  1%  1%  


10 cls
20 %=0
30 %=50
40 1%=100
50 1%=50
60 drawline %,%,1%,1%

   ()

drawrect %,%,w%,h%

 %  %     , w%-    h%-

10 cls
20 %=10:%=10:w%=100:h%=50

30 drawrect %,%,w%,h%

      

fillrect %,%,w%,h%

    .
          ,    ,    .
    :
1.     
2.  setcolor
3.    fillrect
4.   goto

   :
10 cls
20 x%=64+mod(rnd(0),64)
30 y%=80+mod(rnd(0),80)
40 w%=50+mod(rnd(0),50)
50 h%=50+mod(rnd(0),50)

60 r%=125+mod(rnd(0),125)

70 g%=125+mod(rnd(0),125)

80 b%=125+mod(rnd(0),125)

85 setcolor r%,g%,b%

90 fillrect x%,y%,w%,h%

100 goto 20  
 :

 drawstring

    print   .   print      ,           ,     .
    drawstring    .

drawstring s$,%,%

s$ - 
%  % 

10 cls
20 input " ",$
24 %=10:%=60

30 drawstring $,%,%

 

10 cls 
20 drawstring "",30,90

  

10 cls
20 setcolor 255,0,0
30 drawstring "",30,20

      " "    .   ,   .   .

  :
1 dol%=500

2 setcolor 0,0,0

5 fillrect 0,0,200,200

10 setcolor 255,255,0

20 drawstring " "+str$(dol%),30,40

25 drawstring " ",10,60
30 input "",stavka%
32 setcolor 0,0,0
33 fillrect 0,0,200,200
35 setcolor 150,150,150
36 drawstring "  0-10",0,50
40 input "",a%
50 d%=5+mod(rnd(0),5)

60 if a%=d% then goto 100
70 setcolor 0,0,0
71 fillrect 0,0,200,200
72 setcolor 255,0,0
73 drawstring " ",10,90
75 sleep 1000
80 dol%=dol%-stavka%
85 if dol%<0 then goto 200

90 goto 2
100 setcolor 255,255,255
101 drawstring "",20,90
110 sleep 1000
115 o%=stavka%*2
120 dol%=dol%+o%
130 goto 2

200 setcolor 0,0,0
210 fillrect 0,0,200,200
220 drawstring "GAME OVER",30,90
230 if fire(0) then goto 1
240 goto 230

  !

            .  sleep  str$ 
Sleep - ,   .

sleep 1000- 1 

sleep 500

          .
      sleep  ,     ,      . 

str$-    .      ,   .
      -$  -%,   drawstring- ,        

drawstring $,0,0

        
drawstring %,0,0      .     str$
  

drawstring str$(%),0,0

   ?

 .
   "" ( )  .   ?  !         jar     .
  GeL:

       ,    .   .

gelload "1","2"

1-    .       

2-  . 

        strela.gif,         ""
 :

gelload "","strel.gif"

   .      ? 

drawgel "",%,%

%  %-  .

     .

10 gelload "","strel.gif"
20 drawgel "",%,%

  .      ?       .

:
1.         cls.
2.      (  )      .    
3    .(   )

  sprite

  ,      .

spritegel "1","2"

1-   .

2-  

     

spritemove "",%,%

%  %- 

-  

  :

10 gelload "","imge.gif"
20 spritegel "",""
30 spritemove "",50,50

     

10 gelload "","imge.gif"
20 spritegel "",""
30 spritemove "",50,50

     spritehit.    .

     .    "",    "".       .
 :
if spritehit("","") then ---



10 gelload "x","f16.gif"
20 gelload "y","enemy.gif"
30 spritegel "x","x"
40 spritegel "y","y"
50 spritemove "x",x%,x1%
60 spritemove "y",y%,y1%
70 if spritehit("","") then goto 1000

  .

   !     .
:

10 cls
20 $="rket"
30 b$="rket.gif"
40 gelload $,b$

 ?
     ,     .     
:

10 cls
20 gelload "f1","f1.jpg"
30 x%=64: y%=100
40 spritegel "f1","f1"
50 spritemove "f1"
60 if left(0) then x%=x%-1
70 if right(0) then x%=x%+1
80 if up(0) then y%=y%-1
90 if down(0) then y%=y%+1
100 goto 50

6. " "

          (  ),     dt
  dt    ","


dt 1,10,500,7, ..

     red         read
:

read $  %

   :

10 cls
20 read $
30 print $
5000 dat 

:

10 cls

20 read $- 

30 print $  

5000 dat -

   ,     ""

 :

10 cls
20 read %
30 print %
5000 dat 50

Data       (   ).  Data   ,          . 

       ,  ,    ?

1 gelload "1","1.gif"
2 gelload "2","2.gif"
3 gelload "1","1.gif"

?     50  ?  50   50 spritegel  50 spritemove ( spritemove-           ,         )
        .         ""
          data

        ""

1 CLS
2 INPUT "",G%
3 FOR I%=0 TO G%-1
4 READ A$
5 READ B$
6 GELLOAD A$,B$
7 SPRITEGEL A$,A$
8 SPRITEMOVE A$,-200,0
9 NEXT I%

1000 DATA x1,x1.gif,x2,x2.gif

:
1 CLS

2 INPUT "",G%-  

3 FOR I%=0 TO G%-1- 

4 READ A$ -  

5 READ B$-  

6 GELLOAD A$,B$- 

7 SPRITEGEL A$,A$-   

8 SPRITEMOVE A$,-200,0 -   

9 NEXT I% - 

1000 DATA x1,x1.gif,x2,x2.gif-. 
       .
         .        
   !
:

 1000 DATA x1,x1.gif,x2,x2.gif,x3,x3.gif,n1,n1.gif,n2,n2.gif,n3,n3.gif,n4,n4.gif,n5,n5.gif,r1,r1.gif,r2,r2.gif,r3,r3.gif,r4,r4.gif,rs1,rs1.gif,rs2,rs2.gif
1001 DATA d,d.gif,n,n.gif,a1,a1.gif,a2,a2.gif,a3,a3.gif,br1,br1.gif,br2,br2.gif,b1,b1.gif,b2,b2.gif,b3,b3.gif

7. ""

   .         .  ?       ?    .  ,    dim.

dim %(5)

%-
(5)- 

  :

10 cls
20 dim %(3)
30 %(0)=50
40 %(1)=100
50 %(2)=6

:

10 cls

20 dim %(3)-  %    
   


30 %(0)=50 - 

40 %(1)=100-

50 %(2)=6-

   ?       ,      .     10   ,    :

1 plot %,% 
2 plot %,b%
3 plot c%,%
4 plot %,n%
5 ....
6 ....
7  ..

    .
  20

 :

1 cls
2 dim x%(20)
3 for i%=0 to 19
4 read a%
5 x%(i%)=a%
6 next i%
7 for i%=0 to 19
8 plot x%(i%),50
9 next i%

100 data 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,35,40,42,60,100

:

1 cls

2 dim x%(20)   %

3 for i%=0 to 19- 

4 read a%- 

5 x%(i%)=a%  %      4.
 %(i%),   (i%)    i%    0  19.   %(0),%(1)    19

6 next i%   

7 for i%=0 to 19   

8 plot x%(i%),50     %(i%),50

9 next i% 

100 data 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,35,40,42,60,100-       %

          20  

    .        ,    ,     !

 :
      ""
10 cls
20 dim x%(10)
30 dim y%(10)
40 r%=0:g%=0:b%=0
50 setcolor r%,g%,b%
60 fillrect 0,0,200,200
70 for i%=0 to 9
80 x%(i%)=64+mod(rnd(0),64)
90 y%(i%)=20+mod(rnd(0),20)
100 next i%

110 for i%=0 to 9
120 y%(i%)=y%(i%)+1
135 if g%>255 then g%=0
140 setcolor 0,g%,0
150 plot x%(i%),y%(i%)
160 if y%(i%)>176 then goto 70
170 next i%
175 g%=g%+1
180 goto 110

8. ""

   .     .   !    .  ?   ,  .     .             .       ,    ,          .      .                      . MobileBasic    . (    ).
       ?     .   :

10 d%=days(0)
20 m%=milliseconds(0)

     .       .

h%=hour(d%,m%)

mi%=minute(d%,m%)

s%=second(d%,m%)

   :

drawstring str$(h%)+":"+str$(mi%)+":"+str$(s%),30,50

  :

1 cls
2 d%=days(0)
3 m%=milliseconds(0)
4 h%=hour(d%,m%)
5 mi%=minute(d%,m%)

6 s%=second(d%,m%)

7 cls:drawstring str$(h%)+":"+str$(mi%)+":"+str$(s%),30,50

8 sleep 50

9 goto 2

9. " "

       .    messageform. 
messageform    .    ,     SMS.
:
X%=massageform(t$,o$,c$,l$,m$)

t$-
o$-  ""
c$-  ""
l$-
m$- .

       :

10 cls
20 input "",$
30 %=messageform("","","","",$)

         ,    .        .

   editform.
editform    .         SMS.

%=editform(t$,o$,c$,l$,$,%,%)

t$-
o$-  ""
c$-  ""
l$-
$-       
%-   
%- 
 0 - 
 1 - 
 2 - 
 3 - e-mail
 4 -  
 5 - url

 :

10 cls
20 w%=editform("","","","",v$,200,0)

      messageform

 :
10 cls
20 w%=editform("","","","",v$,200,0)
30 %=messageform("","","","",v$)

 

choiceform(T$,O$,C$,L$,A$,M%)

t$-
o$-  ""
c$-  ""
l$-
$- 
M%-: 
0 - 
1 - 

    .
:

10 cls
20 dim a$(3)
30 a$(0)="Start"
40 a$(1)="Options"
50 a$(2)="Exit"
60 x%=choiceform("Game","Ok","Cancel","menu",A$,0)

    .         ?  !

10 cls
20 dim a$(3)
30 a$(0)="Start"
40 a$(1)="Options"
50 a$(2)="Exit"
60 x%=choiceform("Game","Ok","Cancel","menu",A$,0)

70 if x%=0 then print "Start"
80 if x%=1 then print "options"
90 if x%=2 then print "exit"

    ,  x%=-1

10 cls
20 dim a$(3)
30 a$(0)="Start"
40 a$(1)="Options"
50 a$(2)="Exit"
60 x%=choiceform("Game","Ok","Cancel","menu",A$,0)

70 if x%=0 then print "Start"
80 if x%=1 then print "options"
90 if x%=2 then print "exit"
100 if %=-1 then goto 60

$9 " "

 , ,     .             .
     screenwidth(0)  screenheight(0)    .

w%=screenwidth(0)- 
h%=screenheight(0)-

 :      .

10 cls
20 setcolor 0,0,0
30 w%=screenwidth(0)
40 h%=screenheight(0)
50 fillrect 0,0,w%,h%
60 goto 60

           
      .

10 cls
20 setcolor 0,0,0
30 w%=screenwidth(0)
40 h%=screenheight(0)
50 fillrect 0,0,w%,h%
60 setcolor 255,255,255
70 plot w%/2,h%/2
80 goto 80

/-  . 

               . 

      (    ).     .   
X%=stringwidth(s$)- 

Y%=stringheight(s$)- 
(s$)-

     

x%=gelwidth(g$)
y%=gelheight(g$)

g$- 

: Dou Hammett