📄 ex2.lst
字号:
// Initialized data... C:\mcc18\src\startup\c018i.c
00105c 0e2a MOVLW 0x2a TBLPTR = (short long)&_cinit; C:\mcc18\src\startup\c018i.c
00105e 6ef6 MOVWF 0xf6,0x0
001060 0e00 MOVLW 0x0
001062 6ef7 MOVWF 0xf7,0x0
001064 0e00 MOVLW 0x0
001066 6ef8 MOVWF 0xf8,0x0
_asm C:\mcc18\src\startup\c018i.c
001068 0100 MOVLB 0x0 movlb data_ptr C:\mcc18\src\startup\c018i.c
00106a 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
00106c 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
00106e 6f9b MOVWF 0x9b,0x1 movwf curr_entry, 1 C:\mcc18\src\startup\c018i.c
001070 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
001072 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
001074 6f9c MOVWF 0x9c,0x1 movwf curr_entry+1, 1 C:\mcc18\src\startup\c018i.c
_endasm C:\mcc18\src\startup\c018i.c
//while (curr_entry) C:\mcc18\src\startup\c018i.c
//{ C:\mcc18\src\startup\c018i.c
test: C:\mcc18\src\startup\c018i.c
_asm C:\mcc18\src\startup\c018i.c
001076 e103 BNZ 0x107e bnz 3 C:\mcc18\src\startup\c018i.c
001078 679b TSTFSZ 0x9b,0x1 tstfsz curr_entry, 1 C:\mcc18\src\startup\c018i.c
00107a d001 BRA 0x107e bra 1 C:\mcc18\src\startup\c018i.c
_endasm C:\mcc18\src\startup\c018i.c
00107c d03d BRA 0x10f8 goto done; C:\mcc18\src\startup\c018i.c
/* Count down so we only have to look up the data in _cinit C:\mcc18\src\startup\c018i.c
* once. C:\mcc18\src\startup\c018i.c
* C:\mcc18\src\startup\c018i.c
* At this point we know that TBLPTR points to the top of the current C:\mcc18\src\startup\c018i.c
* entry in _cinit, so we can just start reading the from, to, and C:\mcc18\src\startup\c018i.c
* size values. C:\mcc18\src\startup\c018i.c
*/ C:\mcc18\src\startup\c018i.c
_asm C:\mcc18\src\startup\c018i.c
/* read the source address */ C:\mcc18\src\startup\c018i.c
00107e 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
001080 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
001082 6f96 MOVWF 0x96,0x1 movwf prom, 1 C:\mcc18\src\startup\c018i.c
001084 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
001086 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
001088 6f97 MOVWF 0x97,0x1 movwf prom+1, 1 C:\mcc18\src\startup\c018i.c
00108a 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
00108c 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
00108e 6f98 MOVWF 0x98,0x1 movwf prom+2, 1 C:\mcc18\src\startup\c018i.c
/* skip a byte since it's stored as a 32bit int */ C:\mcc18\src\startup\c018i.c
001090 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
/* read the destination address directly into FSR0 */ C:\mcc18\src\startup\c018i.c
001092 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
001094 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
001096 6ee9 MOVWF 0xe9,0x0 movwf FSR0L, 0 C:\mcc18\src\startup\c018i.c
001098 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
00109a 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
00109c 6eea MOVWF 0xea,0x0 movwf FSR0H, 0 C:\mcc18\src\startup\c018i.c
/* skip two bytes since it's stored as a 32bit int */ C:\mcc18\src\startup\c018i.c
00109e 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
0010a0 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
/* read the destination address directly into FSR0 */ C:\mcc18\src\startup\c018i.c
0010a2 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
0010a4 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
0010a6 6f99 MOVWF 0x99,0x1 movwf curr_byte, 1 C:\mcc18\src\startup\c018i.c
0010a8 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
0010aa 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
0010ac 6f9a MOVWF 0x9a,0x1 movwf curr_byte+1, 1 C:\mcc18\src\startup\c018i.c
/* skip two bytes since it's stored as a 32bit int */ C:\mcc18\src\startup\c018i.c
0010ae 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
0010b0 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
_endasm C:\mcc18\src\startup\c018i.c
//prom = data_ptr->from; C:\mcc18\src\startup\c018i.c
//FSR0 = data_ptr->to; C:\mcc18\src\startup\c018i.c
//curr_byte = (unsigned short) data_ptr->size; C:\mcc18\src\startup\c018i.c
/* the table pointer now points to the next entry. Save it C:\mcc18\src\startup\c018i.c
* off since we'll be using the table pointer to do the copying C:\mcc18\src\startup\c018i.c
* for the entry. C:\mcc18\src\startup\c018i.c
*/ C:\mcc18\src\startup\c018i.c
0010b2 cff6 MOVFF 0xff6,0x9d data_ptr = TBLPTR; C:\mcc18\src\startup\c018i.c
0010b4 f09d
0010b6 cff7 MOVFF 0xff7,0x9e
0010b8 f09e
0010ba cff8 MOVFF 0xff8,0x9f
0010bc f09f
C:\mcc18\src\startup\c018i.c
/* now assign the source address to the table pointer */ C:\mcc18\src\startup\c018i.c
0010be c096 MOVFF 0x96,0xff6 TBLPTR = prom; C:\mcc18\src\startup\c018i.c
0010c0 fff6
0010c2 c097 MOVFF 0x97,0xff7
0010c4 fff7
0010c6 c098 MOVFF 0x98,0xff8
0010c8 fff8
C:\mcc18\src\startup\c018i.c
/* do the copy loop */ C:\mcc18\src\startup\c018i.c
_asm C:\mcc18\src\startup\c018i.c
// determine if we have any more bytes to copy C:\mcc18\src\startup\c018i.c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -