What is meant by the terms "16 bit Compiler" and "32 bit Compiler"?
What is meant by the terms "16 bit Compiler" and "32 bit Compiler"?
Code:sizeof( int )
Quzah.
Hope is the first step on the road to disappointment.
http://en.wikipedia.org/wiki/16-bitIn computer architecture, 16-bit integers, memory addresses, or other data units are those that are at most 16 bits (2 octets) wide.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
A 16-bit compiler is a compiler that produces an executable that runs on a 16-bit platform, such as for a DOS system, or Windows 3.1.
Similarily, a 32-bit compiler would be a compiler that produces an executable that runs on a 32-bit platform, such as Windows 95, Windows 98, Windows XP, etc. etc..
Thank you..But in C/C++ which are 16bit and which are 32bit ones?
16 bit and 32 bit do not have any meaning relative to C and C++.
A 16-bit application is an application will run natively under a 16 bit operating system (such as MS-DOS) and a 32-bit application will run natively under a 32-bit operating system. (Running natively means that the application does not rely on some form of emulation to run; a 16 bit application can run on a 32-bit operating system, if the 32-bit operating system provides some means of making the application believe it is running under a 16 bit operating system. This is the reason that some old MS-DOS applications can run under recent versions of windows -- the operating system emulates the older 16-bit environment as far as those applications are concerned).
A compiler is an application (or a suite of applications) in its own right. If the compiler executes natively on a 32 bit operating system, it is a 32-bit application. If it generates code (object files and executables) that run natively on a 32-bit operating system, it is said to target a 32-bit operating system. The term "32-bit compiler" is a bit of a misnomer, as it mixes those concepts; it probably describes a compiler that is a 32-bit application and which, when run, produces programs that execute natively under a 32 bit operating system.
sizeof(int) is not specifically related to a compiler being 16 or 32 bit. sizeof(pointers) (eg sizeof (void *)) is more closely related. For example, a pointer will nominally be 4 bytes (each byte containing 8 bits) when the compiler is producing native 32-bit applications.
Last edited by grumpy; 03-24-2007 at 12:33 AM.
So when we run a C/C++ program under an IDE such as Dev C++, CODE BLOCKS, VC++ 6.0 do they simulate the DOS environment? If yes then why?
No they don'tOriginally Posted by anirban
Console application is 32-bit application
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
Sorry, my conception is not so clear..I shall beg your pardon if I say wrong..
If they do not simulate then why a DOS like window comes up, when we run?
In windows there ARE console applications that are shown using black box. These applications ARE still 32-bit...Originally Posted by anirban
ONE of these console applications is DOS emulator. Once you run DOS 16-bit program windows start this 32-bit application for you openning black box window and then runs a DOS application inside this emulator. This is the reason that all DOS applications you run are shown in the black window, but not all black windows are assotiated with DOS applications
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
PS. Not all 16-bit application are Console... There are 18-bit applications written for example for Win3.x that have GUI
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler