CPU为什么会有段?why segment/segmentation ?

CPU为什么会有段?像cs, ds, ss等等。这个问题困扰了我很久,感觉有了段地址后把问题复杂化了,没必要这么做。

后来翻查资料后才发现,段(segment)的存在原来是有历史因素的:http://homepage.smc.edu/morgan_david/cs40/segmentation.htm

以下是摘抄和个人见解

Vintage 1980 microcomputers used physical addressing, and confined themselves to using 4-digit hexadecimal numbers (which is the same thing as 16 bits) as addresses. The highest you can count with a 4-digit hexadecimal number is FFFF in hex, equivalent to 65535 in decimal. So no more than 65536 bytes or 64K of memory could be used. Even if you could have installed more, the computer could not have used it for lack of ability to refer to it.

1980年的程序是只有16bit大小的内存空间的,也就是只支持64k的内存,寻址只能从0000-FFFF,也就是 汇编 里的 

mov edx AFFFF

这样的指令和程序是不会被执行通过的。


The IBM PC appeared in

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值