VMB
What is VMB? VMB is short for a new coding language called Varaible Manipulation BASIC.
What is VMB good for? For now nothing... but since the commands are smaller in size than
TI-BASIC commands it might soon have an advantage in size. Why would I use VMB? It is, in
my opinion, a better form of BASIC, and it utilizes many already known and loved BASIC
commands. How does VMB work? VMB scanns for 4 conditions of a line, a beggining command, a
middle command, an ending command, and a ":". The ":" seprates lines and is important to the
language. Where is there documentation on VMB? Right here.
Anything in bold is code, anything that is italics you substute what is says there, anything in red is new, and anything in blue is being taken out.</div> <div><font face="> Beggining Commands
| output command. ex. (z,t"hello"
:' | getkey. ex. :[z
:{ | input command. ex. :{z
:' | if statment. ex :'z=t
| divides 2 varibles. ex. :/zt
:+ | adds 2 varibles. ex. :+zt
:- | subtracts 2 varibles. ex. :-zt
:* | mulitiplies 2 varibles. ex :*zt
:! | displays variables or text. ex. :!z or :!"hello"
:@ | lbl. ex. :@z
:# | goto. ex. :#z
:. | pause. ex. :. or :."hello" or :.z
:## | a goto the last exicuted goto. ex. :##
:$number | is a goto a colon command. ex. :$12
Middle Commands
? | store. ex. :z?x
' | then statement. ex. :'z=t'z?x
" | ends text. ex. :"hello"
+, -, /, and * | the respective commands. ex. :+zt-cf*gc/zt or :++xtd
( and ) | seprator, cutoff. ex. :+zt-(*cf)g
number1&number2 | random integer between number 1 and 2. ex. :z&x
_ | a spacer to skip a beggining command. ex. :_'z?x'
This particular command would be useful for something like :'x=d:_'d?q'
End Commands
' | end statement. ex. :'z=t'z?x'
__ | skips both beggining and middle commands. ex. :__'
This would only be useful for something like :'x=d'd?q:x?s:0?d:__'
Example Code
:!"tunnel_game":."by_cdi_games":!"_":!"_":!"_":!"_":!"_":!"_":!"_":8?ship:0?score:6?tunnell:@start:!" ":(8,tunnel"0___0":(8,ship"v":(1,1score:[key:'ship!=2:-ship(key=24?ship:'ship!=15:+ship(key=26?ship:+tunnell-1&1?tunnell:'tunnell=0:+tunnell1?tunnell:'tunnell=13:-tunnell1?tunnell:+tunnell4?tunnelr:'ship=tunnell:#lose:'ship=tunnelr:#lose:+score1?score:#start:@lose:!score:."you lose"
The code is all one line fyi, VMB does not support true linebreaks.
Now, what would the code look like in normal BASIC for the 83+?
We'll use C for ship, D for tunnell, E for tunnelr, F for score, G for key, 0 for start, and 1 for lose
:Disp "tunnel_game"
:Pause "by_cdi games"
:Disp "_"
:Disp "_"
:Disp "_"
:Disp "_"
:Disp "_"
:Disp "_"
:Disp "_"
:8->C
:0->E
:6->D
:Lbl 0
:Disp "_"
:Output(8,D,"0___0"
:Output(8,C,"v"
:Output(1,1,F
:getKey->G
:If C!=2
:C-(G=24->C
:If C!=15
:C+(G=26->C
+randInt(-1,1->D
:If D=0
+1->D
:If D=13
-1->D
+4->E
:If C=D
:Goto 1
:If C=E
:Goto 1
:F+1->F
:Goto 0
:Lbl 1
:Disp F
:Pause "you lose"
So there you go! have fun!
©2006 CDI Games