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

Define word (dw)- assemblers directive-microprocessor, DW : Define Word:- ...

DW : Define Word:- The DW directive serves the same purposes as the DB directive, but now it makes the assembler  which reserves thenumber ofmemory words (16-bit) instead of by

Mmm development board, Write an account of your findings and produce a repo...

Write an account of your findings and produce a report containing all aspects of the above. Include a step-by-step 'simple User Guide' so that your program can be operated as inten

Assembly help, use">http://www.raritanval.edu/uploadedFiles/faculty/cs/full...

use">http://www.raritanval.edu/uploadedFiles/faculty/cs/full-time/Brower/CISY256/2013Spring/CISY256%20Assembly%20Project.pdf use microsoft visual 2010 and http://www.asmirvine.c

Operation system, Explain the basic method for implementing paging

Explain the basic method for implementing paging

Debug-microprocessor, Using DEBUG DEBUG.COM is a DOS efficacy that faci...

Using DEBUG DEBUG.COM is a DOS efficacy that facilitates the trouble-shooting and debugging of assembly language programs. In particular case of personal computers, all of th

Program of generate a random number, This is a short program to practice as...

This is a short program to practice assembly language loops and if/else statements. You will use various jump commands and the cmp instruction. The program will generate a random

Signal descriptions of 8086-microprocessor, Signal descriptions of 8086 : ...

Signal descriptions of 8086 : described below are common for the maximum andminimum mode bothdata lines AD15 -AD0: These are the time multiplexed andmemory I/O address. Addre

Implemented with an arm assembly language program, The problem to be solved...

The problem to be solved and implemented with an ARM assembly language program You are asked to do some image processing on an image composed of characters shaped in For exa

Arm assembly language code, You will need to upload your main.c and factori...

You will need to upload your main.c and factorial.s files and a .jpg photo of the output on your board using the Vista assignment upload features.  It must be submitted by the dead

Short-type-global-assemblers operator-microprocessor, SHORT  : The  SHO...

SHORT  : The  SHORT operator denoted to the assembler that only one byte is needed to code the displacement for a jump (for example displacement is within -128 to +127 bytes fr

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