Jump to content

Photo

FastBasic - Summer Release

basic compiler interpreter ide

104 replies to this topic

#101 dmsc ONLINE  

dmsc

    Moonsweeper

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

Posted Thu Jan 10, 2019 9:41 PM

Hi!
 

Hello,
 
So, I'm a little lost.
 
How much free memory fastbasic provides ?
 
Cheers
 
Devwebcl

 
 

Booting the FastBasic 3.5 atr disk, loading FBI.com, entering PRINT FRE() in the editor, then pressing CTRL-R to parse/compile/execute shows 30755 after that tiny bit of code. When compiling as an executable to disk, the FRE() amount will be less (around 2K less or so) bc of the inclusion of the runtime. Using FB.COM the above sample will yield about 29467.
 
dsmc has done a fantastic job with his BASIC.


Yes, in the IDE you have about 31200 bytes free at the start, this will be used by the program source (in the editor) and the compiled code.

But, if you compile the program to disk (pressing CONTROL-W on the ide) you have about 37600 bytes free, because you don't have the compiler, editor and source in memory, only your program code and runtime.

And finally, if you compile with the cross compiler (from a PC), you will have more free memory because the cross compiler includes only the parts of the runtime that are used.

#102 777ismyname OFFLINE  

777ismyname

    Star Raider

  • 92 posts
  • Location:Blue Ridge Mountains, North Carolina

Posted Fri Jan 11, 2019 2:41 AM

I had no clue there was a cross compiler...I must check this out! You have developed a fantastic piece of software.

Hi!
 
 
 

Yes, in the IDE you have about 31200 bytes free at the start, this will be used by the program source (in the editor) and the compiled code.

But, if you compile the program to disk (pressing CONTROL-W on the ide) you have about 37600 bytes free, because you don't have the compiler, editor and source in memory, only your program code and runtime.

And finally, if you compile with the cross compiler (from a PC), you will have more free memory because the cross compiler includes only the parts of the runtime that are used.


Sent from my ASUS PadFone X using Tapatalk

#103 tebe ONLINE  

tebe

    Dragonstomper

  • 790 posts
  • Location:Poland

Posted Tue Jan 15, 2019 5:48 AM

curiosity COMAL-80, still in use

https://en.wikipedia.org/wiki/COMAL

#104 _The Doctor__ ONLINE  

_The Doctor__

    Flux Capacitor Master Craftsman

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

Posted Wed Jan 16, 2019 12:00 AM

curiosity COMAL-80, still in use

https://en.wikipedia.org/wiki/COMAL

but alas not on any Atari save possibly Amiga?



#105 dmsc ONLINE  

dmsc

    Moonsweeper

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

Posted Wed Jan 16, 2019 2:25 PM

Hi!
 

curiosity COMAL-80, still in use

https://en.wikipedia.org/wiki/COMAL

  

but alas not on any Atari save possibly Amiga?


Well, almost all "extended" BASICs for the Atari are really similar to COMAL, as the keywords are an extension to the BASIC ones, like "PROC/EXEC", "WHILE", "REPEAT", "IF/ELSE/ELIF/ENDIF", etc. Main difference is the ":=" for assignment in COMAL instead of "=" in BASIC.

Comparing FastBasic and COMAL, I think the main differences are:
- COMAL allows line numbers (but only as an editor facility)
- COMAL has procedure parameters. I did not add procedure parameters to FastBasic (yet) as my goal was 8kB for the integer version.
- FastBasic does not have GOTO, COMAL allows GOTO to labels. Adding GOTO to FastBasic is really complicated, as you have to unroll the stack to jump from inside a FOR or PROC to outside, and I don't like needing "POP" (like Atari BASIC) to fix the stack.
- FastBasic does not have CASE/WHEN. I don't think this is that useful a feature, as the same can be written with "IF/ELIF".
- FastBasic uses the Atari I/O statements (OPEN with numeric arguments and IOCB number).

I tend to see COMAL as another step in the evolution from the classic BASICs of the '60 to the advanced BASICs of the '90 like QuickBasic.





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

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users