Advertisement
Guest User

Untitled

a guest
Sep 30th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .def a=r16
  2.     .def b=r17
  3.     .def c=r18
  4.  
  5.     init:
  6.         ldi tmp, LOW(RAMEND)
  7.         out SPL, tmp
  8.         ldi tmp, HIGH(RAMEND)
  9.         out SPH, tmp
  10.  
  11.     start:
  12.         ldi a, 3
  13.         ldi b, 7
  14.  
  15.     loop:
  16.         cpi a, 0
  17.         brlo end_while
  18.         dec a
  19.         dec b
  20.         ldi c, a
  21.  
  22.         cpi b, 6
  23.         brne end_loop
  24.         sub a, b
  25.  
  26.     end_loop
  27.         cpi b, 3
  28.         brne loop
  29.         dec a
  30.         rjmp loop
  31.            
  32.  
  33.     end_while:
  34.         ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement