Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Assembly Expert

Flag Manipulation and Processor Control Instructions

These instructions control the functioning of available hardware inside the processor chip. These are categorized into these types; (a) machine control instructions and (b) flag manipulation instructions. The flag manipulation instructions are directly modify some of the flags of 8086. The machine control instructions can control the usage and execution of the bus. The flag manipulation instructions and their functions are following:

CLC -   Clear carry flag

CMC -   Complement carry flag

STC -   Set carry flag

CLD -   Clear direction flag STD:-Set direction flag CLI - Clear interrupt flag STI - Set interrupt flag

These instructions modify directly the direction (DF), carry (CF) and interrupt (IF) flags. The DF and IF flag, which can be modified by using the flag manipulation instructions, further control the processor operation; like the auto increment or auto decrement and the interrupt responses modes. Thus the respective instructions may also be called as processor or machine control instructions. The other flags may be modified by using POPF  and SAHF instructions, which are termed as the data transfer instructions. No direct instructions are available for modifying the status flags except the carry flag.

The machine control instructions supported by the 8086 and 8088 are listed along with their functions below. These machine control instructions do not need any operand.

 

WAIT   -   Wait for Test input pin to go low

HLT      -   Halt the processor

NOP     -   No operation

ESC      -   Escape to external device like NDP (numeric co-processor)

LOCK   -   Bus lock instruction prefix.

After execution of the HLT instruction, the processor goes to the halt state, as explained in first Chapter. The two ways to pull it out of the halt state are to reset processor or interrupt it. When instruction NOP is executed, the processor does not execute any operation until the 4 clock cycles, except incrementing the IP by one. Then it continues with further execution after the 4 clock cycles. When executed ESC instruction, frees the bus for an external master like a peripheral or coprocessor devices.  The LOCK prefix may seem with another instruction.  When it is executed, the bus access is not endorsed for another master until the lock prefixed   instruction is executed fully. This instruction is utilized in the case of programming for multiprocessor systems. The instruction WAIT when executed holds the operation of processor with the current status until the logic level on the TEST pin set low. The processor goes on inserting WAIT states in the instruction cycle, until the TEST pin set low. Once the TEST pin set low, it continues with further execution.

 

Assembly, Programming

  • Category:- Assembly
  • Reference No.:- M9511148

Have any Question?


Related Questions in Assembly

Really need to find a correct answer to this questionwrite

Really need to find a correct answer to this question: Write a MIPS assembly program that can search for a number that is entered by a user in an array with 20 integer number. Make sure it also prints the index of the ar ...

Task 1using masm sdk write an assembly language program

TASK 1 Using MASM SDK, write an assembly language program which converts an integer inputted via the console to binary. Your program should be well commented and well formatted. TASK 2 Using MASM SDK, write an assembly l ...

Question a sequence string of one-byte ascii characters is

Question : A sequence (string) of one-byte ASCII characters is stored at memory location $600 onward. A second sequence of equal length is stored at memory location $700 onward. Each sequence ends with the character $0 ( ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As