点击确定后,重新编译链接,再打开M51文件,发现LINK MAP OF MODULE项内容变为:
LINK MAP OF MODULE: T2test2 (TIMER)
TYPE BASE LENGTH RELOCATION SEGMENT NAME
-----------------------------------------------------
* * * * * * * D A T A M E M O R Y * * * * * * *
REG 0000H 0008H ABSOLUTE "REG BANK 0"
DATA 0008H 0001H UNIT ?DT?MAIN?TIMER
DATA 0009H 0001H UNIT ?DT?GETCHAR
000AH 0016H *** GAP ***
BIT 0020H.0 0000H.1 UNIT ?BI?GETCHAR
0020H.1 0000H.7 *** GAP ***
IDATA 0021H 0001H UNIT ?STACK
* * * * * * * C O D E M E M O R Y * * * * * * *
CODE 0000H 0003H ABSOLUTE
0003H 0028H *** GAP ***
CODE 002BH 0003H ABSOLUTE
002EH 07D2H *** GAP ***
CODE 0800H 0062H UNIT ?PR?MAIN?TIMER
CODE 0862H 0027H UNIT ?PR?PUTCHAR?PUTCHAR
CODE 0889H 0026H UNIT ?C?LIB_CODE
CODE 08AFH 001FH UNIT ?PR?UART_VINIT?STARTUP
CODE 08CEH 001EH UNIT ?PR?MAIN_VINIT?STARTUP
CODE 08ECH 0011H UNIT ?PR?GETCHAR?GETCHAR
CODE 08FDH 000CH UNIT ?C_C51STARTUP
CODE 0909H 000AH UNIT ?PR?_GETKEY?_GETKEY
CODE 0913H 0004H UNIT ?PR?IO_VINIT?STARTUP
0917H 06E9H *** GAP ***
CODE 1000H 000BH UNIT ?PR?TIMER2?TIMER
在链接信息中发现TIMER2函数已经定位到地址1000H。当然在下载到目标板或者在模拟器中调试时,可以发现在地址1000H处是函数TIMER2的入口地址。至此,子函数定位完成。 |