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

📄 counter.lst

📁 《PIC单片机C语言开发入门》所有章节源程序
💻 LST
📖 第 1 页 / 共 5 页
字号:
00019e   6ef6     MOVWF     0xf6,0x0                                                                                        
0001a0   0e00     MOVLW     0x0                                                                                             
0001a2   6ef7     MOVWF     0xf7,0x0                                                                                        
0001a4   0e00     MOVLW     0x0                                                                                             
0001a6   6ef8     MOVWF     0xf8,0x0                                                                                        
                                             _asm                                                                           C:\mcc18\src\startup\c018i.c
0001a8   0100     MOVLB     0x0                movlb data_ptr                                                               C:\mcc18\src\startup\c018i.c
0001aa   0009     TBLRDPOSTINC                 tblrdpostinc                                                                 C:\mcc18\src\startup\c018i.c
0001ac   50f5     MOVF      0xf5,0x0,0x0       movf TABLAT, 0, 0                                                            C:\mcc18\src\startup\c018i.c
0001ae   6f85     MOVWF     0x85,0x1           movwf curr_entry, 1                                                          C:\mcc18\src\startup\c018i.c
0001b0   0009     TBLRDPOSTINC                 tblrdpostinc                                                                 C:\mcc18\src\startup\c018i.c
0001b2   50f5     MOVF      0xf5,0x0,0x0       movf TABLAT, 0, 0                                                            C:\mcc18\src\startup\c018i.c
0001b4   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
0001b6   e103     BNZ       0x1be               bnz 3                                                                       C:\mcc18\src\startup\c018i.c
0001b8   6785     TSTFSZ    0x85,0x1           tstfsz curr_entry, 1                                                         C:\mcc18\src\startup\c018i.c
0001ba   d001     BRA       0x1be              bra 1                                                                        C:\mcc18\src\startup\c018i.c
                                               _endasm                                                                      C:\mcc18\src\startup\c018i.c
0001bc   d03d     BRA       0x238              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
0001be   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0001c0   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
0001c2   6f80     MOVWF     0x80,0x1       	movwf prom, 1                                                                   C:\mcc18\src\startup\c018i.c
0001c4   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0001c6   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
0001c8   6f81     MOVWF     0x81,0x1       	movwf prom+1, 1                                                                 C:\mcc18\src\startup\c018i.c
0001ca   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0001cc   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
0001ce   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
0001d0   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
                                           	/* read the destination address directly into FSR0 */                           C:\mcc18\src\startup\c018i.c
0001d2   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0001d4   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
0001d6   6ee9     MOVWF     0xe9,0x0       	movwf FSR0L, 0                                                                  C:\mcc18\src\startup\c018i.c
0001d8   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0001da   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
0001dc   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
0001de   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0001e0   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
                                           	/* read the destination address directly into FSR0 */                           C:\mcc18\src\startup\c018i.c
0001e2   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0001e4   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
0001e6   6f83     MOVWF     0x83,0x1       	movwf curr_byte, 1                                                              C:\mcc18\src\startup\c018i.c
0001e8   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0001ea   50f5     MOVF      0xf5,0x0,0x0   	movf TABLAT, 0, 0                                                               C:\mcc18\src\startup\c018i.c
0001ec   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
0001ee   0009     TBLRDPOSTINC             	tblrdpostinc                                                                    C:\mcc18\src\startup\c018i.c
0001f0   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
0001f2   cff6     MOVFF     0xff6,0x87           data_ptr = TBLPTR;                                                         C:\mcc18\src\startup\c018i.c
0001f4   f087                                                                                                               
0001f6   cff7     MOVFF     0xff7,0x88                                                                                      
0001f8   f088                                                                                                               
0001fa   cff8     MOVFF     0xff8,0x89                                                                                      
0001fc   f089                                                                                                               
                                                                                                                            C:\mcc18\src\startup\c018i.c
                                                 /* now assign the source address to the table pointer */                   C:\mcc18\src\startup\c018i.c
0001fe   c080     MOVFF     0x80,0xff6           TBLPTR = prom;                                                             C:\mcc18\src\startup\c018i.c
000200   fff6                                                                                                               
000202   c081     MOVFF     0x81,0xff7                                                                                      
000204   fff7                                                                                                               
000206   c082     MOVFF     0x82,0xff8                                                                                      
000208   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
00020a   0100     MOVLB     0x0            	movlb curr_byte                                                                 C:\mcc18\src\startup\c018i.c
00020c   5383     MOVF      0x83,0x1,0x1   	movf curr_byte, 1, 1                                                            C:\mcc18\src\startup\c018i.c
                                           copy_loop:                                                                       C:\mcc18\src\startup\c018i.c
00020e   e102     BNZ       0x214          	bnz 2 // copy_one_byte                                                          C:\mcc18\src\startup\c018i.c

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -