GRC7800 Posted January 2, 2022 Share Posted January 2, 2022 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! Quote Link to comment Share on other sites More sharing options...
+MrFish Posted January 2, 2022 Share Posted January 2, 2022 TBXL is backward compatible with Atari BASIC. So, it can compile pretty much any Atari BASIC program. There's also a TBXL Linker available. 2 Quote Link to comment Share on other sites More sharing options...
+David_P Posted January 2, 2022 Share Posted January 2, 2022 I seem to recall a simple, limited type-in compiler in an early ANALOG or Antic. It's been years since I foolishly sold my collection, otherwise I'd be digging it out right now 1 Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted January 2, 2022 Share Posted January 2, 2022 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. 2 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted January 2, 2022 Share Posted January 2, 2022 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. 2 Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted January 2, 2022 Share Posted January 2, 2022 47 minutes ago, TGB1718 said: 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 second that 100%. This is the reason why I use ABC. 2 Quote Link to comment Share on other sites More sharing options...
GRC7800 Posted January 2, 2022 Author Share Posted January 2, 2022 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. Quote Link to comment Share on other sites More sharing options...
+David_P Posted January 2, 2022 Share Posted January 2, 2022 There are a number of canned M/L PMG routines available to speed up BASIC programs. One place to start would be Compute's First Book of Atari Graphics, chapter five. https://www.atariarchives.org/c1bag/ 1 Quote Link to comment Share on other sites More sharing options...
+Larry Posted January 2, 2022 Share Posted January 2, 2022 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. (?) 1 Quote Link to comment Share on other sites More sharing options...
GRC7800 Posted January 4, 2022 Author Share Posted January 4, 2022 On 1/2/2022 at 2:18 PM, David_P said: There are a number of canned M/L PMG routines available to speed up BASIC programs. One place to start would be Compute's First Book of Atari Graphics, chapter five. https://www.atariarchives.org/c1bag/ Thanks! I haven't checked this book out, yet. I will now! I really appreciate it! Quote Link to comment Share on other sites More sharing options...
GRC7800 Posted January 4, 2022 Author Share Posted January 4, 2022 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. Quote Link to comment Share on other sites More sharing options...
ilmenit Posted January 4, 2022 Share Posted January 4, 2022 Fast Basic if you want a modern cross-compiler, Advan Optimizing if you are looking for speed similar to Action! language. 2 Quote Link to comment Share on other sites More sharing options...
+Larry Posted January 4, 2022 Share Posted January 4, 2022 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/ Quote Link to comment Share on other sites More sharing options...
ilmenit Posted January 4, 2022 Share Posted January 4, 2022 Take a look at this comparison. There are 2 versions of the Advan and there was used the one with optimizer. https://atariage.com/forums/topic/240919-mad-pascal/?do=findComment&comment=4466794 1 Quote Link to comment Share on other sites More sharing options...
+Larry Posted January 4, 2022 Share Posted January 4, 2022 Very interesting! Quote Link to comment Share on other sites More sharing options...
+MrFish Posted January 8, 2022 Share Posted January 8, 2022 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. Quote Link to comment Share on other sites More sharing options...
rdefabri Posted August 16, 2022 Share Posted August 16, 2022 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. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted August 16, 2022 Share Posted August 16, 2022 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. 2 Quote Link to comment Share on other sites More sharing options...
777ismyname Posted September 22, 2023 Share Posted September 22, 2023 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. 2 Quote Link to comment Share on other sites More sharing options...
pirx Posted September 25, 2023 Share Posted September 25, 2023 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. Quote Link to comment Share on other sites More sharing options...
baktra Posted October 2, 2023 Share Posted October 2, 2023 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. 1 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.