Documentation for Gordo's MC68000 Tiny BASIC version 1.0 This is an adaptation of Li Chen Wang's 'Palo Alto Tiny BASIC' for the Motorola MC68000 microprocessor. It includes more functions and program save and load. As distributed, it is set up for a Motorola MEX68KECB Educational Computer Board connected to a host CP/M computer. The source code should give you enough details to allow you to install it on a different system. If you have any problems, you can write to me at: Gordon Brandly R.R. 2 Fort Sask., AB, Canada T8L 2N8 The Language Numbers In this Tiny BASIC, all numbers are integers and must be in the range 2147483647 to -2147483648. Variables There are 26 variables denoted by the letters A through Z. There is also a single array @(I). The dimension of this array (i.e., the range of value of the index I) is set automatically to make use of all the memory space that is left unused by the program (i.e., 0 through SIZE/4, see SIZE function below). All variables and array elements are 4 bytes long. Functions There are 4 functions: ABS(X) gives the absolute value of X. RND(X) gives a random number between 1 and X (inclusive). SIZE gives the number of bytes left unused by the program. PEEK(X) gives the value of the byte at memory location X. Arithmetic and Compare Operators / Divide. (Note that since we have integers only, 2/3=0) * Multiply. - Subtract. + Add. > Greater than. (comparison) < Less than. (comparison) = Equal to. (comparison) Note that to certain versions of BASIC "LET A=B=0" means "set both A and B to 0". To this version of Tiny BASIC, it means "set A to the result of comparing B with 0". <> Not equal to. (comparison) >= Greater than or equal to. (comparison) <= Less than or equal to. (comparison) +, -, *, and / operations result in values between -2147483647 and 2147483647. (-2147483648 is also allowed in some cases.) All compare operators result in a 1 if true and a 0 if not true. Expressions Expressions are formed with numbers, variables, and functions with arithmetic and compare operators between them. + and - signs can also be used at the beginning of an expression. The value of an expression is evaluated from left to right, except that * and / are always done first, and then + and - , and then compare operators. Parentheses can also be used to alter the order of evaluation. Note that compare operators can be used in any expression. For example: 10 LET A=(X>Y)*123+(X=Y)*456+(XV)*(U<99)*(V>3) PRINT "Yes" 30 LET R=RND(100), A=(R>3)+(R>15)+(R>56)+(R>98) In line 10, A will be set to 123 if X>Y, to 456 if X=Y, and to 789 if XB, V=(A>B)*X+(A