Flag manipulation and processor control instructions , Assembly Language

Assignment Help:

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.

 


Related Discussions:- Flag manipulation and processor control instructions

Scanning, how o create the flow chart for scan ROW4, Column 1 and 3.tq

how o create the flow chart for scan ROW4, Column 1 and 3.tq

Program to evaluate equation, Write a program to evaluate the following exp...

Write a program to evaluate the following expression. You are to evaluate the following equation: num1 - (input + num2) - (num3 + num4) Input will be a hex number input by

The real time system (rts)-microprocessor, The real time System (RTS) : ...

The real time System (RTS) : Calling the clock real-time is somewhat of a misnomer because it only shows the time setting it has been given. The RTC is the other half of chip

Login system, a pseudo-code to add username and password combination up to ...

a pseudo-code to add username and password combination up to a limit of 10

8086, Ask(2) Write a program to mask bits D3D2D1D0 and to set bits D5D4 and...

Ask(2) Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of the AX register question #Minimum 100 words accepted#

DIV subroutine, I need a division subroutine. Asks for two inputs, then dis...

I need a division subroutine. Asks for two inputs, then displays the inputs and shows the answer with a remainder. Mine isnt displaying the inputs correctly.

Help with assemly language assignment, Will be needing help with assembly l...

Will be needing help with assembly language assignments over the course of 4 weeks

Intel 8259 interrupt controller-microprocessor, Intel 8259 interrupt contro...

Intel 8259 interrupt controller :  The 8088 processor has only two interrupt control inputs, and interrupt request (INTR) and non mask able interrupt (NMI). NMI are interrupts t

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd