Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Basic Compilers (Help!)
2003-04-13 20:17
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....
 
2003-04-14 17:04
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.
2003-04-14 18:51
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 (?)
2003-04-14 19:58
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.
2003-04-14 23:00
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)
2003-04-15 06:32
Puterman
Account closed

Registered: Jan 2002
Posts: 188
morgorr: I take it you didn't take any compiler classes during those 6.5 years. :-)
2003-04-15 07:25
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.
2003-04-15 07:27
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...
2003-04-15 16:28
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? :)
2003-04-16 06:14
Puterman
Account closed

Registered: Jan 2002
Posts: 188
Yes, that'd be truly horrible. :-)
2003-04-16 07:29
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Fred/Channel 4
edge
Matt
krissz
Acidchild/Padua
pcollins/Quantum
Guests online: 122
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Original Suppliers
1 Black Beard  (9.7)
2 Derbyshire Ram  (9.5)
3 hedning  (9.2)
4 Baracuda  (9.1)
5 Jazzcat  (8.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.102 sec.