C 8位16位32位编译器之间的区别 [英] Difference between C 8 bit 16-bit 32-bit compilers

查看:574
本文介绍了C 8位16位32位编译器之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题可能是多余的,但是我没有找到确切的答案。

This question may be redundant, but I didn't found exact answer.

C 8位16位32位编译器之间的区别是什么。

What is the Difference between C 8 bit 16-bit 32-bit compilers.

由不同的编译器为同一代码生成的.exe有何不同...........

how the .exe differ generated by different compilers for same code...........

推荐答案

16位编译器将程序编译为16位机器代码,该代码将在具有16位处理器的计算机上运行。 16位机器代码将在32位处理器上运行,但是32位机器代码将不在16位处理器上运行。 32位机器码通常比16位机器码快。

16 bit compilers compile the program into 16-bit machine code that will run on a computer with a 16-bit processor. 16-bit machine code will run on a 32-bit processor, but 32-bit machine code will not run on a 16-bit processor. 32-bit machine code is usually faster than 16-bit machine code.

使用16位编译器时,类型大小(以位为单位)如下:

With 16 bit compiler the type-sizes (in bits) are the following:

short, int: 16 
long: 32 
long long: (no such type) 
pointer: 16/32 (but even 32 means only 1MB address-space on 8086) 

使用32位编译器,对象大小(以位为单位)如下:

With 32 bit compiler the object-sizes (in bits) are the following:

short: 16 
int, long: 32 
long long: 64 
pointer: 32 

使用64位编译器,对象大小(以位为单位)如下:

With 64 bit compiler the object-sizes (in bits) are the following:

short: 16 
int: 32 
long: 32 or 64 (!) 
long long: 64 
pointer: 64 

[虽然上述值通常是正确的,但它们可能因特定的操作系统而异。请检查编译器的文档以获取标准类型的默认大小]

[While the above values are generally correct, they may vary for specific Operating Systems. Please check your compiler's documentation for the default sizes of standard types]

以下内容可以解释更多...
http://cboard.cprogramming.com/c-programming/96536-16 -bit-compilar-32-bit-compilar.html

Following can explain a little bit more... http://cboard.cprogramming.com/c-programming/96536-16-bit-compilar-32-bit-compilar.html

这篇关于C 8位16位32位编译器之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