📄 debug_com.s
字号:
.module Debug_com.C
.area text(rom, con, rel)
.dbfile E:\avr\m16_twi_24x\Debug_com.C
.dbfunc e txdpo _txdpo fV
; a -> R18
; txdbuf -> R16,R17
.even
_txdpo::
.dbline -1
.dbline 12
; #include<iom16v.h> //在此设定avr类MCU的头文件
; #include<macros.h>
; #include"xd.h"
; #include"xdprj.h"
;
;
;
;
;
; //参数:1)为要发送数据的起始地址, 2)a为数据长度
; void txdpo(uchar *txdbuf, uchar a)
; {
.dbline 13
; for(;a>0;a--)
xjmp L5
L2:
.dbline 14
; { UDR=*txdbuf;
.dbline 14
movw R30,R16
ldd R2,z+0
out 0xc,R2
.dbline 15
; txdbuf++;
subi R16,255 ; offset = 1
sbci R17,255
L6:
.dbline 16
L7:
.dbline 16
sbis 0xb,5
rjmp L6
.dbline 17
L3:
.dbline 13
dec R18
L5:
.dbline 13
clr R2
cp R2,R18
brlo L2
.dbline -2
L1:
.dbline 0 ; func end
ret
.dbsym r a 18 c
.dbsym r txdbuf 16 pc
.dbend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -