1 / 11

Instruction System - CPU Control Instruction

Instruction System - CPU Control Instruction. 计算机学院 李征 Tel : 13882153765 Email : lizheng@cs.scu.edu.cn OICQ: 1340915. CPU Control Instruction. These instructions are mainly used to change CPU processing mode, and change the response mode of CPU for some special events.

macha
Download Presentation

Instruction System - CPU Control Instruction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Instruction System -CPU Control Instruction 计算机学院 李征 Tel:13882153765 Email:lizheng@cs.scu.edu.cn OICQ: 1340915

  2. CPU Control Instruction • These instructions are mainly used to change CPU processing mode, • and change the response mode of CPU for some special events.

  3. 1) Flag Operation Instruction • CLC • ;clear CF • STC • ;set CF to 1 • CMC • ;Complement CF

  4. CLC • Example: 48-bit addition • CLC • ADC AX,BX • ADC DX,CX • ADC SI, DI • Function:(SI,DX,AX)+(DI,CX,BX) • If cycle structure is used, only one ‘ADC’ instruction is needed.

  5. 1) Flag Operation Instruction • CLD ; clear DF • STD ; set DF to 1 • CLI ; clear IF • STI ;set IF to 1

  6. 1) Flag Operation Instruction • Flag operation instructions only affect the implied flag of instruction, not affect other flags.

  7. 2) Synchronization Instruction • HLT ;Halt, cut off clock for CPU • When this instruction is executed, CPU will stop any operation. • Only when ‘RESET’ signal is received, CPU will not obtain clock again.

  8. 2) Synchronization Instruction • ESC • ; prefix for 8087 instructions • When 8086/8088 CPU recognizes this prefix from instruction queue, it send this instruction to 8087.

  9. 2) Synchronization Instruction • WAIT • ; In program design, if a 8087 instruction is used, it must be followed by a ‘WAIT’ instruction. • When 8086/8088 executes ‘WAIT’, it waits the operation completion signal from 8087. • Only if the operation completion signal is received, 8088 will execute the following instructions.

  10. 2) Synchronization Instruction • LOCK • ; prefix of instructions • When ‘LOCK’ prefix is used to an instruction, the system bus is locked when it is being executed. • DMA request can not break an instruction execution with ‘LOCK’ prefix.

  11. 2) Synchronization Instruction • NOP ; No operation • ; can be used for delay. • ; can be used for program debugging.

More Related