hex的反汇编文件译码及说明(获得函数地址)
anshi_0(void)
;
L0051:
rjmp L0054
; ----------- jump on last line
L0052:
ldi r24,k01
out p18,r24
L0054:
rjmp L0052
; ----------- jump on last line
ret
;----------------------*
; pc=0x56(0xAC) yanshi_1(void)
;
L0056:
rjmp L0059
; ----------- jump on last line
L0057:
ldi r24,k02
out p18,r24
L0059:
rjmp L0057
; ----------- jump on last line
ret
;----------------------*
; pc=0x5B(0xB6) yanshi_2(void)
;
L005B:
rjmp L005E
; ----------- jump on last line
L005C:
ldi r24,k04
out p18,r24
L005E:
rjmp L005C
; ----------- jump on last line
ret
;----------------------*
; pc=0x60(0xC0) void yanshi_3(void)
;
L0060:;第一个函数
rjmp L0063
; ----------- jump on last line
L0061:
ldi r24,k08
out p18,r24
L0063:
rjmp L0061
; ----------- jump on last line
ret
;----------------------*
; pc=0x65(0xCA) void int_init(void)
;
L0065:
in r24,p35
ori r24,k02
out p35,r24
in r2,p34
out p34,r2
in r24,p3B
ori r24,k40
out p3B,r24
ret
;----------------------*
; pc=0x6E(0xDC)
/*************************** 中断函数**************************/
;
L006E:
st -Y,r2;ST - Y, Rr 间接存储并执行预减操作
st -Y,r3
st -Y,r24
st -Y,r25
in r2,p3F;IN Rd, P 读入端口数据
st -Y,r2
/* if(k==0)
{SP=sp_1-2;}
*/
lds r2,D0060;LDS Rd, k 从 SRAM 中直接加载
tst r2; TST Rd 测试为 0 或负
brne L0081;BRNE k 不相等即跳转
; ----- branch on last line
lds r2,D0067
lds r3,D0068
sts (p3E+0x20),r3 ; io register
sts (p3D+0x20),r2 ; io register
rjmp L00A7
; ----------- jump on last line
L0081:/*
if(k==1)
{SP=sp_2-2;}*/
lds r24,D0060
cpi r24,k01
brne L008E
; ----- branch on last line
lds r2,D0065
lds r3,D0066
sts (p3E+0x20),r3 ; io register
sts (p3D+0x20),r2 ; io register
rjmp L00A7
; ----------- jump on last line
L008E:/*
if(k==2)
{SP=sp_3-2;}*/
lds r24,D0060
cpi r24,k02
brne L009B
; ----- branch on last line
lds r2,D0063
lds r3,D0064
sts (p3E+0x20),r3 ; io register
sts (p3D+0x20),r2 ; io register
rjmp L00A7
; ----------- jump on last line
L009B:
/*
if(k==3)
{SP=sp_4-2;}
*/
lds r24,D0060
cpi r24,k03
brne L00A7
; ----- branch on last line
lds r2,D0061
lds r3,D0062
sts (p3E+0x20),r3 ; io register
sts (p3D+0x20),r2 ; io register
L00A7:
/*k++;
if(k==4)
k=0;
*/
lds r24,D0060
subi r24,kFF
sts D0060,r24
cpi r24,k04
brne L00B1
; ----- branch on last line
clr r2
sts D0060,r2
L00B1:
ld r2,Y+
out p3F,r2
ld r25,Y+
ld r24,Y+
ld r3,Y+
ld r2,Y+
reti
/*******中断结束************************/
;----------------------*
; pc=0xB8(0x170)
;延时函数
ldi r16,k05
ldi r17,k00
L00BA:
movw r2,r16
subi r16,k01
sbci r17,k00
tst r2
brne L00BA
; ----- branch on last line
tst r3
brne L00BA
; ----- branch on last line
ret
;----------------------*
; pc=0xC2(0x184)
;;主函数部分
/**io端口初始化*/
L00C2:
ldi r24,kFF
out p1B,r24
out p1A,r24
out p18,r24
out p17,r24
out p15,r24
clr r2
out p14,r2
out p12,r24
out p11,r2
rcall L0065
rjmp L00EA
; ----------- jump on last line
L00CE:;while循环部分
in r2,p3D
in r3,p3E
sts D0068,r3; STS k, Rr 直接存储到 SRAM
sts D0067,r2
rcall L0051
in r2,p3D
in r3,p3E
sts D0066,r3
sts D0065,r2
rcall L0056
in r2,p3D
in r3,p3E
sts D0064,r3
sts D0063,r2
rcall L005B
in r2,p3D
in r3,p3E
sts D0062,r3
sts D0061,r2
rcall L0060
L00EA:
rjmp L00CE
; ----------- jump on last line
ret
;----------------------*
; pc=0xEC(0x1D8)
;
__text_end::
;
; last flash byte address = 0x01D7
; last flash word address = 0x00EB
;---------------------------------------
.area bss (abs)
.org 0x0060
;;Internal SRAM 内置的静态随机存储器D0060-D045F
__first_bss::
;
D0060:
.blkb 1
D0061:
.blkb 1
D0062:
.blkb 1
D0063:
.blkb 1
D0064:
.blkb 1
D0065:
.blkb 1
D0066:
.blkb 1
D0067:
.blkb 1
D0068:
;
__last_bss::
;
; last lds/sts data byte at 0x0068
;---------------------------------------
;
hex反汇编文件译码函数地 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)