16-bit and 32-bit environment or compiler

This is a discussion on 16-bit and 32-bit environment or compiler within the C Programming forums, part of the General Programming Boards category; Hello friends, I am a newbie. During reading the C language, many times these terms come. 1) 16-bit environment or ...

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    10

    16-bit and 32-bit environment or compiler

    Hello friends,
    I am a newbie. During reading the C language, many times these terms come.
    1) 16-bit environment or 32-bit environment
    2) 16-bit operating system or 32-bit operating system
    3) 16-bit compiler or 32-bit compiler

    Please tell me what these terms mean. I know what is meant by compiler or operating system. What is referred by 16-bit or 32-bit here.

    Thanks for devoting ur time in my query.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    > 1) 16-bit environment or 32-bit environment
    This is almost the same as 2. However, you can, for example, have a 16-bit environment on top of a 32-bit OS (like a DOS window in Windows 3.1).

    2) 16-bit operating system or 32-bit operating system

    A 16-bit operating system uses a processor (mode) that only supports 16-bit registers - this means that a single register can only hold an unsigned value from 0..65535. Larger values will have to be dealt with by using multiple operations/multiple registers.

    A 32-bit operating system uses a processor (or processor mode) that supports 32-bit registers, where an unsigned integer can be up to a bit more than 2,000,000,000 (2 billion or 2 giga).

    3) 16-bit compiler or 32-bit compiler

    A compiler designed to generate code for a 16 or 32-bit environment.

    Lately, systems with 64-bit (OS, Compiler, Environment) has also come into reality, for example there is a version of Windows XP and Vista that runs in a 64-bit mode. Unsigned long integers here may be up to 2 ^ 64-1, which is some 18-digit number...

    Unless you are digging compilers out of the antique-section of the computer stores (e.g. turbo C or Visual C 1.5), you will most likely use a 32-bit compiler these days.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    10

    Thank you very much

    Thank you very much matsp,

    All my doubts are cleared. Thanks again.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Usually a reference to 16-bit or 32-bit code on the x86 platform is also a reference to real mode or protected mode programming.

    It is possible to use 32-bit code under DOS via a DOS Extender and 32-bit compiler/assemblers. DJGPP is a 32-bit DOS C/C++ compiler. MASM, TASM, and NASM are 16-bit and 32-bit assemblers. Rational systems used to have a very good DOS extender that most DOS video games of the day used. I believe Rational Systems went belly up some time ago. DJGPP comes with a less supported DOS extender but is still quite good.
    Last edited by VirtualAce; 10-03-2007 at 11:15 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Copying 32 bits into 16 bit integer???
    By blackCat in forum C Programming
    Replies: 4
    Last Post: 02-17-2009, 09:00 AM
  2. 16 bit compilar or 32 bit compilar
    By rajkumarmadhani in forum C Programming
    Replies: 16
    Last Post: 12-04-2007, 08:48 AM
  3. Replies: 16
    Last Post: 11-23-2007, 12:48 PM
  4. Porting from 32 bit machine to 64 bit machine!
    By anoopks in forum C Programming
    Replies: 10
    Last Post: 02-25-2005, 07:02 PM
  5. 16 bit or 32 bit
    By Juganoo in forum C Programming
    Replies: 9
    Last Post: 12-19-2002, 06:24 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21