📄 example1.lst
字号:
000044 0e2a MOVLW 0x2a TBLPTR = (short long)&_cinit; C:\mcc18\src\startup\c018i.c
000046 6ef6 MOVWF 0xf6,0x0
000048 0e00 MOVLW 0x0
00004a 6ef7 MOVWF 0xf7,0x0
00004c 0e00 MOVLW 0x0
00004e 6ef8 MOVWF 0xf8,0x0
_asm C:\mcc18\src\startup\c018i.c
000050 0100 MOVLB 0x0 movlb data_ptr C:\mcc18\src\startup\c018i.c
000052 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
000054 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
000056 6f85 MOVWF 0x85,0x1 movwf curr_entry, 1 C:\mcc18\src\startup\c018i.c
000058 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
00005a 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
00005c 6f86 MOVWF 0x86,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
00005e e103 BNZ 0x66 bnz 3 C:\mcc18\src\startup\c018i.c
000060 6785 TSTFSZ 0x85,0x1 tstfsz curr_entry, 1 C:\mcc18\src\startup\c018i.c
000062 d001 BRA 0x66 bra 1 C:\mcc18\src\startup\c018i.c
_endasm C:\mcc18\src\startup\c018i.c
000064 d03d BRA 0xe0 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
000066 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
000068 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
00006a 6f80 MOVWF 0x80,0x1 movwf prom, 1 C:\mcc18\src\startup\c018i.c
00006c 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
00006e 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
000070 6f81 MOVWF 0x81,0x1 movwf prom+1, 1 C:\mcc18\src\startup\c018i.c
000072 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
000074 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
000076 6f82 MOVWF 0x82,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
000078 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
/* read the destination address directly into FSR0 */ C:\mcc18\src\startup\c018i.c
00007a 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
00007c 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
00007e 6ee9 MOVWF 0xe9,0x0 movwf FSR0L, 0 C:\mcc18\src\startup\c018i.c
000080 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
000082 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
000084 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
000086 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
000088 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
/* read the destination address directly into FSR0 */ C:\mcc18\src\startup\c018i.c
00008a 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
00008c 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
00008e 6f83 MOVWF 0x83,0x1 movwf curr_byte, 1 C:\mcc18\src\startup\c018i.c
000090 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
000092 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
000094 6f84 MOVWF 0x84,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
000096 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
000098 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
00009a cff6 MOVFF 0xff6,0x87 data_ptr = TBLPTR; C:\mcc18\src\startup\c018i.c
00009c f087
00009e cff7 MOVFF 0xff7,0x88
0000a0 f088
0000a2 cff8 MOVFF 0xff8,0x89
0000a4 f089
C:\mcc18\src\startup\c018i.c
/* now assign the source address to the table pointer */ C:\mcc18\src\startup\c018i.c
0000a6 c080 MOVFF 0x80,0xff6 TBLPTR = prom; C:\mcc18\src\startup\c018i.c
0000a8 fff6
0000aa c081 MOVFF 0x81,0xff7
0000ac fff7
0000ae c082 MOVFF 0x82,0xff8
0000b0 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
0000b2 0100 MOVLB 0x0 movlb curr_byte C:\mcc18\src\startup\c018i.c
0000b4 5383 MOVF 0x83,0x1,0x1 movf curr_byte, 1, 1 C:\mcc18\src\startup\c018i.c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -