Jump to content
IGNORED

BASIC Compiler Questions


Recommended Posts

Is there a general consensus on the best compiler for Atari BASIC? I'm aware that Turbo BASIC has a compiler, but I know of at least two for Atari BASIC, namely MMG BASIC Compiler and ABC BASIC Compiler. I haven't tried these yet, but I was wondering if people were familiar with these enough to offer some helpful opinions. 

 

Has anyone tried these out? Any preferences, recommendations, observations?

 

Also, off hand, does anyone know if either is compatible with BASIC XL/XE? 

 

Thanks in advance!

 

Link to comment
Share on other sites

5 hours ago, GRC7800 said:

Is there a general consensus on the best compiler for Atari BASIC? I'm aware that Turbo BASIC has a compiler, but I know of at least two for Atari BASIC, namely MMG BASIC Compiler and ABC BASIC Compiler.

As always, it depends on what you want. The TurboBasic compiler has a couple of issues and requires the turbo basic runtime to launch the crated binaries. The MMG and ABC compilers create stand-alone programs. The MMG supports floating point arithmetic, but for that reason, the binaries are not very fast. The ABC supports integer only, and compiles the code actually to some pseudo-code which is interpreted at run time, but the code is still very fast.ABC has also been used for a couple of commercial programs, mostly to obfuscinate the source. Today, however, one can de-compile ABC-compiled programs again.

  • Like 2
Link to comment
Share on other sites

I had and used the MMG BASIC compiler bitd, still have the book and disk, however what I found was the more complex

your program got, the less likely it would be to compile or if it did compile, it would crash.

 

I put that one down to wasted money.

  • Like 2
Link to comment
Share on other sites

Thanks to all for the helpful replies. 

 

My intention is to use a compiler to speed up player/missile graphics in games written in BASIC. 

 

I've never complied a BASIC program before in Atari BASIC. But, behind my Atari's back I've been carrying on an affair with MSX BASIC. (I'm so jealous of this interpreter. It's so much easier to program sprites.) Anyway, they have a complier called MSX-BASIC-KUN, apparently also referred to as X-BASIC. It's in cartridge form and complies on the fly. Speed improvement is 15 to 100 times faster depending on the instructions. My experience with this prompted me to wonder if there was something similar for BASIC XE, which I prefer for the easier programming of PM graphics. Apparently there is no compiler for BASIC XE, but there are for original Atari BASIC. 

 

I don't know why I'm so reluctant to move from BASIC XE to Turbo BASIC, but I might have to just give it a go. 

Link to comment
Share on other sites

There are three "good" compilers for Atari Basic.

TBXL

ABC (Monarch Data Systems)

MMG (actually the second release of an earlier compiler)

 

There are folks that will tell you that ABC is not a true compiler, because it is a P-code compiler. But that doesn't prevent it from being 6-7 times faster than Atari Basic, and having smaller BLOAD programs. But you must use integers, and there are workarounds to do FP math.  TBXL is great, especially if you use the linker.  It has the fastest compiled code that I'm aware of.  ABC was the first compiler released for the Atari.  I've always been partial to it.

 

Basic  XL has a runtime package included in the Basic XL toolkit.  I'm not sure if PMG is included in the runtime.  BXL is pretty slow unless you replace the math pack.  It is really slow compared to the compilers.

 

I don't know where FastBasic fits in all this.  But I don't think there is a compiler for it. (?)

  • Like 1
Link to comment
Share on other sites

On 1/2/2022 at 3:17 PM, Larry said:

There are three "good" compilers for Atari Basic.

TBXL

ABC (Monarch Data Systems)

MMG (actually the second release of an earlier compiler)

 

There are folks that will tell you that ABC is not a true compiler, because it is a P-code compiler. But that doesn't prevent it from being 6-7 times faster than Atari Basic, and having smaller BLOAD programs. But you must use integers, and there are workarounds to do FP math.  TBXL is great, especially if you use the linker.  It has the fastest compiled code that I'm aware of.  ABC was the first compiler released for the Atari.  I've always been partial to it.

 

Basic  XL has a runtime package included in the Basic XL toolkit.  I'm not sure if PMG is included in the runtime.  BXL is pretty slow unless you replace the math pack.  It is really slow compared to the compilers.

 

I don't know where FastBasic fits in all this.  But I don't think there is a compiler for it. (?)

Thanks for sharing your views. I think I'll go with ABC and see how it goes, then try TBXL later on. 

Link to comment
Share on other sites

2 hours ago, ilmenit said:

Fast Basic if you want a modern cross-compiler, Advan Optimizing if you are looking for speed similar to Action! language.

Do you have any examples of the speed of the Advan Optimizing Compiler vs. others?  Not saying you're wrong, but I don't remember it being anything close to Action!  BTW, the whole package (minus source code, IIRC) was posted here or at comp.sys.atari.8bit  I found some threads about releasing Advan into PD, but I didn't find the actual documents.

 

Edit: I find the docs for all four Advan parts at the Internet Archive, but I don't find the disk images. 

 

Found 'em:

http://advan.atarinet.com/

 

Link to comment
Share on other sites

On 1/4/2022 at 3:47 AM, ilmenit said:

Fast Basic if you want a modern cross-compiler, Advan Optimizing if you are looking for speed similar to Action! language.

The initial question was about compiling "Atari BASIC" programs, which neither of these environments directly support.

 

Link to comment
Share on other sites

  • 7 months later...
On 1/1/2022 at 11:57 PM, MrFish said:

TBXL is backward compatible with Atari BASIC. So, it can compile pretty much any Atari BASIC program. There's also a TBXL Linker available.

 

Hmmm...never thought about doing this, but that's a good idea.  I was looking into something like the MMG compiler, but this might be a better option.

Link to comment
Share on other sites

3 hours ago, rdefabri said:

TBXL is backward compatible with Atari BASIC. So, it can compile pretty much any Atari BASIC program.

I didn't realise it was compatible with Atari BASIC, just tried loading and running a game I wrote in 1983

it has VBL's, DLI's, PMG's  re-defined character sets basically (excuse the pun) just about everything

and to my surprise I worked, although as expected it runs a bit too fast.

 

I have an original version of the MMG compiler and rarely used it, I found it was always hit or miss that

the program would compile (even simple ones) and then if they did compile more often

than not they wouldn't run or just hang the machine.

 

These days it's BASIC XE if I need to prototype anything before going to machine code.

 

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Speaking of Advan, there is a utility on the utilities disk that will import Atari BASIC programs, albeit with some limitations.

 

Advan and Fast BASICs are great choices, if you’re willing to give them a try. Both have inbuilt PMG routines. 

 

There is a slightly modified version of the Compute magazine PMG routine over at Atari Wiki, in the Turbo BASIC XL section (left side > languages > BASIC > Turbo BASIC. It uses a couple of TBXL commands, but they are trivial to change  to plain Atari BASIC.

 

  • Like 2
Link to comment
Share on other sites

used MMG back in the day and it does have the option to compile without floating point (2 byte words only), so it can be very fast. It was a bit cumbersome to use, but the results were always as I intended. You just need to remember that things like GOTO X*10+1000 will not work.

Link to comment
Share on other sites

On 1/2/2022 at 11:08 AM, thorfdbg said:

As always, it depends on what you want. The TurboBasic compiler has a couple of issues and requires the turbo basic runtime to launch the crated binaries. The MMG and ABC compilers create stand-alone programs. The MMG supports floating point arithmetic, but for that reason, the binaries are not very fast. The ABC supports integer only, and compiles the code actually to some pseudo-code which is interpreted at run time, but the code is still very fast.ABC has also been used for a couple of commercial programs, mostly to obfuscinate the source. Today, however, one can de-compile ABC-compiled programs again.

Just to clarify, a compiled TBXL program can be made standalone, if it is combined with the TBXL runtime, using the TBXL linker. The result of the linking is a standalone, segmented binary load file (even convertible to tape, if needed).

For a brand new BASIC-project, I would go for FastBasic in its cross-platform flavor.

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...