英特尔8086组件中CS和IP寄存器的用途是什么? [英] What is the purpose of CS and IP registers in Intel 8086 assembly?

查看:234
本文介绍了英特尔8086组件中CS和IP寄存器的用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,正如问题所指出的,英特尔8086中CS和IP寄存器的用途是什么

So, as the question states, what is the purpose of CS and IP registers in intel's 8086

我找到了这个解释:

代码段(CS)是一个16位寄存器,包含带有处理器的64 KB段地址 指示.处理器将CS段用于对以下指令所引用指令的所有访问: 指令指针(IP)寄存器. CS寄存器不能直接更改. CS寄存器 会在远距离跳转,远距离呼叫和远距离返回指示期间自动更新.

Code segment (CS) is a 16-bit register containing address of 64 KB segment with processor instructions. The processor uses CS segment for all accesses to instructions referenced by instruction pointer (IP) register. CS register cannot be changed directly. The CS register is automatically updated during far jump, far call and far return instructions.

这是针对IP的:

指令指针(IP)是一个16位寄存器.

Instruction Pointer (IP) is a 16-bit register.

我不太了解这的基本含义,因此,如果有人可以提供更生动"的解释,那将是很好的:)

I don't really understand what this basically means, so if someone could provide a more "vivid" explanation, that would be great :)

推荐答案

由于指令指针(IP)为16位,这意味着您只能有64k条指令(2 ^ 16),即使在80年代也没有多少. .因此,为了扩展地址空间,您需要使用第二个寄存器来寻址64k块.您可以将cs:ip视为一个32位寄存器,然后可以寻址2 ^ 32字节...即4G,这是在使用32位地址的处理器上获得的. 8086使用的是20位地址,因此您可以访问1M的内存.

Since the Instruction Pointer (IP) is 16 bit it means you can only have 64k instructions (2^16), which wasn't much even in the 80s. So to expand the address space you have a second register which addresses 64k blocks. You could consider cs:ip together as one 32 bit register which is then capable of addressing 2^32 bytes...ie 4G which is what you get on a processor which uses 32 bit addresses. The 8086 was using 20 bits of addresses, so you could access 1M of memory.

这篇关于英特尔8086组件中CS和IP寄存器的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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