⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exercise1.lst

📁 一个CAN学习程序
💻 LST
📖 第 1 页 / 共 5 页
字号:
                                             // Initialized data...                                                         C:\mcc18\src\startup\c018i.c
0012d2   0e2a     MOVLW     0x2a             TBLPTR = (short long)&_cinit;                                                  C:\mcc18\src\startup\c018i.c
0012d4   6ef6     MOVWF     0xf6,0x0                                                                                        
0012d6   0e00     MOVLW     0x0                                                                                             
0012d8   6ef7     MOVWF     0xf7,0x0                                                                                        
0012da   0e00     MOVLW     0x0                                                                                             
0012dc   6ef8     MOVWF     0xf8,0x0                                                                                        
                                             _asm                                                                           C:\mcc18\src\startup\c018i.c
0012de   0100     MOVLB     0x0                movlb data_ptr                                                               C:\mcc18\src\startup\c018i.c
0012e0   0009     TBLRDPOSTINC                 tblrdpostinc                                                                 C:\mcc18\src\startup\c018i.c
0012e2   50f5     MOVF      0xf5,0x0,0x0       movf TABLAT, 0, 0                                                            C:\mcc18\src\startup\c018i.c
0012e4   6fa3     MOVWF     0xa3,0x1           movwf curr_entry, 1                                                          C:\mcc18\src\startup\c018i.c
0012e6   0009     TBLRDPOSTINC                 tblrdpostinc                                                                 C:\mcc18\src\startup\c018i.c
0012e8   50f5     MOVF      0xf5,0x0,0x0       movf TABLAT, 0, 0                                                            C:\mcc18\src\startup\c018i.c
0012ea   6fa4     MOVWF     0xa4,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
0012ec   e103     BNZ       0x12f4              bnz 3                                                                       C:\mcc18\src\startup\c018i.c
0012ee   67a3     TSTFSZ    0xa3,0x1           tstfsz curr_entry, 1                                                         C:\mcc18\src\startup\c018i.c
0012f0   d001     BRA       0x12f4             bra 1                                                                        C:\mcc18\src\startup\c018i.c
                                               _endasm                                                                      C:\mcc18\src\startup\c018i.c
0012f2   d03d     BRA       0x136e             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
0012f4   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0012f6   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
0012f8   6f9e     MOVWF     0x9e,0x1       	movwf prom, 1                                                                   C:\mcc18\src\startup\c018i.c
0012fa   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0012fc   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
0012fe   6f9f     MOVWF     0x9f,0x1       	movwf prom+1, 1                                                                 C:\mcc18\src\startup\c018i.c
001300   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
001302   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
001304   6fa0     MOVWF     0xa0,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
001306   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
                                           	/* read the destination address directly into FSR0 */                           C:\mcc18\src\startup\c018i.c
001308   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
00130a   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
00130c   6ee9     MOVWF     0xe9,0x0       	movwf FSR0L, 0                                                                  C:\mcc18\src\startup\c018i.c
00130e   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
001310   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
001312   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
001314   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
001316   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
                                           	/* read the destination address directly into FSR0 */                           C:\mcc18\src\startup\c018i.c
001318   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
00131a   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
00131c   6fa1     MOVWF     0xa1,0x1       	movwf curr_byte, 1                                                              C:\mcc18\src\startup\c018i.c
00131e   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
001320   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
001322   6fa2     MOVWF     0xa2,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
001324   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
001326   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
001328   cff6     MOVFF     0xff6,0xa5           data_ptr = TBLPTR;                                                         C:\mcc18\src\startup\c018i.c
00132a   f0a5                                                                                                               
00132c   cff7     MOVFF     0xff7,0xa6                                                                                      
00132e   f0a6                                                                                                               
001330   cff8     MOVFF     0xff8,0xa7                                                                                      
001332   f0a7                                                                                                               
                                                                                                                            C:\mcc18\src\startup\c018i.c
                                                 /* now assign the source address to the table pointer */                   C:\mcc18\src\startup\c018i.c
001334   c09e     MOVFF     0x9e,0xff6           TBLPTR = prom;                                                             C:\mcc18\src\startup\c018i.c
001336   fff6                                                                                                               
001338   c09f     MOVFF     0x9f,0xff7                                                                                      
00133a   fff7                                                                                                               
00133c   c0a0     MOVFF     0xa0,0xff8                                                                                      
00133e   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 + -