8086/8088 中指令指针溢出的标志 [英] Flags on Instruction pointer overflow in 8086/8088

查看:39
本文介绍了8086/8088 中指令指针溢出的标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我是 8086 架构的新手,在 Google 上找不到与以下内容相关的太多内容:

Hey guys, Im new to the 8086 architecture and have not been able to find much on Google related to the following:

在 i8086 或 i8088(即 16 位,分段寻址)上,如果指令指针(程序计数器)在 0xFFFF 处发生取指,会发生什么?我假设 CPU 递增 IP 并且它溢出并变为 0x0,而 CS 寄存器保持不变.

On the i8086 or i8088 (ie 16bit, segmented addressing) what happens if an instruction fetch occurs with the instruction pointer (program counter) at 0xFFFF? I assume the CPU increments the IP and it overflows and becomes 0x0 while the CS register remains unchanged.

但是,如果发生这种情况,是否会设置任何标志(例如标志寄存器的溢出位?)

However if this happens do any flags get set (like the overflow bit of the flags register?)

谢谢,

推荐答案

架构标志仅作为指令执行的结果而改变,而不是作为提取的结果.像您描述的溢出会导致环绕,但这不会反映在除当前 IP 之外的任何地方.

The architectural flags are changed only as the result of instruction execution, never as the result of a fetch. An overflow like you describe would result in a wraparound but this would not be reflected anywhere except the current IP.

这篇关于8086/8088 中指令指针溢出的标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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