Advertisement
hamaXD

A

Jan 23rd, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .include"m328Pdef.inc"
  2.  
  3. .def al = R16
  4. .def ah = R17
  5. .def b = R18
  6. .def cl = R20
  7. .def ch = R21
  8. .def d = R22
  9.  
  10. .cseg
  11. .org 0x00
  12.     rjmp start
  13.  
  14. start:  ldi cl , low(500)
  15.         ldi ch , high(500)
  16.         ldi b ,220
  17.         ldi d,15
  18.         mul b,d
  19.         movw al,R0
  20.         add al,cl
  21.         adc ah,ch
  22.  
  23.         ldi zl,low(var_a)
  24.         ldi zh,high(var_a)
  25.         st z+,al
  26.         st z+,ah
  27.         st z+,b
  28.  
  29. END: rjmp END
  30. .dseg
  31. .org 0x10C
  32. var_a: .byte 2
  33. var_b: .byte 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement