Thread: 16 Bit Compiler

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    59

    16 Bit Compiler

    Does anyone know of a decent C compiler that can compile programs that run in dos and don't require Win32?

    -Thanks-

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Take a look at www.thefreecountry.com/developercity/. In this city there is a place where you can find C compilers, also for DOS.

    You could also take a look at Borland's site, there you can download a number of compilers for free. I thought that good old Turbo C was also present to be downloaded. And else look at Pacific C at www.htsoft.com/products/pacific.html, a good one, and Digital Mars C (?) and GCC can compile DOS programs, though you need to download special libraries for that.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    59

    Digital Mars

    I have The Digital Mars compiler, it is the compiler I have been using for a couple months now, I have downloaded the libraries for 16 bit dos and placed them in the correct folders I just havn't been able to figure out how to tell the compiler that I want it to be dos 16 bit not win32. What would the command line arguments be?

  4. #4
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    I'm sorry, I don't know, isn't it in the documentation? Have you checked which parameters you can pass to the compiler and the linker?

    Perhaps there's a compiler switch which needs to be turned on.

    And what about trying a different compiler? The Turbo C compiler and Pacific C are very easy to install and use.

  5. #5
    Registered User
    Join Date
    Mar 2002
    Posts
    59

    ...

    I have looked all threw the documentation and their site... and tried all of the possible arguments I found but with no success... thanks anyway for your help!
    Last edited by Jperensky; 03-29-2002 at 02:55 PM.

  6. #6
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    In the Compiler & Tools Guide at

    http://www.digitalmars.com/ctg/ctg.html

    There seem to be some compiler switches which could be useful to include in your code:

    _MSDOS
    DOS16RM

    I guess if you turn one (or perhaps both) of these switches on in your code, the compiler knows that it should generate DOS code.

    There are two options which you could supply the compiler with, which look quite useful, "-f" and "-md". Where f means that 16 bit code should be generated and md is memory model type d where d is for 16 bit.

    Have you setup the environment variables for the linker right?

    [QUOTE from Compiler & Tools Guide]

    LIB
    Supplies paths to search for libraries, object files, and resource files. See also /SCANLIB.

    TMP
    Supplies a path used by OPTLINK for its virtual memory file. Otherwise, the current directory is used. OPTLINK's performance can be severely slowed when its virtual memory file must be stored across a network.

    LINK
    Supplies linker switch settings. Recognized for Microsoft LINK compatibility. See also /SCANLINK.

    OPTLINKS
    Supplies linker switch settings. OPTLINKS is scanned after the LINK variable and can override any previous settings specified.

    OBJ
    Supplies paths to be searched by OPTLINK for .obj files not found in the current working directory. Paths specified by OBJ are always searched before any paths specified by the LIB environment variable.

    PATH
    [/QUOTE]

    I'm not sure if I interpreted the information correctly. Perhaps you could contact Jan Knepper, http://www.janknepper.com/, he seems to be the guy maintaining the website. Maybe he knows the answer, at least I think he knows the right persons to answer your question. His e-mail: [email protected].

    Or you could try the newsgroup at
    http://www.digitalmars.com/NewsGroup.html
    Last edited by Shiro; 03-29-2002 at 03:11 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 32 bit or 64 bit allignment ?! gcc options??
    By mynickmynick in forum C Programming
    Replies: 3
    Last Post: 07-29-2008, 02:43 AM
  2. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  3. binary numbers
    By watshamacalit in forum C Programming
    Replies: 4
    Last Post: 01-14-2003, 11:06 PM
  4. 16 bit colors
    By morbuz in forum Game Programming
    Replies: 13
    Last Post: 11-10-2001, 01:49 AM