Re: 80186 free C compiler



On Fri, 30 Sep 2005 12:02:07 +0100, John Wilkinson
<john.wilkinson@xxxxxxxxxxx> wrote:

>Hi,
>I am new to all this but I am about to try my first embedded design using
>an 80C186 processor.
>Is there a free C compiler available?

IIRC, there was a book on programming embedded DOS systems that
included a Borland 3.something C compiler. You might look in the
Borland Museum as well, though I think that stuff is older.

Someone else mentioned OpenWatcom, which might work as well.

>Am I correct in thinking gcc can't target the 80186 processor?

That's my understanding.

>
>I understand I need a locator as well?
>Again is there a free one?

John Fine has written jloc which should do what you want. He calls it
"zero price shareware," which means he wants you to register it if you
use it, but he dosn't charge you anything for it. See
http://my.execpc.com/~geezer/johnfine/ for more info.

>
>Where can I get startup code? The book I have is Programming Embedded
>Systems by Michael Barr, and he says that you could use libgloss, but I
>can't find it anywhere on the internet!!

The 80C186 user's manual from Intel (if you can find one) pretty much
describes most of what you need for the chip. And it's important for
things like setting up the chip selects. libgloss I suspect is for
handling C initialization requirements and to call main.

With a locator, you don't necessarily have to do all that, just jump
to a routine called "_start" or some such. Although you should
probably have a routine to zero static RAM, etc. That means you'll
have to explicitly initialize static variables in your code (rather
than declaring them with an initializer), but usually that's a small
price to pay (as long as you don't forget...)

HTH,

-=Dave
--
Change is inevitable, progress is not.
.



Relevant Pages

  • Re: Statically create a table of data in C: How?
    ... >> to compute a table and compile it with a C compiler. ... > The C code can reference the table in the Assembler code and the ... That routine will be relatively slow, ... You can probably automate the initialization by testing a static ...
    (comp.lang.c)
  • Re: Looking for a free basic compiler for DOS
    ... BC for 7.1 had a lot of compiler switchable options, ... NEVER compile from the ide. ... One trivial example: I have a routine declared as: ... were no manuals, just a readme file. ...
    (comp.lang.basic.misc)
  • Re: SAMBA for VMS (The saga continues!)
    ... > callee (substitute function) code seems small to me. ... determine that the OS routine is now available. ... >>instructions and also disabling the compiler optimizer that you can rely ... they upgrade VMS and then try to install an existing package. ...
    (comp.os.vms)
  • Re: OT: Requesting C advice
    ... some behind the scenes action of the compiler. ... In fact the memory could ... Proper initialization means that floats and doubles must be initialized to 0.0 and pointers must be initialized to the null pointer value, even if those bit patterns differ from all-bits-zero. ...
    (Fedora)
  • Generic Maze Program Example 1
    ... This is the DOS DPMI version of the compiler in Rick van Norman's ... The original code for this was done by Larry Myers, ... routine that Larry used. ... press the #5 key on the numeric keypad. ...
    (comp.lang.forth)