hamaXD

program 08

Jan 23rd, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 al = R16
  13. .def ah = R17
  14. .def bl = R18
  15. .def bh = R19
  16. .def cl = R20
  17. .def ch = R21
  18. .cseg
  19. .org 0x00
  20.     rjmp RESET
  21.  
  22.  
  23. RESET:  ldi al,0x70
  24.         ldi ah,0x13
  25.        
  26.         ldi bl,0x10
  27.         ldi bh,0x20
  28.        
  29.         movw cl,al
  30.         add cl,bl
  31.         add ch,bh
  32.  
  33.         ldi xl,0x08
  34.         ldi xh,0x01
  35.  
  36.         st x+,al ;add address because no writer replace
  37.         st x+,ah
  38.         st x+,bl
  39.         st x+,bh
  40.         st x+,cl
  41.         st x+,ch
  42.  
  43. END: rjmp END
  44. .dseg
  45. .org 0x108
  46.     var_a: .byte 2
  47.     var_b: .byte 2
  48.     var_c: .byte 2
  49. .eseg
Advertisement
Add Comment
Please, Sign In to add comment