04.03.2013 Views

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Commands<br />

Examples<br />

Connect to the following program with the terminal window at 9600 baud. Enter a value from 0 to 4.<br />

The program will jump to the label specifi ed by the value typed in. The BRANCH command is a great<br />

way to build a long conditional jump list based on some value range. User interactive menu systems<br />

are one possibility.<br />

;ALL - all_branch.bas<br />

Index var word<br />

Main<br />

Pause 1500<br />

serout s_out, i9600, [0, “Where should I jump to 0 to 4 ? -> “]<br />

Serin s_in, i9600, [dec Index]<br />

Goto Main<br />

branch index, [label0, label1, label2, label3, label4]<br />

Label0<br />

serout s_out, i9600, [13, “Label 0”]<br />

Goto Main<br />

Label1<br />

serout s_out, i9600, [13, “Label 1”]<br />

Goto Main<br />

Label2<br />

serout s_out, i9600, [13, “Label 2”]<br />

Goto Main<br />

Label3<br />

serout s_out, i9600, [13, “Label 3”]<br />

Goto Main<br />

Label4<br />

serout s_out, i9600, [13, “Label 4”]<br />

Goto Main<br />

89

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!