segment:offset寻址方案如何工作? [英] How does the segment:offset addressing scheme work?

查看:255
本文介绍了segment:offset寻址方案如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读到,在Intel 8086 CPU时代,最大的寄存器是16位,每个人都在寻找一种方法来访问超过65536字节的线性内存,但他们没有扩展CPU寄存器,而是发明了该段:offset寻址方案以及据我所知,您可以将两个16位寄存器组合"成一个32位内存地址.但是在同一地方,我也读到了CPU只能访问1MB的内存.这是如何运作的? 2 ^ 32等于4,294,967,296,所以我不明白,请赐教:)

I've read that in the days of the Intel 8086 CPU the biggest registers were 16-bits and everyone were looking for a way to access more than 65536 bytes of linear memory but instead of expanding the CPU registers they invented the segment:offset addressing scheme and the way I understand it you're able to "group" two 16-bit registers together into a 32-bit memory address. But the same place I have also read that the CPU could only access 1MB of memory. How does that work? 2^32 equals 4,294,967,296 so I don't understand, please enlighten me :)

推荐答案

段寄存器值左移4(乘以16)并添加到偏移量"字段中.地址的一部分.

The segment register value is shifted left by 4 (multiplied by 16) and added to the "offset" part of the address address.

16 * 65536 = 1兆字节.

16 * 65536 = 1 megabyte.

这篇关于segment:offset寻址方案如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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