16 bit c code to flat binary.
16 bit c code to flat binary.
what is the best way to produce flat binary from 16 bit c code.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: 16 bit c code to flat binary.
Did you read your linker's manual?
Re: 16 bit c code to flat binary.
Im asking about are there any usefull tools and how to use them.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: 16 bit c code to flat binary.
First of all, there is no such thing as 16-bit C code.
Secondly, if you can not give an explicit reason that you need C code compiled to run real mode, you probably do not want it.
Thirdly, did you actually read my response? I could just copy it over again:
> any usefull tools
"your linker"
> how to use them.
"Did you read [the] manual?"
If that doesn't help, you may also want to read this and this since you failed at least one of them.
Secondly, if you can not give an explicit reason that you need C code compiled to run real mode, you probably do not want it.
Thirdly, did you actually read my response? I could just copy it over again:
> any usefull tools
"your linker"
> how to use them.
"Did you read [the] manual?"
If that doesn't help, you may also want to read this and this since you failed at least one of them.
Re: 16 bit c code to flat binary.
The Watcom compiler and linker can do most things, except produce 64 bit code. (If you are programming in a Windows environment that is.)scsi wrote:what is the best way to produce flat binary from 16 bit c code.
Re: 16 bit c code to flat binary.
The only real method, AFAIK, is to use a really old compiler. AFAIK, when the bochs guys compile their BIOS, they use bc. Alternately you could use something like Microsoft QuickC, V2.51.
Re: 16 bit c code to flat binary.
to Combuster:
First of all, there is no such thing as 16-bit C code.Code: Select all
so what is turbo cpp 3.0 is doing. [quote]Secondly, if you can not give an explicit reason that you need C code compiled to run real mode, you probably do not want it.[/quote][/quote] im trying to write real mode kernel thats why i need it. are you trying to prove yourself.if you are not interested in answering questions kindly dont write anything.no body forces you to write i guess.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: 16 bit c code to flat binary.
There is no 16-bit C code, only 16-bit compilers and compilers that target a 16-bit platform. C as a language is platform independent.
Also, I know that giving the answers only help so much of the time, and the other half needs to be spent on teaching how to solve problems in general. I'm one for the long run, not for your 7-day plan. Ignore me if you think otherwise.
Also, I know that giving the answers only help so much of the time, and the other half needs to be spent on teaching how to solve problems in general. I'm one for the long run, not for your 7-day plan. Ignore me if you think otherwise.
Re: 16 bit c code to flat binary.
If you are only interested in 16 bit, any ancient compiler will do. Turbo C is probably still available for download if you google it.scsi wrote: im trying to write real mode kernel thats why i need it.
are you trying to prove yourself.if you are not interested in answering questions kindly dont write anything.no body forces you to write i guess.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: 16 bit c code to flat binary.
I think you mean bcc, which stands for "Bruce Evans' C compiler".. Bruce was (..perhaps still is?) a FreeBSD developer, sadly no real official page exists for it these days, the source tarball is available online though.bewing wrote:The only real method, AFAIK, is to use a really old compiler. AFAIK, when the bochs guys compile their BIOS, they use bc. Alternately you could use something like Microsoft QuickC, V2.51.
It includes ld86 and as86, it's a full toolchain for compiling C programs for 16-bit real mode, but as has been said there really isn't much of a point in writing real mode code in C.
There is a "fork" called Dev86, as the original "bcc" archived was rolled in 1995.
Re: 16 bit c code to flat binary.
I think bc is BorlandC.
If a trainstation is where trains stop, what is a workstation ?
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: 16 bit c code to flat binary.
I'm aware, but it's probably not what Bochs uses for their BIOS images.gerryg400 wrote:I think bc is BorlandC.
Re: 16 bit c code to flat binary.
bcc both means Bruce's C Compiler and Borland C Compiler. That's a bit confusing.gerryg400 wrote: I think bc is BorlandC.
@scsi: I think bin86 should interest you.
Nope. They use bin86 and also GCC.Brynet-Inc wrote: I'm aware, but it's probably not what Bochs uses for their BIOS images.
"Open source seems to embrace the dark side of human nature." - Ville Turjanmaa
Re: 16 bit c code to flat binary.
I am truly sorry to disappoint you, but this is not a valid argument. Sure, scsi tries his best to piss everyone off, but the fact that he joined the forum later than someone else does not mean he is worse than that person (yet there are other things that make him look just plain stupid).berkus wrote:Joined: November 26th, 2010, 12:22 pm
vs
Joined: October 18th, 2006, 12:45 pm
Re: 16 bit c code to flat binary.
to berkus:
are you cumbuster's lawyer.i think cumbuster wasnt able to discuss with me and hired you.joining forum earlier doesnt make you two genius.instead of telling me to read the "smart questions" you should stop talking dumb.
to Fanael:
i agree with your first sentence but if some one is stupid no discussion it is you i think.
are you cumbuster's lawyer.i think cumbuster wasnt able to discuss with me and hired you.joining forum earlier doesnt make you two genius.instead of telling me to read the "smart questions" you should stop talking dumb.
to Fanael:
i agree with your first sentence but if some one is stupid no discussion it is you i think.