当前位置:网站首页>汇编语言中的标志位:CF、PF、AF、ZF、SF、TF、IF、DF、OF
汇编语言中的标志位:CF、PF、AF、ZF、SF、TF、IF、DF、OF
2022-07-02 04:25:00 【孙不坚1208】
一、运算结构标志位
1.CF(进位标志位):主要用来反映运算是否产生进位或借位,产生进位或借位则CF=1,否则CF=0。
2.PF(奇偶标志位):用于反映运算结果中“1”的个数的奇偶性,如果“1”的个数为偶数,则PF=1,否则,PF=0。
3.AF(辅助进位标志位):运算过程中看最后四位,不论长度为多少,最后四位向前有进位或者借位,则AF=1,否则,AF=0。
4.ZF(零标志位):用来反映运算结果是否为0,如果运算结果为0,则ZF=1,否则ZF=0。
5.SF(符号标志位):用来反映运算结果正负的符号位,运算结构为正数时,SF=0,否则SF=1。
6.OF(溢出标志位):用于反映有符号数加减运算所得结果是否溢出,如果运算结果超过当前运算位数表示的范围,则为溢出,OF=1,否则,OF=0。
二、状态控制标志位
状态控制标志位是用来控制CPU操作的,它们要通过专门的指令才能使之发生改变。
1.TF(追踪标志位):当TF被置为1 时,CPU进入单步执行方式,即每执行一条指令,产生一个单步中断请求。这种方式主要用于程序的调试。
注意:指令系统中没有专门的指令来改变标志位TF的值,但程序员可用其他办法来改变其值。
2.IF(中断允许标志位):用来决定CPU是否响应CPU外部的可屏蔽中断发出的中断请求,当IF=1时,CPU响应CPU外部的可屏蔽中断发出的中断请求,当IF=0时,CPU不响应CPU外部的可屏蔽中断发出的中断请求。
注意:不管该标志为何值,CPU都必须响应CPU外部的不可屏蔽中断所发出的中断请求,以及CPU内部产生的中断请求。
3.DF(方向标志位):在串处理指令中,每次操作后,如果DF=0,则si、di递增,如果DF=1,则si、di递减。
注意:DF的值是由程序员进行设定的。(cld命令是将DF置为0,std命令是将DF值为1)。
边栏推荐
- 初识P4语言
- Recyclerview add header
- Shutdown procedure after 60
- CY7C68013A之keil编译代码
- Wechat applet pull-down loading more waterfall flow loading
- LCM of Spreadtrum platform rotates 180 °
- Thinkphp內核工單系統源碼商業開源版 多用戶+多客服+短信+郵件通知
- Thinkphp6 limit interface access frequency
- Fluent icon demo
- 【leetcode】34. Find the first and last positions of elements in a sorted array
猜你喜欢

Shenzhen will speed up the cultivation of ecology to build a global "Hongmeng Oula city", with a maximum subsidy of 10million yuan for excellent projects
![[C language] basic learning notes](/img/d2/1aeb2d37d97b9cfe4b21aa3ac37645.png)
[C language] basic learning notes

"No war on the Western Front" we just began to love life, but we had to shoot at everything

PR zero foundation introductory guide note 2

Learn what definitelytyped is through the typescript development environment of SAP ui5

【c语言】基础篇学习笔记

Yolov5网络修改教程(将backbone修改为EfficientNet、MobileNet3、RegNet等)

CorelDRAW Graphics Suite2022免费图形设计软件

Analysis of the overall design principle of Nacos configuration center (persistence, clustering, information synchronization)

FAQ | FAQ for building applications for large screen devices
随机推荐
深圳打造全球“鸿蒙欧拉之城”将加快培育生态,优秀项目最高资助 1000 万元
Binary tree problem solving (2)
10 minutes to understand CMS garbage collector in JVM
微信小程序 - 实现获取手机验证码倒计时 60 秒(手机号+验证码登录功能)
Lei Jun wrote a blog when he was a programmer. It's awesome
Yyds dry inventory compiler and compiler tools
Opencv learning example code 3.2.4 LUT
Use of go package
【提高课】ST表解决区间最值问题【2】
IDEA xml中sql没提示,且方言设置没用。
How to model noise data? Hong Kong Baptist University's latest review paper on "label noise representation learning" comprehensively expounds the data, objective function and optimization strategy of
Alibaba cloud polkit pkexec local rights lifting vulnerability
Handling of inconsistency between cursor and hinttext position in shutter textfield
Ognl和EL表达式以及内存马的安全研究
Li Kou interview question 02.08 Loop detection
PIP installation of third-party libraries
Today's plan: February 15, 2022
Pytoch yolov5 runs bug solution from 0:
60后关机程序
How muddy is the water in the medical beauty industry with a market scale of 100 billion?