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

查看:44
本文介绍了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天全站免登陆