BASCOMP 2.1
What’s New in 2.1
Toolchain and compiler strongly optimized
The whole toolchain has been reworked and optimized so that there is more space for features in the compiler. Compiler binary remains at about 64k in size. The compiler itself has grown by 468 lines or 16.641 Bytes (+17.5%).
New functions, statements etc.
See the wiki page for details: Supported functions and statements
New/improved data handling
Added support for DATAB, DATA, READ, RESTORE, and CALLDATA, including numeric/string data handling and generated data segment management.
Extended file and directory support
Added CHDIR, MKDIR, RMDIR, FILES, GET, and PUT, with improved argument parsing and runtime request handling.
Improved external string array support
XALLOC, XGET$, XSET, and XFREE handling has been expanded, including better context preservation and memory-management integration. In the future, notation for external string arrays will be more compatible towards QBasic standards.
Improved hardware and DOS integration
System-level commands and functions such as DEF SEG, PEEK, POKE, INP, OUT, and CALLINT have been extended or refined.
Improved graphics support
Graphics-related commands including SCREEN, PSET, LINE, and CIRCLE have improved parsing and option handling, including color and box/fill variants.
Improved random number initialization
RANDOMIZE now supports TIMER, TIMER(), and numeric expressions, with QuickBASIC-compatible RANDOMIZE TIMER behavior.
Improved context and stack safety
Numeric, string, source, expression, string-function, and THEN/ELSE context stacks have clearer limits and better preservation/restoration logic.
Improved error handling and diagnostics
Error categories and reporting were refined for syntax errors, FOR errors, bad line numbers, missing parentheses/quotes, type mismatches, internal errors, and IF errors.
Bug fixes, general
FOR target size now supports variables.