Welcome to our diverse blog where we explore a wide range of fascinating topics that span the realms of exam preparation, science, business, technology, web development, administration, and health. Whether you're a student, a tech enthusiast, an entrepreneur, or simply someone seeking to enhance your knowledge, this blog is designed to provide you with insightful and engaging content.
Wednesday, 8 February 2017
X86 INSTRUCTIONS:::OTHER INSTRUCTION:::FLAGS INSTRUCTIONS
While the flags register is used to report on results of executed instructions (overflow, carry, etc.), it also contains flags that affect the operation of the processor. These flags are set and cleared with special instructions.
Interrupt Flag
The IF flag tells a processor if it should accept hardware interrupts. It should be kept set under normal execution. In fact, in protected mode, neither of these instructions can be executed by user-level programs.
Syntax 1 :
sti
Sets the interrupt flag. If set, the processor can accept interrupts from peripheral hardware.
Syntax 2 :
cli
Clears the interrupt flag. Hardware interrupts cannot interrupt execution. Programs can still generate interrupts, called software interrupts, and change the flow of execution. Non-maskable interrupts (NMI) cannot be blocked using this instruction.
Direction Flag
The DF flag tells the processor which way to read data when using string instructions. That is, whether to decrement or increment the esi and edi registers after a movs instruction.
Syntax 1 :
std
Sets the direction flag. Registers will decrement, reading backwards.
Syntax 2 :
cld
Clears the direction flag. Registers will increment, reading forwards.
Carry Flag
The CF flag is often modified after arithmetic instructions, but it can be set or cleared manually as well.
Syntax 1 :
stc
Sets the carry flag.
Syntax 2 :
clc
Clears the carry flag.
Syntax 3 :
cmc
Complements (inverts) the carry flag.
Other
Syntax 1 :
sahf
Stores the content of AH register into the lower byte of the flag register.
Syntax 2 :
lahf
Loads the AH register with the contents of the lower byte of the flag register.
Subscribe to:
Post Comments (Atom)
"Exploring the Intersections: Insights into Exam Prep, Science, Business,Tech,Web-dev,Admin&Health
काबिज नजूल : आबादी भूमि पर बने मकान को विक्रय करते समय बिक्रीनामा तैयार करने की प्रक्रिया-Occupied Nazul or populated land
काबिज नजूल अथवा आबादी भूमि पर बने मकान को विक्रय करते समय बिक्रीनामा तैयार करने की प्रक्रिया: 1. दस्तावेज इकट्ठा करना: विक्रेता और खरीदार ...
-
There are several home remedies that can help alleviate headache pain. Here are a few:👍 Drink plenty of water: Dehydration can often lea...
-
Sebi Sahara Refund Application form 2023 Sebi-Sahara Refund Online Application Form 2023 सार (Summary) सहारा समूह की सहकारी समितियों के वास्...
-
MSP RATE DECLARED BY GOVERNMENT OF INDIA भारत सरकार द्वारा, रबी 2020-21 के लिए MSP घोषित कर दी गयी है | गेहूँ का समर्थन मूल्य 50 रूपए बढ़ाक...
No comments:
Post a Comment