Jump to content
IGNORED

Looking for a BASIC compiler..


Mclaneinc

Recommended Posts

Just tried the Datasoft one but it won't do gosubs ie it asks to continue without or abort...

 

To be honest it would be the first time I have used a compiler for BASIC as I skipped it and went to machine code when I was younger but I just want to tests a few things that are written in ATari Basic and see what they are like after a compile. Not looking to rewrite or use another version of basic.

 

You guys have most likely tried them all so who better to ask :)

 

Thanks

 

Paul.

 

Link to comment
Share on other sites

Try this:

http://atarionline.pl/v01/index.php?ct=utils&sub=4.%20Programowanie&tg=ABC%20A%20Basic%20Compiler#ABC%20A%20Basic%20Compiler- ABC Basic Compiler, I used it years ago. If I remember - always put error communicate, but compiled programs run correctly

http://atarionline.pl/v01/index.php?ct=utils&sub=4.%20Programowanie&tg=MMG%20Basic%20Compiler#MMG%20Basic%20Compiler- MMG Basic compiler

Or try Turbo Basic Compiler with runtime -in many times that one give faster code, but - unfortunately - longest programs (runtime must be added or must be in atr with DOS).

Link to comment
Share on other sites

I personally have never used either, but I know from reading that the MMG BASIC compiler is the same as the DataSoft BASIC compiler (both made by "Special Software Systems"), only the MMG is a newer version, 2.0 . I don't know if they changed anything related to the problem you're having, but you may have better success with the MMG version, just being that it's newer.

 

 

Link to comment
Share on other sites

I'd suggest a Windows/Linux/MacOS compiler for this could be better suited? Then any constraints of the existing compilers on memory is taken away.

 

Having a search showed that this has already attempted with the ABC project. [EDIT] :dunce: Just saw Sikor had mentioned that above 8)

 

If something like the Memo Pad editor is able to load-up basic files then incorporating calling from this might be an idea?

 

Options on a two phase approach to translation could be:

1) direct to assembler and use MADS to build the xex

2) into C and then get CC65 to build it

3) into Pascal and get Mad Pascal to build it

Edited by Wrathchild
Link to comment
Share on other sites

To add to this: The ABC compiler is not really a compiler - it just converts the Basic source to p-Code which is then (again) interpreted at run-time. The result is still a lot faster than the native Atari basic, due to two effects: First of all, it no longer does a linear line search but uses a bi-section algorithm to find the target lines of GOTO and GOSUB, and second, it only uses integer arithmetics. The latter requires some care when compiling programs. Sources that depend on floating point math will not be compiled correctly.

  • Like 1
Link to comment
Share on other sites

Tried those suggested and all had issues with the chosen program regarding gosubs...

 

The chosen test was

 

http://www.atarimania.com/game-atari-400-800-xl-xe-space-attack_27933.html

 

The idea was that there are some BASIC games that have a long initialisation time and I hoped that with being compiled it would make it much shorter so more fun to get on and play.

 

Silly idea, was just something for me to play about with..

Link to comment
Share on other sites

Using Altirra Basic provides a much quicker startup time as phaeron had made many optimizations.

 

On real h/w I wouldn't know if people have gone down the route of replacing the Basic ROM or making a Cartridge.

A possibility, if you have an AtariMax 128KB Flashcart, would be to burn an image of the 8K ROM file concatenated 16 times.

 

Hmm. I wondered if updating the Basic slot in the Incognito flash with Altirra Basic would be OK, just tried it and was able to run your test program fine, however perhaps the gameplay is then too fast as I didn't last long :D

 

This would be a problem in quite a lot of compiled basic programs where a delay is implemented as a FOR loop as, of course, it then runs faster and so completes quicker.

Edited by Wrathchild
Link to comment
Share on other sites

  • 3 years later...

I have an original Datasoft Compiler, had it since the 80's, I never found it to be that reliable, some programs would compile and run fine,

but most would have issues which wern't always easy to resolve.

 

I decided Assembler was the best option for better control of the system and you can do so much more with pure 6502 code. 

  • Like 1
Link to comment
Share on other sites

13 hours ago, TGB1718 said:

 

I decided Assembler was the best option for better control of the system and you can do so much more with pure 6502 code. 

Of course it's the best option, the traditional school of thought is that one should learn a high-level "easier" language like BASIC first, and once you have a grasp on that, if it's good enough for your needs, that's it, otherwise you are then ready to learn a more sophisticated high-level language or Assembler. It's better to take baby steps and work your way up, as machine language, using assembler or direct binary code was to hard to start with if you have never programmed before. It's better to learn BASIC even before some other high-level language.

 

I was following this school of thought, deciding I would learn BASIC first, choosing BASIC XE because it integrates well with SpartaDOS X, is a true descendant and upgrade to the original Atari Basic and I like how it implements the use of extended memory. After I have a grasp on BASIC, I wanted to learn Action! And then *maybe* Assembler someday. But I was given a host of books on learning both BASIC and machine language programming, specifically the 6502. Well, one day I decided to "jump ahead" and started browsing through one of the smaller books, a Hofacker book, 'How to program your Atari in 6502 Machine language' and I was engrossed and wasn't having a problems following the book. So now I'm rethinking if I do even want to bother with BASIC or Action! or just start with Machine language.

 

I haven't made a decision yet (I haven't had much time for a while to continue pursuing any of them), as I still like the idea of re-learning BASIC and learning Action! just because the OSS languages call to me for some reason...I can't explain...part of it is my memory of the OSS ads in Atari magazines, as I drooled over them, wishing I had the money to buy them. I had already shelled-out a lot for Microsoft BASIC II as a second BASIC when I bought my Atari. I don't care if Turbo BASIC, Altirra, FastBASIC are faster and better implementations of BASIC, they weren't the BASIC I dreamed of owning in my youth.

Edited by Gunstar
Link to comment
Share on other sites

I totally uderstand where you are coming from, I too started with Atari Basic (and a little from an earlier short time with a Comadore PET)

but soon realised that for the things I wanted to do, BASIC couldn't and found I was including USR routines into my BASIC programs.

 

I recently released a BASIC game I wrote in 1983 that is entrenched in machine code routines on http://www.atarimania.com/

 

Here is the source if you want to have a look (both .BAS and SRC), a lot of the machine code was to speed up the run time as it used to take nearly a minute

before the game ran.

 

I still use BASIC today for things that don't require the speed or complexity, although when I moved to the ST I rarely used BASIC as

68000 machine code is a dream to use and also I found 'C' existed, so no need for anything else ?

 

 

FRUIT.BAS FRUIT.SRC

  • Like 1
Link to comment
Share on other sites

Did you consider FastBasic?

 

Assembly is nice but sometimes it‘s just too tedious to break down a problem to atomic level if speed is not the prime consideration and the newer BASICs usually make working with 16-bit system stuff easier by offering DPEEK/DPOKE and hex numbers.

  • Like 1
Link to comment
Share on other sites

On 2/16/2016 at 4:22 PM, Mclaneinc said:

Just tried the Datasoft one but it won't do gosubs ie it asks to continue without or abort...

 

To be honest it would be the first time I have used a compiler for BASIC as I skipped it and went to machine code when I was younger but I just want to tests a few things that are written in ATari Basic and see what they are like after a compile. Not looking to rewrite or use another version of basic.

 

You guys have most likely tried them all so who better to ask :)

 

Thanks

 

Paul.

 

the turbo basic XL compiler has taken every Atari basic program I've thrown at it.

 

-SteveS

  • Like 1
  • Thanks 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...