|C 16 bit compiler firstname.lastname@example.org (Jack Smith) (2010-09-27)|
|Re: C 16 bit compiler email@example.com (Egdares Futch) (2010-09-28)|
|Re: C 16 bit compiler firstname.lastname@example.org (Nils M Holm) (2010-09-29)|
|Re: C 16 bit compiler email@example.com (BGB / cr88192) (2010-09-28)|
|Re: C 16 bit compiler firstname.lastname@example.org (George Neuner) (2010-09-29)|
|Re: C 16 bit compiler ArarghMail009@Arargh.com (2010-09-30)|
|Re: C 16 bit compiler email@example.com (Jack Smith) (2010-10-01)|
|Re: C 16 bit compiler firstname.lastname@example.org (George Neuner) (2010-10-01)|
|Re: C 16 bit compiler email@example.com (George Neuner) (2010-10-03)|
|Re: C 16 bit compiler firstname.lastname@example.org (BGB / cr88192) (2010-10-06)|
|Re: C 16 bit compiler email@example.com (Walter Bright) (2010-11-11)|
|[1 later articles]|
|From:||George Neuner <firstname.lastname@example.org>|
|Date:||Wed, 29 Sep 2010 16:31:09 -0400|
|Organization:||A noiseless patient Spider|
|Posted-Date:||29 Sep 2010 23:28:28 EDT|
On Mon, 27 Sep 2010 23:01:36 -0700 (PDT), Jack Smith
>Do you know about a compiler C which can compile into 16 bit?
>i've tried watcom, but it's difficult to use and i need that 16 bit binary
>to be an ELF, not an OMF, besides ELF is rudimentary in wlink.
There are plenty of 16-bit x86 compilers around. Have you tried
>suppose you have to write a bootloader (only stage1) in C and in real
>mode, what compiler will you use?
A first stage boot loader can only be up to one device block long.
Because of this it would usually be written in assembler. It's
possible to write one in C, but you have to be *EXTREMELY* careful
about using any library functions. Still it would be difficult to get
a useful C program to fit into a 512 byte floppy sector.
Moreover, the second stage loader is usually packaged together with
the first stage loader, so if you want to use the same compiler for
both you'll need one suitable for the second stage as well.
And you can't put a boot loader in ELF, it has to be a flat
non-segmented format like A.OUT or COM.
I have no experience with freeware 16/32-bit compilers. I've used
Microsoft, Watcom (the commercial version), Lattice and Borland (which
is now freely available). Any of them would do fine.
>ah, yeah..unfortunately.. gcc is not suitable for this,
>because .code("asm16gcc"); directive makes the compiler to insert a
>lot of 66 and 67 stuff in the code which makes the binary too large
>for my purpose,
If you don't know what those codes mean, you probably shouldn't be
doing whatever you are doing.
>moreover someone says that it will not work either, do you confirm this?
No. Whether the code will work depends on what chip it will be run on
- which you haven't specified.
GCC is nominally a 32-bit compiler which makes no guarantees of
compatibility with smaller chips. Regardless of quality or length of
service, the GCC code generators for 16-bit chips are all considered
to be experimental.
>any help is appreciated..
You appear to need a lot of help and I question whether you are ready
to take on this project - whatever it is. I suggest you spend some
quality time learning more about it before you proceed.
Return to the
Search the comp.compilers archives again.