A92: Re: PreFargo


[Prev][Next][Index][Thread]

A92: Re: PreFargo





>Ok, I just played around with GNU cpp.  This would be the syntax we'd need
to
>use it for fargo:
>cpp -nostdinc -I%fargo%\asm\include -P infile.asm outfile.asm
>For those who are curious:
> -nostdinc means that the standard include directories (those used for C)
>won't be checked for includes.
> -I%fargo%\asm\include means that your fargo include directory will be
checked
>for includes.
> -P means that the preprocessor won't output "#" lines that would confuse
>a68k.
>
>And you'd get the preprocessed output in outfile.asm.  Then you could use
all
>the standard C Preprocessor directives, like "#include <flib.h>".  I tested
>this out and it produced output that seemed good to me, so I think it would
>work fine, if people want to use this.  I believe David could even include

>cpp.exe with the fargo distribution if this became the standard thing to
use.

This is great!

Where did you find a GCC port for DOS?  (Are you refering to the Unix GCC?)
TMK, DJGPP was the DOS port for the GNU C++ compiler.  And I never saw a
"download" option anywhere on the Net (I've spent some serious DAYS looking
around).

The reason I am so intent on asking: I've come up with a C solution also.
But mine was so much trouble I never thought it was worth using.  I always
knew that the GCC compiler had a -68000 option.  I ran Linux for awhile, but
never tried to really make it work.  Mainly because the Linux package for
Fargo never seemed to work with my calc.  Probably because I have the
TI-Graph Link cable and not the make-shift cables.

My solution was (the only program I could find on the Net to download)
cc68k.  Some of you may know of this.  Basically, you give it a C source
file (K&R standard... for those of you who know what this is... ACK!).  The
program outputs a ASM source file.  I wrote a simple "post-cc68k/pre-fargo
processor" in QuickBASIC to format the .S output of the cc68k program to the
.ASM input for fargo (Fargo.bat... a68k really).

I did get several programs to run.  But the main hassle was function calls.
I believe (since prototyping in K&R is pretty useless) that all variables
are sent via LONG.  This causes problems especially if I want to export a
function.  Calling other functions can be done, but an additional "wrapper"
function needs to be added so that ther variables are passed correctly.

I would be so glad if I could use a "real" compiler (cc68k is okay... but
GCC just plain kicks butt!).

Thanks for your help,
====
Aaron Hill (Redmond, WA)
E-mail: SeracOhw24@msn.com
IRC Nick: SeracOhw (EF-Net)