1 / 5

DELAY

DELAY. 2 個指令週期 ( 改變 PC 值 ) RET A,x RET RETI CALL JMP. 1 個指令週期 ( 條件不成立 , 直接執行下一個指令 ) SDZ SDZA SIZ SIZA SNZ SZ 2 個指令週期 ( 條件成立 , 跳過下一個指令 ). DELAY PROC MOV A,03 ;1 x DEL1 ;C

egan
Télécharger la présentation

DELAY

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. DELAY

  2. 2個指令週期 (改變PC值) • RET A,x • RET • RETI • CALL • JMP

  3. 1個指令週期(條件不成立,直接執行下一個指令)1個指令週期(條件不成立,直接執行下一個指令) • SDZ • SDZA • SIZ • SIZA • SNZ • SZ 2個指令週期(條件成立,跳過下一個指令)

  4. DELAY PROC MOV A,03 ;1 x DEL1 ;C MOV DEL2,A ;1 x DEL1 ;C DEL_2: A,110 ;1 x 3 x DEL1 ; B MOV DEL3,A ;1 x 3 x DEL1 ; B DEL_3: SDZ DEL3 ;(109x1+2)x 3 x DEL1 ; A JMP DEL_3 ;109x2 x 3 x DEL1 ; A SDZ DEL2 ; B JMP DEL_2 ; B SDZ DEL1 ( DEL1-1)+2 ;C JMP DELAY ( DEL1-1)x2 ;C RET ; DELAY ENDP END

  5. (109x1+2)x3xDEL1=333xDEL1 • 109x2x3xDEL1=654xDEL1 • 3xDEL1+3xDEL1=6xDEL1 • 4xDEL1+4xDEL1=8xDEL1 • 1xDEL1+1xDEL1=2xDEL1 • (DEL1-1)+2 • (DEL1-1)x2 • 2 • Total 1006DEL1+1

More Related