Jump to content
IGNORED

8-Bit BASIC Compilers -- HELP!


Recommended Posts

Back in junior high, I wrote a lot of games in Atari BASIC, on my 800XL. Later, I purchased an old 800 from somebody, and it came with a compiler program. I was able to compile about 4 of my programs, and then the disk became corrupt. I think I have since lost the disk.

 

I looked online, and I found 2 Compilers. I haven't tried them on actual hardware, but neither seem to work for me.

One is Datasoft, and the other is Monarch, I believe.

I even tried compiling the same games I know compiled before.

 

Is my problem because I am using Altirra to compile, or is there something I am missing?

 

Any help would be appreciated.

 

...OR, is there a different option?

I just want my slow Atari BASIC programs to play at a decent speed.

 

Thanks!

Link to comment
Share on other sites

A lot of basic games compiled with Monarch require that you use 'F' floating point instead of 'I' integer math. INT(xxx) and RND(xxx) don't work with integer math. and need floating point math.

 

Emulators have a lot of SIO enhancements that need to be turned off.

 

EDIT: also any fraction math will need the floating point math option also.

 

example x/3.3 3.75+11.1

Edited by rdea6
  • Like 2
Link to comment
Share on other sites

Thanks.. maybe I should just make a disk then and do it the old fashioned way. Better than turning off all the emulation speed settings.

A lot of basic games compiled with Monarch require that you use 'F' floating point instead of 'I' integer math. INT(xxx) and RND(xxx) don't work with integer math. and need floating point math.

 

Emulators have a lot of SIO enhancements that need to be turned off.

 

EDIT: also any fraction math will need the floating point math option also.

 

example x/3.3 3.75+11.1

Link to comment
Share on other sites

First option -- use Turbo Basic 1.5 XL or if using a 400/800, use the Earlier Turbo Basic 1.4, AKA "Frost Basic." You should be able to find all this stuff at Atarimania.

 

Second option -- use the Turbo Basic Compiler. I'm not sure if it will run on a 400/800. Since you are now using Altirra, the 400/800 should not be an issue. But you need to get the Altirra configuration set up correctly.

 

Third option -- use ABC from Monarch. It is the one that will not do floating point, so you need to work around that.

 

In many applications, you will find that Turbo Basic is almost as fast as an ABC-compiled program.

 

I mostly use real hardware, but if you truly get stuck, PM me with a copy of a game you are trying to compile and I will attempt to get it compiled under Altirra, and then tell you exactly how I did it.

 

-Larry

 

Edit: I should have added, if you just need a moderate speed-up, try Altirra Basic. Since it is a rom replacement, it is dead-easy to configure in Altirra.

  • Like 1
Link to comment
Share on other sites

Third option -- use ABC from Monarch. It is the one that will not do floating point, so you need to work around that.

 

In many applications, you will find that Turbo Basic is almost as fast as an ABC-compiled program.

 

The fun fact is that the ABC compiler is actually not really a compiler in first place. It just translates the BASIC token system to its own token system and adds its own interpreter to it instead of using the Basic interpreter. So it's rather a "basic dialect A to basic dialect B converter", not so much a compiler.

 

The reason why the results are fast are because the ABC token system is entirely integer based and more streamlined than the Atari BASIC system. So for example, ABC always uses the zero-page for its operand stack, whereas Atari Basic allocates memory for that from the Os.

  • Like 1
Link to comment
Share on other sites

The fun fact is that the ABC compiler is actually not really a compiler in first place. It just translates the BASIC token system to its own token system and adds its own interpreter to it instead of using the Basic interpreter. So it's rather a "basic dialect A to basic dialect B converter", not so much a compiler.

 

The reason why the results are fast are because the ABC token system is entirely integer based and more streamlined than the Atari BASIC system. So for example, ABC always uses the zero-page for its operand stack, whereas Atari Basic allocates memory for that from the Os.

 

I bought an ABC (V1.02) the day I saw the advertisement in Antic. And such a revelation to see how much faster its "p-code" was than Atari Basic. I still think it is one the the best applications ever written for the Atari, especially since it came out in '82 or '83. And I always liked the fact that the programs were stand-alone and quite a bit more compact than the regular program + Basic interpreter.

-Larry

  • Like 1
Link to comment
Share on other sites

First option -- use Turbo Basic 1.5 XL or if using a 400/800, use the Earlier Turbo Basic 1.4, AKA "Frost Basic." You should be able to find all this stuff at Atarimania.

 

Second option -- use the Turbo Basic Compiler. I'm not sure if it will run on a 400/800. Since you are now using Altirra, the 400/800 should not be an issue. But you need to get the Altirra configuration set up correctly.

 

Third option -- use ABC from Monarch. It is the one that will not do floating point, so you need to work around that.

 

In many applications, you will find that Turbo Basic is almost as fast as an ABC-compiled program.

 

I mostly use real hardware, but if you truly get stuck, PM me with a copy of a game you are trying to compile and I will attempt to get it compiled under Altirra, and then tell you exactly how I did it.

 

-Larry

 

Edit: I should have added, if you just need a moderate speed-up, try Altirra Basic. Since it is a rom replacement, it is dead-easy to configure in Altirra.

Thanks. I will keep that in mind when I have time to play. I believe the Monarc ABC was the one I had. It sped up a couple of my programs to where they actually ran like a "real" game. However, the integer restriction did cause an issue in another.

Link to comment
Share on other sites

Depending on what you want to do, the MMG compiler is good in that it compiles to machine language and supports both integer and floating point. *IF* you do go with the MMG compiler, I would suggest using the double density version. MMG came on a two sided disk with single density version on one side, double density version on the other. The support files are so big, you have trouble doing anything significant on the single density version. The double density was rather nice IMHO in that you could specify to save the intermediate assembler source code. Normally the compiler would delete the intermediate files as it worked to make more room on the disk. The assembler files give you a good starting point for learning assembler in that they give you a feel for using a run time package as canned code and passing parameters to it. Kind of like it gives you an epiphany moment where you say "So that is how C and Action! do it"

 

I can't remember all the programs I used it with, early 80 column telecommunication and "Point Set Graphics" from an Atari book come to mind. Using the floating point version the speed up is very noticeable. Using the integer version some things like P/M Graphics are so fast you have to add delay loops. I can't remember all the restrictions off hand, something like can't compute variables for subroutines and RT loads at $2400 so if you have a bunch of big handlers like the RS232 handler load into low memory, you can get a crash.

 

 

But yes, Turbo BASIC is a good choice because it fixes a lot of short comings of Atari BASIC. Six of one, half dozen of the other kind of thing. You can compile an Atari BASIC program so you get faster I/O or you can just learn how to use the Turbo BASIC command BLOAD.

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...