Processor Control commands

Source: Internet
Author: User

Used to set carry flag arbitrarily
CLC; reset carry flag: Cf defaults 0
STC; Placement carry flag: Cf Highlight 1
CMC; reverse carry MARK: Cf highlight ~ Cf

In the string operation command, you must use
CLD; reset direction sign: DF defaults 0
STD; Placement Direction Flag: DF 1_1

When writing interrupt service programs, you must control the possibility and prohibition of blocking interruptions.
CLI; reset interrupt flag: DF defaults 0
STI; pin interrupt MARK: DF limit 1

NOP
No operation is performed, but one byte storage unit is occupied, consuming one instruction execution cycle
NOP is often used for program debugging.
Use NOP to fill in the reserved instruction Space
When the code space is redundant, NOP can be used for filling.
You can also use NOP to implement software latency.
In fact, NOP, xchg ax, and ax have the same command code, both of which are 90 h

Before a block exceeded memory operand is allowed, the specified segment register addressing operand is used with the segment beyond prefix instruction.
CS:; use code segment data
SS:; use the data of the stack segment
DS:; use data segments
ES:; use data of additional segments

Lock; block the bus
This is a command prefix that can be placed before any command.
This prefix makes the output pin of the 8086 processor effective during the command execution time, that is, the bus is blocked so that other controllers cannot control the bus until the command execution is complete

Hlt; enters the paused state
The pause command causes the CPU to enter the pause State. At this time, the CPU does not perform any operations. When the CPU is reset or an external interruption occurs, the CPU is out of the paused state.
The HLT command can be used to wait for interruption in the program. Hlt is available when the program has to wait for interruption, instead of endless software loops. Then, the interrupt disconnects the CPU from the pause status and returns the next hlt command.

Authorization instructions
ESC mem
Mem indicates a storage unit. The ESC Command sends the content of the storage unit to the data bus. Of course, the ESC command does not allow immediate count and register addressing. When using a coprocessor to perform certain operations, this command can obtain commands or operations from the memory. A coprocessor (such as 8087) is a hardware that can be selected to increase the speed.

Wait; enters the waiting status
This command puts the processor in a idling state. It can also be used to wait for external interruptions, but the wait command is still returned after the interruption ends to continue waiting.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.