Advertisement
Guest User

Untitled

a guest
Mar 31st, 2019
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         MOV R1,#0FFh        ; Acc holds delay variable (1 clock)
  2.  DLY0:      MOV R2,#0FFh        ; Set up delay loop0 (2 clocks)
  3.  DLY1:      MOV R3,#08h     ; Set up delay loop1 (2 clocks)
  4.         DJNZ    R3,$        ; Dec R3 & Jump here until R3 is 0 (3 clocks)
  5.         DJNZ    R2,DLY1         ; Dec R2 & Jump DLY1 until R2 is 0 (3 clocks)
  6.         DJNZ    R1,DLY0     ; Dec R1 & Jump DLY0 until R1 is 0 (3 clocks)
  7.         RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement