x86实模式段重叠如何帮助节省内存? [英] How does x86 real-mode segments overlap help memory saving?

查看:100
本文介绍了x86实模式段重叠如何帮助节省内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在教我的12岁. 8086汇编语言,昨天我们在谈论内存,寻址和分段.我向他展示了如何将段可视化为从16个字节边界开始的一系列重叠的64Kb块,偏移量是段内的8080样式的指针.然后他问了一个我无法回答的问题:为什么它们重叠(目的是什么?)?

I'm teaching my 12 y.o. 8086 assembly language and yesterday we were talking memory, addressing and segmentation. I showed him how segments can be visualized as a sequence of overlapping 64Kb blocks starting on 16 byte boundaries, with the offset being an 8080-style pointer within a segment. Then he asked a question I could not answer: why (what for, with what purpose) do they overlap?

尝试研究这个问题,我发现了20位数学的许多副本,并且模糊地提到了该方案可能允许的一些内存节省.有人可以详细说明一下内存节省部分吗?还是任何其他利用重叠的实际优势的方法?

Trying to research this question I found many copies of the 20 bit math, and a few vague mentions of some memory savings this scheme presumably allows. Can somebody elaborate on the memory saving part? Or any other ways to take practical advantage of the overlaps?

推荐答案

重叠越少,段在物理内存中的起始位置的选择就越少.这会在无用的段之间创建间隙,从而浪费内存.设计选择永远不会产生大于15个字节的间隙.也许这有些过分了,但是8086的设计时代是每个人1兆字节就足够了.而购买64 KB的存储空间会大大降低您的预算.足够珍贵,不想浪费时间.

The less overlap, the less choice you'll have over where a segment starts in physical memory. That creates gaps between segments that are not useful, thus wasting memory. The design choice never creates a gap larger than 15 bytes. That's overdoing it a bit perhaps but 8086 was designed in an era where 1 megabyte was enough for everybody. And buying 64 kilobytes put a rather large dent in your budget. Precious enough to not want to waste on gaps.

这篇关于x86实模式段重叠如何帮助节省内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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