博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
NV UP EI PL NZ NA PO NC的含义(转)
阅读量:6320 次
发布时间:2019-06-22

本文共 2135 字,大约阅读时间需要 7 分钟。

原帖

The types of flags within the simple 8086 CPU are as follows, with their abbreviation in parentheses:

Overflow (OF)

Direction (DF)
Interrupt Enable (IF)
Sign (SF)
Zero (ZF)
Auxillary Carry (AF)
Parity (PF)
Carry (CF)

The functions of the flags are as follows ("cleared" means a value of 0 while "set" means a value of 1):

OF - set if the result of a signed arithmetic or logic operation is too large of a positive number or too small of a negative number to fit into the CPU's registers..

DF - set if the programmer wants to decrement the index registers (SI and DI) during string manipulation instructions. Cleared to 0 to increment.

IF - set to allow external devices to interrupt the CPU for service requests

SF - set if the most significant bit of an arithmetic/logic operation is set. Usually interpreted as a negative number when set.

ZF - set if the result of an arithmetic/logic operation is equal to 0.

AF - set if there was a carry from or borrow to bits 0-3 in the AL register.

PF - set if the number of 1s (or parity) in the low-order byte is even.

CF - set if there was a carry from or borrow to the most significant bit during last result calculation.

Now we know what the flags do, but why do their abbreviations not match the ones in your question? Because the ones in your question refer to STATES of these flags, not the flags themselves per se.

NV - means "no overflow", or the OF = 0

UP - means that string manipulation instructions will cause the index registers to increment, or DI = 0

EI - means interrupts are enabled, or IF = 1

PL - means a number is positive, or the SF = 0

NZ - means a number is not equal to 0, or the ZF = 0

NA - means no bits were carried or borrowed from bits 0-3 of the AL regiater, or the AF = 0

PO - means the number of ones is odd, or PF = 0

NC - means no bits were carried or borrowed from the most significant bit, or CF = 0

In conclusion, the 80x86 family has many more flags that do things such as processor control, program access control, power management, etc. Without these simple flags, computers would be utterly useless, not knowing how to compare and test binary data.

转载地址:http://mldaa.baihongyu.com/

你可能感兴趣的文章
httpclient用getStatusCode
查看>>
3D引擎为什么使用三角形绘制曲面
查看>>
ios入门篇 -hello Word(1)
查看>>
【十五分钟Talkshow】在.NET应用程序中访问Excel的几种方式
查看>>
图数据库titan 和 rexster安装手册
查看>>
JS--switch 语句
查看>>
go-vim配置
查看>>
jetty配置jndi数据源
查看>>
php 调用系统命令 超时
查看>>
关于“性”
查看>>
android中级篇之多线程下载
查看>>
Silverlight删除数据表格中的数据,表格头部定义全选按钮,批量删除
查看>>
并查集
查看>>
《深入Ajax架构和最佳实践》读书笔记
查看>>
SAP HANA是什么
查看>>
一位游戏制作人的“页游之惑”
查看>>
Ffmpeg和SDL如何同步视频(转)
查看>>
php单例模式
查看>>
js渐变显示渐变消失
查看>>
[置顶] 重装系统的记录
查看>>