|Free x86 C compiler wanted firstname.lastname@example.org (Jean-Sebastien Stoezel) (2007-04-06)|
|Re: Free x86 C compiler wanted ArarghMail704@Arargh.com (2007-04-06)|
|Re: Free x86 C compiler wanted DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-06)|
|Re: Free x86 C compiler wanted email@example.com (Christof Meerwald) (2007-04-06)|
|Re: Free x86 C compiler wanted firstname.lastname@example.org (cr88192) (2007-04-06)|
|Re: Free x86 C compiler wanted email@example.com (George Neuner) (2007-04-06)|
|Re: Free x86 C compiler wanted DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-08)|
|Re: Free x86 C compiler wanted firstname.lastname@example.org (George Neuner) (2007-04-08)|
|Re: Free x86 C compiler wanted email@example.com (Nils M Holm) (2007-04-08)|
|[4 later articles]|
|From:||Hans-Peter Diettrich <DrDiettrich1@aol.com>|
|Date:||6 Apr 2007 22:57:17 -0400|
|Posted-Date:||06 Apr 2007 22:57:16 EDT|
Jean-Sebastien Stoezel wrote:
> I am looking for a free C compiler supporting 186 processors.
Doesn't gcc do what you want?
[No, there's no working port to generate 16 bit x86 code. -John]
> Ideally the compiler would not generate code that is OS dependent (a
> bootloader would copy the code from PROM to RAM then branch to the
> program's entry.
Most programs still will call BIOS or other OS services, in the system
library, through interrupts. Did you do an disassembly of the file?
> Right now I am using msvc, I thought it could work by generating COM
> files but I cannot succeed in starting my application (CPU not
> booting). I tried different symbols (__astart, __main...), nothing
> seems to boot.
> Any thoughts?
If you say "not booting", it may be a problem of your bootloader?
Why at all do you copy the program into the RAM, instead of starting
Using MSDOS you can debug your program, to some degree.
An exe2bin utility did convert EXE files, in old MSDOS versions.
Did you set up the segment registers properly?
CS=startaddress>>4, SS (=DS?) and SP as appropriate...
AFAIR the entry point of an COM file simply is the first byte. Use an
JSR to this location, which would initialize the CS:IP properly, and
some programs (libraries) do an RTS to exit.
But before all that: is your framework set up properly? Interrupt
vectors etc.? A PSP (Program Segment Prefix) also may be required.
And wich start module did you use? A C compiler will prefix the program
code with a startup section, where the memory management, I/O system
etc. is initialized. A stand alone application may require a special
start module. In the source code of the start module you may find
further requirements, e.g. how the size of the stack and data segment is
determined by the program.
Return to the
Search the comp.compilers archives again.