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.

No comments:

Post a Comment

"Exploring the Intersections: Insights into Exam Prep, Science, Business,Tech,Web-dev,Admin&Health

काबिज नजूल : आबादी भूमि पर बने मकान को विक्रय करते समय बिक्रीनामा तैयार करने की प्रक्रिया-Occupied Nazul or populated land

काबिज नजूल अथवा आबादी भूमि पर बने मकान को विक्रय करते समय बिक्रीनामा तैयार करने की प्रक्रिया:   1. दस्तावेज इकट्ठा करना: विक्रेता और खरीदार ...