Jump to content

Photo

FastBasic 4.0 - Tenliners'19 release

basic compiler interpreter ide FastBasic

11 replies to this topic

#1 dmsc OFFLINE  

dmsc

    Dragonstomper

  • 508 posts
  • Location:Viņa del Mar, Chile

Posted Sun Feb 24, 2019 6:53 PM

Hi all!

To start the new year, and to provide a better Basic for all the new ten-liners, I'm releasing version 4.0 of FastBasic.

The major changes in this version are under the hood:
  • The interpreter has been changed from a stack-base virtual machine to a register plus stack, this makes the interpreter from 10% to 20% faster depending in the program. In the SIEVE.BAS benchmark, the Atari version is 13% faster and in the cross-compiler is 19% faster, but programs depending on fast PEEK and POKE should be much faster.
  • There is now a full test-suite to automatically catch regressions in the parser and interpreter, ensuring that bugs don't re-appear.
Also, there are some user visible changes:
  • There is now a command-line compiler "FBC.COM", this allows compiling large programs that don't fit in the full editor. Currently, "FBC" accepts the full floating-point syntax.
  • Added minimal support for Player/Missile graphics:
    • PMGRAPHICS (abbreviated PM.) statements setups P/M,
    • PMHMOVE (abbreviated PMH.) horizontal moving a a player/missile,
    • PMADR() returns the address of the given player/missile data.
  • Many small bugs fixed.
In this version the integer IDE is 8188 bytes in size (we still have 4 bytes less than 8K), and the floating-point IDE is 9405 bytes.

As always, full sources and binaries for Atari, Linux, Windows and MacOS are available over Github: https://github.com/d...tbasic/releases

#2 MrFish OFFLINE  

MrFish

  • 5,471 posts

Posted Mon Feb 25, 2019 3:49 PM

Manual covers and Serious Computerist site updated for the new version.

 

FastBasic v4.0 - Native Atari

 

FastBasic v4.0 - Cross Compiler

 

Great new version. Thanks for all the hard work.


Edited by MrFish, Mon Feb 25, 2019 3:53 PM.


#3 funkheld OFFLINE  

funkheld

    Moonsweeper

  • 375 posts

Posted Tue Mar 5, 2019 11:48 AM

hello thanks.

is wonderfull.

 

greeting



#4 _The Doctor__ ONLINE  

_The Doctor__

    Flux Capacitor Master Craftsman

  • 6,721 posts
  • Location:10-0-11-00:02

Posted Tue Mar 5, 2019 4:43 PM

I wonder what other tenliner releases we'll see...



#5 slx OFFLINE  

slx

    Stargunner

  • 1,789 posts
  • Location:Vienna, Austria

Posted Thu Mar 28, 2019 4:57 PM

Hi all!

To start the new year, and to provide a better Basic for all the new ten-liners, I'm releasing version 4.0 of FastBasic.


Thank you very much for this great, amazing BASIC!

I have started a 10-Liner which probably won‘t be finished by Saturday.

May I ask two questions:
[li]Is there a way to enter graphics symbols as some of them are masked by commands?[/li]
[li]Would it be possible to add Action!-style direct-to-memory variables, ie assigning integer variables to memory locations?[/li]



Gesendet von iPhone mit Tapatalk

#6 dmsc OFFLINE  

dmsc

    Dragonstomper

  • Topic Starter
  • 508 posts
  • Location:Viņa del Mar, Chile

Posted Thu Mar 28, 2019 7:38 PM

Hi!
 

Thank you very much for this great, amazing BASIC!

I have started a 10-Liner which probably wont be finished by Saturday.

May I ask two questions:
[li]Is there a way to enter graphics symbols as some of them are masked by commands?[/li]


Yes, in the IDE simply press ESC before the key you want to enter.
 

[li]Would it be possible to add Action!-style direct-to-memory variables, ie assigning integer variables to memory locations?[/li]


It is possible, but probably would need an special syntax to differentiate from standard variables, to avoid confusion in the parser, and would make the IDE a lot bigger.

I'm thinking on a syntax like:
 
 DIM @SdlSt = 560, @Color0 byte = $2c4
 @SdlSt = $1234   ' Equivalent to DPOKE 560, $1234
 @Color0 = 27     ' Equivalent to POKE $2C4, 27
Note that currently the cross-compiler already supports using standard Atari symbols with "@" at front, like " poke @CRSINH, 0 ".
  • slx likes this

#7 slx OFFLINE  

slx

    Stargunner

  • 1,789 posts
  • Location:Vienna, Austria

