当前位置:网站首页>汇编语言中的标志位: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)。
边栏推荐
- Read "the way to clean code" - function names should express their behavior
- What is 5g industrial wireless gateway? What functions can 5g industrial wireless gateway achieve?
- Mysql中常见的锁
- Binary tree problem solving (1)
- Introduction to JSON usage scenarios and precautions
- First acquaintance with P4 language
- Play with concurrency: what's the use of interruptedexception?
- WiFi 5GHz frequency
- Common sense of cloud server security settings
- CorelDRAW Graphics Suite2022免费图形设计软件
猜你喜欢
Thinkphp内核工单系统源码商业开源版 多用户+多客服+短信+邮件通知
Landing guide for "prohibit using select * as query field list"
Pytoch --- use pytoch for image positioning
cs架构下抓包的几种方法
Use a mask to restrict the input of the qlineedit control
Read "the way to clean code" - function names should express their behavior
LeetCode-归并排序链表
Introduction to vmware workstation and vSphere
万卷共知,一书一页总关情,TVP读书会带你突围阅读迷障!
Force buckle 540 A single element in an ordered array
随机推荐
Message mechanism -- message processing
Playing with concurrency: what are the ways of communication between threads?
云服务器的安全设置常识
[C language] basic learning notes
Binary tree problem solving (2)
Use a mask to restrict the input of the qlineedit control
How to solve the code error when storing array data into the database
A summary of common interview questions in 2022, including 25 technology stacks, has helped me successfully get an offer from Tencent
Sword finger offer II 006 Sort the sum of two numbers in the array
【leetcode】74. Search 2D matrix
Actual combat | use composite material 3 in application
Www2022 | know your way back: self training method of graph neural network under distribution and migration
Recyclerview add header
文档声明与字符编码
Deeply understand the concepts of synchronization and asynchrony, blocking and non blocking, parallel and serial
Read "the way to clean code" - function names should express their behavior
Learn what definitelytyped is through the typescript development environment of SAP ui5
Pytoch yolov5 runs bug solution from 0:
[untitled]
Federal learning: dividing non IID samples according to Dirichlet distribution