📄 example1.lst
字号:
000166 c061 MOVFF 0x61,0xff7
000168 fff7
00016a c062 MOVFF 0x62,0xff8
00016c fff8
C:\MCC18\src\traditional\startup\c018i.c
/* do the copy loop */ C:\MCC18\src\traditional\startup\c018i.c
_asm C:\MCC18\src\traditional\startup\c018i.c
// determine if we have any more bytes to copy C:\MCC18\src\traditional\startup\c018i.c
00016e 0100 MOVLB 0x0 movlb curr_byte C:\MCC18\src\traditional\startup\c018i.c
000170 5363 MOVF 0x63,0x1,0x1 movf curr_byte, 1, 1 C:\MCC18\src\traditional\startup\c018i.c
copy_loop: C:\MCC18\src\traditional\startup\c018i.c
000172 e102 BNZ 0x178 bnz 2 // copy_one_byte C:\MCC18\src\traditional\startup\c018i.c
000174 5364 MOVF 0x64,0x1,0x1 movf curr_byte + 1, 1, 1 C:\MCC18\src\traditional\startup\c018i.c
000176 e007 BZ 0x186 bz 7 // done_copying C:\MCC18\src\traditional\startup\c018i.c
C:\MCC18\src\traditional\startup\c018i.c
copy_one_byte: C:\MCC18\src\traditional\startup\c018i.c
000178 0009 TBLRDPOSTINC tblrdpostinc C:\MCC18\src\traditional\startup\c018i.c
00017a 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\MCC18\src\traditional\startup\c018i.c
00017c 6eee MOVWF 0xee,0x0 movwf POSTINC0, 0 C:\MCC18\src\traditional\startup\c018i.c
C:\MCC18\src\traditional\startup\c018i.c
// decrement byte counter C:\MCC18\src\traditional\startup\c018i.c
00017e 0763 DECF 0x63,0x1,0x1 decf curr_byte, 1, 1 C:\MCC18\src\traditional\startup\c018i.c
000180 e2f8 BC 0x172 bc -8 // copy_loop C:\MCC18\src\traditional\startup\c018i.c
000182 0764 DECF 0x64,0x1,0x1 decf curr_byte + 1, 1, 1 C:\MCC18\src\traditional\startup\c018i.c
000184 d7f9 BRA 0x178 bra -7 // copy_one_byte C:\MCC18\src\traditional\startup\c018i.c
C:\MCC18\src\traditional\startup\c018i.c
done_copying: C:\MCC18\src\traditional\startup\c018i.c
C:\MCC18\src\traditional\startup\c018i.c
_endasm C:\MCC18\src\traditional\startup\c018i.c
/* restore the table pointer for the next entry */ C:\MCC18\src\traditional\startup\c018i.c
000186 c067 MOVFF 0x67,0xff6 TBLPTR = data_ptr; C:\MCC18\src\traditional\startup\c018i.c
000188 fff6
00018a c068 MOVFF 0x68,0xff7
00018c fff7
00018e c069 MOVFF 0x69,0xff8
000190 fff8
/* next entry... */ C:\MCC18\src\traditional\startup\c018i.c
000192 0100 MOVLB 0x0 curr_entry--; C:\MCC18\src\traditional\startup\c018i.c
000194 0765 DECF 0x65,0x1,0x1
000196 0e00 MOVLW 0x0
000198 5b66 SUBWFB 0x66,0x1,0x1
00019a d7bf BRA 0x11a goto test; C:\MCC18\src\traditional\startup\c018i.c
done: C:\MCC18\src\traditional\startup\c018i.c
; C:\MCC18\src\traditional\startup\c018i.c
00019c 0012 RETURN 0x0 } C:\MCC18\src\traditional\startup\c018i.c
/* C:\MCC18\example\users_guide\example1\leds.c
* The following sample application will flash LEDs connected to PORTB of a C:\MCC18\example\users_guide\example1\leds.c
* PIC18F452 microcontroller. The command line used to build this application C:\MCC18\example\users_guide\example1\leds.c
* is C:\MCC18\example\users_guide\example1\leds.c
* C:\MCC18\example\users_guide\example1\leds.c
* mcc18 -p 18f452 -I c:\mcc18\h leds.c C:\MCC18\example\users_guide\example1\leds.c
* C:\MCC18\example\users_guide\example1\leds.c
* where c:\mcc18 is the directory in which the compiler is installed. C:\MCC18\example\users_guide\example1\leds.c
* This sample application was designed for use with a PICDEM 2 demo board. C:\MCC18\example\users_guide\example1\leds.c
* This sample has also been tested using an MPLAB ICD 2 and a PICDEM 2 Plus C:\MCC18\example\users_guide\example1\leds.c
* demo board. This sample covers the following items: C:\MCC18\example\users_guide\example1\leds.c
* C:\MCC18\example\users_guide\example1\leds.c
* 1. Interrupt handling (#pragma interruptlow, interrupt vectors, C:\MCC18\example\users_guide\example1\leds.c
* interrupt service routines) C:\MCC18\example\users_guide\example1\leds.c
* 2. System header files C:\MCC18\example\users_guide\example1\leds.c
* 3. Processor-specific header files C:\MCC18\example\users_guide\example1\leds.c
* 4. #pragma sectiontype C:\MCC18\example\users_guide\example1\leds.c
* 5. Inline assembly C:\MCC18\example\users_guide\example1\leds.c
*/ C:\MCC18\example\users_guide\example1\leds.c
C:\MCC18\example\users_guide\example1\leds.c
/* C:\MCC18\example\users_guide\example1\leds.c
* Includes the generic processor header file. The correct processor is C:\MCC18\example\users_guide\example1\leds.c
* selected via the -p command-line option. C:\MCC18\example\users_guide\example1\leds.c
*/ C:\MCC18\example\users_guide\example1\leds.c
#include <p18cxxx.h> C:\MCC18\example\users_guide\example1\leds.c
#include <timers.h> C:\MCC18\example\users_guide\example1\leds.c
C:\MCC18\example\users_guide\example1\leds.c
#define NUMBER_OF_LEDS 8 C:\MCC18\example\users_guide\example1\leds.c
C:\MCC18\example\users_guide\example1\leds.c
void timer_isr (void); C:\MCC18\example\users_guide\example1\leds.c
C:\MCC18\example\users_guide\example1\leds.c
static unsigned char s_count = 0; C:\MCC18\example\users_guide\example1\leds.c
C:\MCC18\example\users_guide\example1\leds.c
/* C:\MCC18\example\users_guide\example1\leds.c
* For PIC18xxxx devices, the low interrupt vector is found at 000000018h. C:\MCC18\example\users_guide\example1\leds.c
* Change the default code section to the absolute code section named C:\MCC18\example\users_guide\example1\leds.c
* low_vector located at address 0x18. C:\MCC18\example\users_guide\example1\leds.c
*/ C:\MCC18\example\users_guide\example1\leds.c
#pragma code low_vector=0x18 C:\MCC18\example\users_guide\example1\leds.c
void low_interrupt (void) C:\MCC18\example\users_guide\example1\leds.c
{ C:\MCC18\example\users_guide\example1\leds.c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -