dmsc Posted September 20, 2020 Share Posted September 20, 2020 Hi! Finally I released the new FastBasic version, with all the improvements from the last beta version and a few more fixes. From the github release text: 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 and smaller. 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. The new release is over github, download at: https://github.com/dmsc/fastbasic/releases/tag/v4.4 7 3 Quote Link to comment Share on other sites More sharing options...
Preppie Posted September 20, 2020 Share Posted September 20, 2020 Always a great day when there's a new FB release - thanks. Quote Link to comment Share on other sites More sharing options...
+Philsan Posted September 20, 2020 Share Posted September 20, 2020 Thank you very much Daniel, your work is much appreciated. Quote Link to comment Share on other sites More sharing options...
vitoco Posted September 20, 2020 Share Posted September 20, 2020 I'm testing it with my new tenliner... Thanks! ++V Quote Link to comment Share on other sites More sharing options...
tocksin Posted January 20, 2021 Share Posted January 20, 2021 Does FastBASIC do multidimentional arrays? DIM SCREEN(79,47) gives me a parsing error. Quote Link to comment Share on other sites More sharing options...
vitoco Posted January 20, 2021 Share Posted January 20, 2021 Nope. As @dmsc said some time ago, the implementation to map SCREEN(3,5) would not improve current SCREEN(3+5*80). 1 Quote Link to comment Share on other sites More sharing options...
ilmenit Posted January 25, 2021 Share Posted January 25, 2021 I'm thinking about using FastBasic for a scripting language in one project aiming 6502. Reason is that Basic is much easier to write than Pascal or C and community could use it for making simple games. Reading https://atariwiki.org/wiki/Wiki.jsp?page=FastBasic Is FastBasic done in a way that "core" of the language could be extracted to some project easily (without Atari Specific Functions, Console, IO, Floating Point, IDE, with programs precompiled to IL form)? Quote Link to comment Share on other sites More sharing options...
dmsc Posted January 25, 2021 Author Share Posted January 25, 2021 (edited) Hi! Quote I'm thinking about using FastBasic for a scripting language in one project aiming 6502. Reason is that Basic is much easier to write than Pascal or C and community could use it for making simple games. Reading https://atariwiki.org/wiki/Wiki.jsp?page=FastBasic Is FastBasic done in a way that "core" of the language could be extracted to some project easily (without Atari Specific Functions, Console, IO, Floating Point, IDE, with programs precompiled to IL form)? Yes, it is possible. The interpreter is fairly portable, and it is possible to call it simply with: lda #<bytecode_addr ldx #>bytecode_addr jsr interpreter_run At start, the interpreter closes I/O channels 1 to 7, stops sounds and clears all variables to 0 (see src/interpreter.asm file). When the interpreter encounters the END instruction (or reaches the end of the interpreted program), it restores the stack pointer and returns to the caller. The cross-compiler uses the ld65 linker, so that only the code for the used instructions is linked to the resulting binary. To modify the language (for example, to add/remove statements or functions), you need to edit the grammar at the "src/basic.syn" file, IMHO the grammar syntax is fairly easy to understand. If you have any question, just ask! Have Fun! Edited January 25, 2021 by dmsc Quote Link to comment Share on other sites More sharing options...
ilmenit Posted January 25, 2021 Share Posted January 25, 2021 Roughly how big is the interpreter? Quote Link to comment Share on other sites More sharing options...
dmsc Posted January 25, 2021 Author Share Posted January 25, 2021 Hi! 21 minutes ago, ilmenit said: Roughly how big is the interpreter? It depends on how many different tokens are used in your program - as those are only included if used. Measuring the current git version: Minimal size: 255 bytes. Using multiplications and variables: 500 bytes. Using arrays (DIM), loops: 850 bytes. PRINT adds about 40 bytes, String operations add about 100 bytes. Full game joyas.bas: 1459 bytes. Full game wazers.bas: 1613 bytes. Maximum size without FP (all the tokens, including P/M graphics and I/O): 2314 bytes. Maximum size including FP: 3202 bytes. Also, the interpreter needs from 20 to 32 bytes of ZP. Have Fun! 1 Quote Link to comment Share on other sites More sharing options...
ilmenit Posted January 25, 2021 Share Posted January 25, 2021 Wow, this is very small then! I was looking at the Tiny Basic recently considering how simple the language is and it is not really smaller: https://www.corshamtech.com/tech-tips/basic-interpreters-for-the-6502/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.