hamaXD

ประยุทธ์ จันทร์โอช้า

Jan 23rd, 2019
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. ;
  2. ; program04.asm
  3. ;
  4. ; Created: 1/24/2019 10:39:10 AM
  5. ; Author : 5935512030 Ismael hama
  6. ;
  7.  
  8.  
  9. ; Replace with your application code
  10. .include"m328Pdef.inc"
  11.  
  12. .def a = R16
  13. .def b = R17
  14. .def c = R18
  15.  
  16. .cseg
  17. .org 0x00
  18. rjmp RESET
  19.  
  20. RESET: ldi b,24
  21. mov a,b
  22. lsl a
  23. lsl a
  24. mov c,b
  25. lsr c
  26. lsr c
  27. lsr c
  28. lsr c
  29.  
  30. ldi zl,low(var_a)
  31. ldi zh,high(var_a)
  32.  
  33. st z+,a
  34. st z+,b
  35. st z+,c
  36.  
  37. END: rjmp END
  38. .dseg
  39. .org 0x10C
  40. var_a: .byte 1
  41. var_b: .byte 1
  42. var_c: .byte 1
Advertisement
Add Comment
Please, Sign In to add comment