Re: Free x86 C compiler wanted

Nils M Holm <nmh@t3x.org>
8 Apr 2007 10:25:09 -0400

          From comp.compilers

Related articles
[2 earlier articles]
Re: Free x86 C compiler wanted DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-06)
Re: Free x86 C compiler wanted cmeerw@cmeerw.org (Christof Meerwald) (2007-04-06)
Re: Free x86 C compiler wanted cr88192@hotmail.com (cr88192) (2007-04-06)
Re: Free x86 C compiler wanted gneuner2@comcast.net (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 gneuner2@comcast.net (George Neuner) (2007-04-08)
Re: Free x86 C compiler wanted nmh@t3x.org (Nils M Holm) (2007-04-08)
Re: Free x86 C compiler wanted ang.usenet@gmail.com (Aaron Gray) (2007-04-11)
Re: Free x86 C compiler wanted gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-04-11)
Re: Free x86 C compiler wanted lpsantil@gmail.com (lpsantil@gmail.com) (2007-04-13)
Re: Free x86 C compiler wanted kenney@cix.compulink.co.uk (2007-04-13)
| List of all articles for this month |
From: Nils M Holm <nmh@t3x.org>
Newsgroups: comp.compilers
Date: 8 Apr 2007 10:25:09 -0400
Organization: Compilers Central
References: 07-04-015 07-04-019 07-04-024 07-04-025
Keywords: C, MSDOS
Posted-Date: 08 Apr 2007 10:25:09 EDT

Hans-Peter Diettrich <DrDiettrich1@aol.com> wrote:
> Right, John. AFAIR COM programs are restricted to the small memory
> model, where everything resides in a single 64K segment. The segment
> registers usually are left unchanged during execution, just as in the 32
> bit flat model.


The memory model of typical DOS ".COM" programs is the "tiny" memory
model. In small model, you have a text segment and a separate segment
combining data and stack. In tiny model, text, data, and stack share
the same 16-bit address space.


In small model, program data typically start at DS:0 while in tiny
model, the loader has to arrange the data in such a way that they do
not overlap with the code.


To the original poster: old Turbo C compilers (1.x, 2.x) have an
option for generating tiny model output. You could once get these old
compilers from Borland at no cost, but I do not know whether this is
still the case.


Another option would be Bruce Evans' BCC (not to be mixed up with
Borland C). You can easily find it using Google. It is open source and
freely available, for example from the FreeBSD ports repository
(freebsd.org/ports/lang.html, search for bcc).
--
Nils M Holm <nmh@t3x.org> -- http://t3x.org/nmh/


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.