MICRO-BASIC:

This is a small INTEGER BASIC interpreter that I wrote a number
of years ago, and subsequently ported to MICRO-C.

Variables:
	260 Numeric	  variables	:	A0-A9 ... Z0-Z9
	260 Character variables	:	A0$-A9$ ... Z0$-Z9$
	260 Numeric arrays		:	A0()-A9() ... Z0()-Z9()

	For convenience the '0' variables can be referenced by letter
	only. IE: A is equivalent to A0 ... Z$ is equivalent to Z0$

Statements:
	BEEP freq,ms			- Generate a BEEP on the PC speaker
	CLEAR					- Erase variables only
	CLOSE#n					- Close file (0-9) opened with OPEN
	DATA					- Enter "inline" data statements
	DELAY ms				- Stops for the indicated time
	DIM var(size)[, ... ]	- Dimension an array
	DOS "comand"			- Execute a DOS program
	END						- Terminate program with no message
	EXIT					- Terminate MICRO-BASIC
	FOR v=init TO limit [STEP increment] - Perform a counted loop
	GOSUB line				- Call a subroutine
	GOTO  line				- Jump to line
	IF test THEN line		- Conditional goto
	IF test THEN statement	- Conditional statement (next statement only)
	INPUT var				- Get value for variable
	INPUT "prompt",var		- Get value of variable with prompt
		prompt must be a constant string, however you can use a char variable
		in prompt by concatinating it to such a string: INPUT ""+a$,b$
	INPUT#n,var				- Get value for variable from file (0-9)
	LET (default)			- variable = expression
	LIF test THEN statements- LONG IF (all statements to end of line)
	LIST [start,[end]]		- List program lines
	LIST#n ...				- List program to file (0-9)
	LOAD "name"				- Load program from disk file
		When LOAD is used within a program, execution continues with the
		first line of the newly loaded program. In this case, the user
		variables are NOT cleared. This provides a means of chaining
		to a new program, and passing information to it.
		Also note that LOAD must be the LAST statement on a line.
	NEW						- Erase program and variables
	NEXT [v]				- End counted loop
	OPEN#n,"name","opts"	- Open file (0-9), opts are same as "fopen()"
	ORDER line				- Position data read pointer
	OUT port,expr			- Write to I/O port
	PRINT expr[,expr ...]	- Print to console
	PRINT#n,...				- Print to file (0-9)
	READ var[,var ...]		- Read data from program statements
		You MUST issue an "ORDER" statement targeting a line
		containing a valid DATA statement before using READ
	RETURN					- Return from subroutine
	REM						- Comment... reminder of line is ignored
	RUN [line]				- Run program
	SAVE ["name"]			- Save program to disk file
	STOP					- Terminate program & issue message

Operators:
	+						- Addition, string concatination
	-						- Unary minus, subtraction
	*, /, %,				- multiplication, division, modulus
	&, |, ^					- AND, OR, Exclusive OR
	=, <>					- Assign/test equal, test NOTequal (num or string)
	<, <=, >, >=			- LT, LE, GT, GE (numbers only)
	!						- Unary NOT
		The "test" operators (=, <>, <, <=, >, >=) can be used in any
		expression, and evaluate to 1 of the test is TRUE, and 0 if it
		is FALSE. The IF and LIF commands accept any non-zero value to
		indicate a TRUE condition.

Functions:
	CHR$(value)				- Returns character of passed value
	STR$(value)				- Returns ASCII string of value's digits
	ASC(char)				- Returns value of passed character
	NUM(string)				- Convert string to number
	ABS(value)				- Returns absolute value of argument
	RND(value)				- Returns random number from 0 to (value-1)
	KEY()					- Test for key from keyboard
	INP(port)				- Read an I/O port


MICRO-BASIC 2.1 line renumbering program.

This program reads a MICRO-BASIC source file, and write a new one with
all lines renumbered. All IF/THEN, GOTO, GOSUB and ORDER statements are
adjusted to reflect the new line numbers.

