Page 3 of 62
SBasic User's Manual SBasic Version 2.7 Page 3
Printed: December 5, 1999
History of SBasic
Version 2.7 fixes a bug in the GOSUB statement that only appeared if
you tried to use a variable as the argument; the code would refer to
either the wrong or an unknown variable. The resulting .asc file
could create errors during the assembler phase.
Version 2.6 fixes a bug that appeared in some programs compiled for
the 68hc12. Some DO-LOOPs or IF-ENDIFs created sections of code so
long that the 68hc12 direct branch instructions failed (target out of
range). This version treats 68hc11 and 68hc12 compilations the same;
DOs and FORs create short branches around JMP instructions. This
version also increases the number of labels, constants, and variables
that your programs can create.
Version 2.5 *finally* kills the last known bug in SB, which corrupted
comparison tests in several different loop constructs. The
distribution file contains a number of test cases that verify the bug
is finally dead (I hope!).
Version 2.4 generates all assembler literals as hex constants, rather
than decimals. It also replaces the JMP *+5 branching construct in
6812 output with a straight branch; the 6812 assembler will
automatically assign the correct branch opcode. It also fixes a bug
in the shift and roll functions, which were generating dead PSHx-PULx
instructions.
Version 2.3 adds the ~ unary operator, which generates the one's
complement of an argument. It also now reports an error if the source
file contains a DO with an UNTIL or WHILE but without a terminating
LOOP. It also now reports an error if an IF statement does not
contain a comparison clause.
Version 2.2 adds the MIN(), MAX(), MINU(), and MAXU() functions. It
also fixes a nasty bug in the assignment operator, which created bad
code if you set a variable equal to an array element.
Version 2.1 adds the COPY statement, for moving blocks of data between
areas of memory. Runtime support relies on two new library files,
COPY11.LIB and COPY12.LIB.
Version 2.0 adds support for the 68hc12 MCUs. Code output does not
take full advantage of the newer instruction set, but it's a start.
Version 1.5 fixes bugs in code generated for certain uses of peek()
and peekb(). Also fixes an obscure bug in certain array operations.
Also allows use of '_' (underscore) in function names; see description
of ASMFUNC statement below. Also cleaned up the array assignment
code; complex array index calculations seem to work fine. If you
notice any that don't, please contact me.
Version 1.4 fixes bugs in code generated for certain uses of multiply.