Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- ; program04.asm
- ;
- ; Created: 1/24/2019 10:39:10 AM
- ; Author : 5935512030 Ismael hama
- ;
- ; Replace with your application code
- .include"m328Pdef.inc"
- .def al = R16
- .def ah = R17
- .def bl = R18
- .def bh = R19
- .def cl = R20
- .def ch = R21
- .cseg
- .org 0x00
- rjmp RESET
- RESET: ldi al,0x70
- ldi ah,0x13
- ldi bl,0x10
- ldi bh,0x20
- movw cl,al
- add cl,bl
- adc ch,bh
- ldi xl,low(var_a)
- ldi xh,high(var_a)
- st x+,al ;add address because no writer replace
- st x+,ah
- st x+,bl
- st x+,bh
- st x+,cl
- st x+,ch
- END: rjmp END
- .dseg
- .org 0x108
- var_a: .byte 2
- var_b: .byte 2
- var_c: .byte 2
- .eseg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement