| |
MorGorr Account closed
Registered: May 2002 Posts: 47 |
Basic Compilers (Help!)
Hi there,
I have got a basic program lying here that I would really like to compile. It is the basic part of my game "Advanced Space Battle".
Unfortunately, compiling this thing has turned out to be rather difficult. It seems that none of the available compilers is able to produce code that really works, because the basic part calls Asm routines via extended syntax (this happens about 600 times in the whole program). Everything below $0800 and above $a000 is crammed with machine code and other data. The Asm parts call various ROM routines, but I have patched them to leave the 0page ("virtually") untouched.
At the first sight, good old Austro-Compiler (and "Blitz!") seems to work fine, and the compiled code is even shorter than the uncompiled program. The problem is that the compiled code crashes at unpredictable places without any apparent reason.
The "Basic 64" compiler does not seem to make it either.
After a looong time of debugging, I have managed to compile a *part* of my program with the "Basic Boss". It was not possible to compile the whole program because the object file would have been way too large. I had to patch my Asm routines at various places, and in the end, everything worked fine.
OK, and now my question is: Does anybody of you have any kind of documentation or detailed information on one or more basic compilers? Docs, Manuals, Etexts? (Project64 does not have something like that, and 2 days of Google searches did not reveal them anywhere else).
About the "Basic Boss" I think I don't need anything more beyond what I already have, but what about the Austro? Why the heck doesn't it work?
Thanks a lot. |
|
... 12 posts hidden. Click here to view all posts.... |
| |
MorGorr Account closed
Registered: May 2002 Posts: 47 |
Quote: the "blitz!" compiler actually has a lot of options to let you "protect" certain locations so you can use asm code with basic .... god knows where to find the instructions though :o)
another compiler which i personally find very nice is "speedcompiler"... it came with the input64 mag...maybe you can have a look at that one aswell :) no idea how well it works with basic/asm mix though
gpz
Thanks a lot for that one! Input64... Didn't they also have text files on their tapes? I'll have a look right now...
It's just incredible how difficult it is to locate docs for all those compilers. ... If anyone else has any more hints, please let me know. |
| |
MorGorr Account closed
Registered: May 2002 Posts: 47 |
Input64 Speedcompiler didn't solve the problem either. Same thing here: Anyone got the docs? It seems that Input64 had its texts on paper (?) |
| |
MorGorr Account closed
Registered: May 2002 Posts: 47 |
Quote: Two *extremely* stupid suggestions, but guaranteed to make it work:
1) Write your own basic->asm compiler
2) Convert to asm manually
Dear Lasse.
I spent 6.5 years on universities. But your suggestions are still a bit too academic to me.
Thanks anyway, mate.
|
| |
cadaver
Registered: Feb 2002 Posts: 1153 |
Just a reflection of my total stubbornness/stupidity in regard to any external programs on mission-critical C64 development datapath :)
(ok.. I use a 3rd party crossassembler, but hey, I had to modify anyway to fix a bug) |
| |
Puterman Account closed
Registered: Jan 2002 Posts: 188 |
morgorr: I take it you didn't take any compiler classes during those 6.5 years. :-) |
| |
MorGorr Account closed
Registered: May 2002 Posts: 47 |
Quote: morgorr: I take it you didn't take any compiler classes during those 6.5 years. :-)
No. As a matter of fact, I took psychology classes ;-) You may call me a "Dipl.-Psych." if you want. |
| |
MorGorr Account closed
Registered: May 2002 Posts: 47 |
Quote: Just a reflection of my total stubbornness/stupidity in regard to any external programs on mission-critical C64 development datapath :)
(ok.. I use a 3rd party crossassembler, but hey, I had to modify anyway to fix a bug)
No, I mean, *theoretically* your solutions are perfect... |
| |
MagerValp
Registered: Dec 2001 Posts: 1056 |
What about defining a macro package for C that implements all the basic keywords, and then translate the source and compile with CC65? :)
|
| |
Puterman Account closed
Registered: Jan 2002 Posts: 188 |
Yes, that'd be truly horrible. :-) |
| |
MorGorr Account closed
Registered: May 2002 Posts: 47 |
I must confess that I am totally illiterate in C. But just out of curiousity: Isn't it impossible to translate a GOTO directly into C, without restructuring the whole program? |
Previous - 1 | 2 | 3 - Next |