Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .include"m328Pdef.inc"
- .def al = R16
- .def ah = R17
- .def b = R18
- .def cl = R20
- .def ch = R21
- .def d = R22
- .cseg
- .org 0x00
- rjmp start
- start: ldi cl , low(500)
- ldi ch , high(500)
- ldi b ,220
- ldi d,15
- mul b,d
- movw al,R0
- add al,cl
- adc ah,ch
- ldi zl,low(var_a)
- ldi zh,high(var_a)
- st z+,al
- st z+,ah
- st z+,b
- END: rjmp END
- .dseg
- .org 0x10C
- var_a: .byte 2
- var_b: .byte 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement