Release 4.8.12026-10-23
Patch release 4.8.1
This version 4.8.1 is a minor bugfix release for the cross-compiler, a bug crept that produced bad code in very uncommon situations.
Also included are some size optimizations, the integer IDE is now 8176 bytes.
This is the original 4.8 version release announcement:
FastBasic 4.8 has functions!
This is a long overdue release. The main language addition is user-defined integer functions, complemented by floating-point DATA arrays and a large compiler/optimizer cleanup.
Language changes:
- Adds user-defined integer functions. A PROC can return a value with RETURN expression, and the function is called from any integer expression with @name(...):
PROC Square X
RETURN X*X
ENDPROC
? @Square(5)
Calls support nested and recursive functions.
- RETURN can also be used without a value, as an early exit from a PROC. Active FOR loops are unwound before returning.
- Adds floating-point DATA arrays. Use a name ending in %:
DATA values%() = 1.0, 2.5, 3.75
The elements can be read and written like other arrays.
- %() can now be used on the left side of an assignment, allowing floating-point values to be stored through an address:
%(1536) = 0.1234
- INPUT now works correctly with BYTE and floating-point DATA arrays.
- ENDPROC can now be abbreviated as EN.. If an IF is open, EN. closes the IF first, as before.
IDE and Atari compiler changes:
- The native parser now reports an error for source lines longer than 255 characters instead of looping.
- More parser and code-size optimizations; the integer IDE remains below 8 KB.
- EN. abbreviation support is available in the native compiler too.
Fixes:
- Fixes the cross compiler's floating-point SIN/COS link failure.
- Fixes COLOR() tracking when PRINT statements are shortened by the optimizer.
- Fixes INPUT into BYTE and floating-point DATA arrays.
- Fixes -ls listings to use exactly the requested line width and to keep EOL bytes inside strings.
- Fixes ordering of DATA and PROC blocks declared on the same line in the cross compiler.
- Fixes the Windows test-runner build with newer MinGW and updates CI to the current Windows runner.
Cross Compiler:
- New pattern-based peephole optimizer with many additional rules. The test suite now checks that every peephole rule is reached.
- Constant-address POKE expressions, including symbolic byte addresses, are folded into compact NUMPOKE / BYTEPOKE forms.
- INPUT directly into a variable no longer builds and stores a temporary address.
- Unnecessary SADDR save/restore pairs around function calls are removed.
- VAR = VAR + 1 is compiled to INC VAR; other common expression sequences are also simplified.
- Function calls now produce a compile error when the target PROC has no value-returning RETURN.
- Listing fixes and stable DATA/PROC ordering.
Documentation and tests:
- Manual updated for functions, RETURN, EN., floating-point DATA and %() assignment.
- Cross-compiler manual clarifications.
- New editor test harness with 51 editor tests using the full mini65 E: emulation; the complete suite now has 161 tests.
Full Changelog: https://github.com/dmsc/fastbasic/compare/v4.8...v4.8.1
Release 4.82026-10-23
FastBasic has functions!
This is a long overdue release. The main language addition is user-defined integer functions, complemented by floating-point DATA arrays and a large compiler/optimizer cleanup.
Language changes:
- Adds user-defined integer functions. A PROC can return a value with RETURN expression, and the function is called from any integer expression with @name(...):
PROC Square X
RETURN X*X
ENDPROC
? @Square(5)
Calls support nested and recursive functions.
- RETURN can also be used without a value, as an early exit from a PROC. Active FOR loops are unwound before returning.
- Adds floating-point DATA arrays. Use a name ending in %:
DATA values%() = 1.0, 2.5, 3.75
The elements can be read and written like other arrays.
- %() can now be used on the left side of an assignment, allowing floating-point values to be stored through an address:
%(1536) = 0.1234
- INPUT now works correctly with BYTE and floating-point DATA arrays.
- ENDPROC can now be abbreviated as EN.. If an IF is open, EN. closes the IF first, as before.
IDE and Atari compiler changes:
- The native parser now reports an error for source lines longer than 255 characters instead of looping.
- More parser and code-size optimizations; the integer IDE remains below 8 KB.
- EN. abbreviation support is available in the native compiler too.
Fixes:
- Fixes the cross compiler's floating-point SIN/COS link failure.
- Fixes COLOR() tracking when PRINT statements are shortened by the optimizer.
- Fixes INPUT into BYTE and floating-point DATA arrays.
- Fixes -ls listings to use exactly the requested line width and to keep EOL bytes inside strings.
- Fixes ordering of DATA and PROC blocks declared on the same line in the cross compiler.
- Fixes the Windows test-runner build with newer MinGW and updates CI to the current Windows runner.
Cross Compiler:
- New pattern-based peephole optimizer with many additional rules. The test suite now checks that every peephole rule is reached.
- Constant-address POKE expressions, including symbolic byte addresses, are folded into compact NUMPOKE / BYTEPOKE forms.
- INPUT directly into a variable no longer builds and stores a temporary address.
- Unnecessary SADDR save/restore pairs around function calls are removed.
- VAR = VAR + 1 is compiled to INC VAR; other common expression sequences are also simplified.
- Function calls now produce a compile error when the target PROC has no value-returning RETURN.
- Listing fixes and stable DATA/PROC ordering.
Documentation and tests:
- Manual updated for functions, RETURN, EN., floating-point DATA and %() assignment.
- Cross-compiler manual clarifications.
- New editor test harness with 51 editor tests using the full mini65 E: emulation; the complete suite now has 161 tests.
Release 4.72025-01-02
The new year 2025 release!
This is a long overdue release, with many changes in many areas.
Language changes:
- Adds SIO statement
- Adds Fujinet support: NOPEN, NCLOSE, NSTATUS and NGET statements, see "nc" and "mastodon" examples.
- Support ADR for floating point variables.
- Adds %() function.
- You can now omit parentheses in string functions, like LEN "X" instead of LEN("X")
- You can omit the ; in the PRINT statements in many cases now, for example you can use PRINT "A=" A directly.
- New %TIME function that gives the time up to 24 bit precision (wrapping in about 3 days and 5 hours).
IDE and Atari compiler changes:
- Added an integer-only command line compiler, FBCI.
- The command line compiler now allows passing the file name in the command line, just use FBC PROG.BAS PROG.COM in the DOS prompt.
- A lot of size optimizations to keep the integer IDE at less than 8KB.
Fixes:
- Fixes compiling long DLI statements.
- Fixes for AND/OR mixing bools and integer operands.
- Fixes chaining COLOR() and RTAB() in PRINT statements.
- Fixes INPUT to allow reading up to 255 bytes into a string.
- Fixes to the IDE when editing long files or files without an EOL at the end, also the IDE should be slightly faster now.
Cross Compiler:
- Fixes on Windows cross compiler for filenames with spaces or Unicode characters.
- Better error messages:
- show variable names in errors,
- ASCII art with the error location,
- shows errors on missing ending of loops or ifs.
- The cross compiler now deletes intermediate files, only keeping the resulting executable.
- Adds a command line to write a "compacted" listing from the source, aiding in the writing of ten-liners or other short programs.
- The compiler searches for it's files in more than one location now, in this order:
- the FASTBASIC_HOME environment variable,
- the path to the compiler executable,
- the standard OS paths in Linux (/usr/share/fastbasic/ and /usr/local/share/fastbasic/).
This makes easier to install the compiler as an OS tool
Happy New Year 2025!
Test Release 4.7-beta1预发布2024-03-09
This is a test release for the upcoming version.
Language changes:
- Adds SIO statement
- Adds Fujinet support: NOPEN, NCLOSE, NSTATUS and NGET statements, see "nc" and "mastodon" examples.
- Support ADR for floating point variables.
- Adds %() function.
- You can now omit parentheses in string functions, like LEN "X" instead of LEN("X")
Fixes:
- Fixes compiling long DLI statements.
- Fixes for AND/OR mixing bools and integer operands.
- Fixes chaining COLOR() and RTAB() in PRINT statements.
Cross Compiler:
- Fixes on Windows cross compiler for filenames with spaces or Unicode characters.
- Better error messages:
- show variable names in errors,
- ASCII art with the error location,
- shows errors on missing ending of loops or ifs.
Release 4.62022-08-02
The Atari 5200 release!
A new major feature: now the FastBasic PC compiler can produce Atari 5200 cartridge images.
This version uses a new PC compiler, rewritten to support multiple targets with one binary, you can specify the target with the new option -t:, the available targets are:
- atari-fp: produces Atari 800 XEX programs, with support for floating-point.
- atari-int: the old "integer only" version, produces Atari 800 XEX programs that don't use the floating-point package.
- a5200: produces cartridges for the Atari 5200
- atari-cart: the same as atari-fp, but producing cartridge images for the Atari 800.
- atari-cart-int: the same as atari-int, but producing cartridge images for the Atari 800.
Read more about the Atari 5200 port in https://github.com/dmsc/fastbasic/blob/master/a5200.md
New language additions
- There are now PRINT functions that allows formatting the output for PRINT command:
- TAB() function, moves to a column multiple of a number.
- RTAB() function to right-align the next argument to a specified column.
- COLOR() function to specify the text color (or inverse mode) of the text, see #47.
- DIM can be used to declare normal variables (like DIM X$, Z), the variables are automatically initialized to 0 or empty strings.
- DATA statements can be placed in ROM instead of RAM (useful for Atari 800 cartridges or Atari 5200).
- Allows writing to more than one register in a DLI, see #45
Changes in the runtime
- The comma in prints now uses the TAB function internally, so it behaves more consistently in screen output (but in a different way that Atari BASIC).
- MOVE and -MOVE are faster, using code in zero-page.
- Fixes crash when setting DLI, #49
- More size optimizations, integer IDE is still less than 8kB of size.
Changes to the cross-compiler
- Rewritten to allow multiple targets by configuration files.
- Allows building Windows version native and ports the cross-compiler test-suite to Windows.
- Prints better compiler error messages.
- Allows defining symbols for the linker and passing arbitrary arguments.
Test Release 4.6-beta预发布2022-03-01
Full Changelog: https://github.com/dmsc/fastbasic/compare/v4.5.2...v4.6-beta
Release 4.5.22021-03-15
Minor bugfix release on top of 4.5, this fixes parsing of variable names starting with DATA or NEXT (like DATASET or NEXT_TYPE).
Release 4.52021-03-09
A big release, with a significant new language feature: you can pass parameters to procedures now.
Changes to the language:
- You can use @ to call procedures instead of EXEC (both are supported),
- You can include arbitrary characters in string constants by using the hex value, like: PRINT "Hello"$9B"World",
- PAUSE without a parameter is the same as PAUSE 0.
- PROC has a shorter abbreviation: PR.`,
- The "ADR()" function and the "&" operator now allow taking the address of a variable,
- The parser is more robust to syntax errors.
Many improvements to the editor:
- Much faster COPY/PASTE operations,
- Restores left-margin value on exit to DOS,
- Remove P/M graphics when returning to the editor from user programs.
And improvements to the cross-compiler:
- Better error messages from some syntax errors, and fixes in parsing of big numbers.
- Check for PROC and EXEC parameters mismatch.
- An option to write an expanded and indented listing from an abbreviated listing,
Release Candidate for 4.5预发布2021-02-26
This is a preview release for version 4.5, for wider testing of the new features:
The big change is a new language feature: you can pass parameters to procedures now.
Some minor changes to the language:
- You can include arbitrary characters in string constants by using the hex value, like: PRINT "Hello"$9B"World"
- PAUSE without a parameter is the same as PAUSE 0.
- PROC has a shorter abbreviation: PR.,
- The parser is more robust to syntax errors.
Many improvements to the editor:
- Much faster COPY/PASTE operations,
- Restores left-margin value on exit to DOS,
- Remove P/M graphics when returning to the editor from user programs.
And improvements to the cross-compiler:
- Better error messages from some syntax errors, and fixes in parsing of big numbers.
- Check for PROC and EXEC parameters mismatch.
- An option to write an expanded and indented listing from an abbreviated listing,
Release 4.42020-09-20
The Spring 2020 Release!
This release mainly brings many changes to the IDE to make it more usable, allows writing "shorter" code by adding more abbreviations and extends the DLI support.
The changes in the IDE:
- BREAK key handling in the IDE - this was long overdue, now you can press BREAK key to return to the IDE from your program.
- COPY/PASTE of lines to the editor, you need to press CONTROL-C to make a line to copy, then when you press CONTROL-V that line is copied after the current one. Pressing CONTROL-V multiple times copies multiple lines. This needed a change from CONTROL-V to CONTROL-I for the page-down action.
- Go to Line, pressing CONTROL-G moves the cursor to any given line, this makes editing larger programs easier.
- Allows usage of the page-up and page-down keys on the 1200XL keyboard (SHIFT-F1 and SHIFT-F2), in addition to CONTROL-U and CONTROL-I.
Changes to the language:
- Adds CLR statement, that un-dimension arrays and sets all variables to 0.
- Adds WSYNC command to the DLI, allows setting multiple lines in one DLI.
- Adds & operator for abbreviating the ADR() function.
- Allows abbreviations for some BASIC functions and operators and skipping the parenthesis on most functions, allowing to write shorter code, see the manual for details.
- Minor incompatible change: The abbreviations for ELSE, ENDIF, PMGRAPHICS and PMHPOS changed to make them more consistent.
Changes to the cross-compiler:
- Allows to compile to code that can be put in a cartridge - by removing all uses of self-modifying-code and adding a stub to copy the zeropage interpreter from ROM to RAM at startup.
- Allows accessing to DATA's from external assembly files.
- Adds a DATA FILE statement that includes binary data from external files.
- The CC65 tools are included in the distribution, you don't need to install CC65 to use the cross-compiler anymore.
And many bug-fixes!