Posted Fri Mar 29, 2019 12:58 AM

I'm thinking on a syntax like:
 

DIM @SdlSt = 560, @Color0 byte = $2c4
 @SdlSt = $1234   ' Equivalent to DPOKE 560, $1234
 @Color0 = 27     ' Equivalent to POKE $2C4, 27
.
Sounds great, didn‘t try the cross-compiler so far. IDE bloat would be a detriment, though, and differentiating between bytes and words would probably bloat it even more. Probably mostly a tenliners feature as it is much shorter ;)


Gesendet von iPhone mit Tapatalk

#8 ascrnet OFFLINE  

ascrnet

    Chopper Commander

  • 205 posts
  • Location:Santiago, Chile

Posted Sat Mar 30, 2019 7:00 PM

Hi dmsc,

 

First of all thank you for improving FastBasic. I see that now it is super enhanced with the first version that I tested.

I already overcome all the Basic of atari for its speed, but I have the doubt I will have overcome the ACTION! language?

regards



#9 slx OFFLINE  

slx

    Stargunner

  • 1,789 posts
  • Location:Vienna, Austria

Posted Sun Mar 31, 2019 12:32 AM

Hi dmsc,
 
First of all thank you for improving FastBasic. I see that now it is super enhanced with the first version that I tested.

I already overcome all the Basic of atari for its speed, but I have the doubt I will have overcome the ACTION! language?

regards

It probably wont, but while Action! gives you more control and flexibility it also requires more code/work/knowledge for e.g. P/M graphics and has more possibilities to get bitten by sloppy code.

#10 dmsc OFFLINE  

dmsc

    Dragonstomper

  • Topic Starter
  • 508 posts
  • Location:Viņa del Mar, Chile

Posted Mon Apr 1, 2019 10:01 PM

Hi ascrnet!
 

Hi dmsc,
 
First of all thank you for improving FastBasic. I see that now it is super enhanced with the first version that I tested.

I already overcome all the Basic of atari for its speed, but I have the doubt I will have overcome the ACTION! language?

regards


Current FastBasic is a (very-fast) interpreter, so it is slower than a true compiler like Action. Remember that my goal with FastBasic is a *small* language.

But there is nothing preventing to write a compiler for FastBasic, as the language is already designed to allow easy compilation, I just need a lot of time :P .

Currently, those are my long-term projects for FastBasic:

- Parameters to PROC/EXEC;
- A simple way to call M/L procedures;
- Support for byte and word memory variables (the "@" syntax above);
- An optimizing compiler to 6502.

And last:

- Convince developers to help me in expanding FastBasic - I'm just waiting for pull requests ;)

Edited by dmsc, Mon Apr 1, 2019 10:03 PM.


#11 slx OFFLINE  

slx

    Stargunner

  • 1,789 posts
  • Location:Vienna, Austria

Posted Tue Apr 2, 2019 12:21 AM

- Convince developers to help me in expanding FastBasic - I'm just waiting for pull requests ;)


Sounds great, what kind of help are you looking for? (Most probably beyond my simple ML abilities but maybe theres something low-grade assemblers can contribute as well.

#12 dmsc OFFLINE  

dmsc

    Dragonstomper

  • Topic Starter
  • 508 posts
  • Location:Viņa del Mar, Chile

Posted Tue Apr 2, 2019 7:25 PM

Hi!
 

Sounds great, what kind of help are you looking for? (Most probably beyond my simple ML abilities but maybe theres something low-grade assemblers can contribute as well.


Well, you can (IMHO in order of difficulty):

- Add examples and review the documentation. Recently 777ismyname helped me by reviewing all the manual, you can see his work at: https://github.com/d...6c36df40558ae3a

- Add test to the testsuite at https://github.com/d...testsuite/tests, you add a ".bas" file with a test and a ".chk" file with the expected output, see https://github.com/d...ts/testproc.chk and https://github.com/d...ts/testproc.bas . Currently, not all functions are tested.

- Add issues for missing or wanted features.

- Help with optimizing!. there are probably still many simple ways to remove a few bytes, current git version is 86 bytes shorter than v4.0, and fixes a pair of bugs. See https://github.com/d...a7748c9975197c1for a simple size optimization in the parser.

- Proposing new statements or functions. See https://github.com/d...d642829cf29dcb5for what is needed to add a simple statement - this only adds a parser script, or see https://github.com/d...d642829cf29dcb5 for how to add a statement with a new assembly language procedure.

Have fun!
  • NRV likes this





Also tagged with one or more of these keywords: basic, compiler, interpreter, ide, FastBasic

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users