当前位置:网站首页>汇编语言中的标志位: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)。
边栏推荐
- Pytorch-Yolov5从0运行Bug解决:
- How to solve the code error when storing array data into the database
- Websites that it people often visit
- Arbre binaire pour résoudre le problème (2)
- Use of go package
- Sword finger offer II 006 Sort the sum of two numbers in the array
- Okcc why is cloud call center better than traditional call center?
- 【c语言】动态规划---入门到起立
- Go branch and loop
- Www 2022 | rethinking the knowledge map completion of graph convolution network
猜你喜欢

缓存一致性解决方案——改数据时如何保证缓存和数据库中数据的一致性

The confusion I encountered when learning stm32

Realizing deep learning framework from zero -- Introduction to neural network

Hand tear - sort

Ognl和EL表达式以及内存马的安全研究

66.qt quick-qml自定义日历组件(支持竖屏和横屏)

JVM knowledge points

Delete the code you wrote? Sentenced to 10 months!

Raspberry pie GPIO pin controls traffic light and buzzer

Deep understanding of lambda expressions
随机推荐
微信小程序 - 实现获取手机验证码倒计时 60 秒(手机号+验证码登录功能)
CorelDRAW Graphics Suite2022免费图形设计软件
The difference between vectorresize and reverse.
How much is the tuition fee of SCM training class? How long is the study time?
Go language naming specification
Ognl和EL表达式以及内存马的安全研究
Pytoch --- use pytoch to predict birds
PR zero foundation introductory guide note 2
[untitled]
手撕——排序
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
2022-07-01: at the annual meeting of a company, everyone is going to play a game of giving bonuses. There are a total of N employees. Each employee has construction points and trouble points. They nee
Demonstration description of integrated base scheme
Pytoch --- use pytoch for image positioning
Pytorch-Yolov5从0运行Bug解决:
CorelDRAW graphics suite2022 free graphic design software
C语言猜数字游戏
okcc为什么云呼叫中心比传统呼叫中心更好?
Actual combat | use composite material 3 in application
Pytorch-Yolov5從0運行Bug解决: