📄 example1.lst
字号:
copy_loop: C:\mcc18\src\startup\c018i.c
0000b6 e102 BNZ 0xbc bnz 2 // copy_one_byte C:\mcc18\src\startup\c018i.c
0000b8 5384 MOVF 0x84,0x1,0x1 movf curr_byte + 1, 1, 1 C:\mcc18\src\startup\c018i.c
0000ba e007 BZ 0xca bz 7 // done_copying C:\mcc18\src\startup\c018i.c
C:\mcc18\src\startup\c018i.c
copy_one_byte: C:\mcc18\src\startup\c018i.c
0000bc 0009 TBLRDPOSTINC tblrdpostinc C:\mcc18\src\startup\c018i.c
0000be 50f5 MOVF 0xf5,0x0,0x0 movf TABLAT, 0, 0 C:\mcc18\src\startup\c018i.c
0000c0 6eee MOVWF 0xee,0x0 movwf POSTINC0, 0 C:\mcc18\src\startup\c018i.c
C:\mcc18\src\startup\c018i.c
// decrement byte counter C:\mcc18\src\startup\c018i.c
0000c2 0783 DECF 0x83,0x1,0x1 decf curr_byte, 1, 1 C:\mcc18\src\startup\c018i.c
0000c4 e2f8 BC 0xb6 bc -8 // copy_loop C:\mcc18\src\startup\c018i.c
0000c6 0784 DECF 0x84,0x1,0x1 decf curr_byte + 1, 1, 1 C:\mcc18\src\startup\c018i.c
0000c8 d7f9 BRA 0xbc bra -7 // copy_one_byte C:\mcc18\src\startup\c018i.c
C:\mcc18\src\startup\c018i.c
done_copying: C:\mcc18\src\startup\c018i.c
C:\mcc18\src\startup\c018i.c
_endasm C:\mcc18\src\startup\c018i.c
/* restore the table pointer for the next entry */ C:\mcc18\src\startup\c018i.c
0000ca c087 MOVFF 0x87,0xff6 TBLPTR = data_ptr; C:\mcc18\src\startup\c018i.c
0000cc fff6
0000ce c088 MOVFF 0x88,0xff7
0000d0 fff7
0000d2 c089 MOVFF 0x89,0xff8
0000d4 fff8
/* next entry... */ C:\mcc18\src\startup\c018i.c
0000d6 0100 MOVLB 0x0 curr_entry--; C:\mcc18\src\startup\c018i.c
0000d8 0785 DECF 0x85,0x1,0x1
0000da 0e00 MOVLW 0x0
0000dc 5b86 SUBWFB 0x86,0x1,0x1
0000de d7bf BRA 0x5e goto test; C:\mcc18\src\startup\c018i.c
done: C:\mcc18\src\startup\c018i.c
; C:\mcc18\src\startup\c018i.c
0000e0 0012 RETURN 0x0 } C:\mcc18\src\startup\c018i.c
/* D:\c18example\example1\example1.c
* This is example 1 from "Getting Started with MPLAB C18". D:\c18example\example1\example1.c
*/ D:\c18example\example1\example1.c
D:\c18example\example1\example1.c
#include <p18cxxx.h> /* for TRISB and PORTB declarations */ D:\c18example\example1\example1.c
D:\c18example\example1\example1.c
int counter; D:\c18example\example1\example1.c
void main (void) D:\c18example\example1\example1.c
{ D:\c18example\example1\example1.c
0000e2 0e01 MOVLW 0x1 counter = 1; D:\c18example\example1\example1.c
0000e4 0100 MOVLB 0x0
0000e6 6f8a MOVWF 0x8a,0x1
0000e8 6b8b CLRF 0x8b,0x1
0000ea 6a93 CLRF 0x93,0x0 TRISB = 0; /* configure PORTB for output */ D:\c18example\example1\example1.c
0000ec 518b MOVF 0x8b,0x0,0x1 while (counter <= 15) D:\c18example\example1\example1.c
0000ee 0a00 XORLW 0x0
0000f0 aee8 BTFSS 0xe8,0x7,0x0
0000f2 d002 BRA 0xf8
0000f4 358b RLCF 0x8b,0x0,0x1
0000f6 d005 BRA 0x102
0000f8 0e0f MOVLW 0xf
0000fa 80d8 BSF 0xd8,0x0,0x0
0000fc 558a SUBFWB 0x8a,0x0,0x1
0000fe 0e00 MOVLW 0x0
000100 558b SUBFWB 0x8b,0x0,0x1
000102 e306 BNC 0x110
00010e d7ee BRA 0xec
{ D:\c18example\example1\example1.c
000104 c08a MOVFF 0x8a,0xf81 PORTB = counter; /* display value of 'counter' on the LEDs */ D:\c18example\example1\example1.c
000106 ff81
000108 2b8a INCF 0x8a,0x1,0x1 counter++; D:\c18example\example1\example1.c
00010a 0e00 MOVLW 0x0
00010c 238b ADDWFC 0x8b,0x1,0x1
} D:\c18example\example1\example1.c
000110 0012 RETURN 0x0 } D:\c18example\example1\example1.c
D:\c18example\example1\example1.c
; RCS Header $Id: cmath18.asm,v 1.2 2000/01/28 23:05:45 ConnerJ Exp $ C:\MCC18\SRC\MATH\18CXX\cmath18.asm
C:\MCC18\SRC\MATH\18CXX\cmath18.asm
; CMATH18 DATA DEFINITION FILE C:\MCC18\SRC\MATH\18CXX\cmath18.asm
C:\MCC18\SRC\MATH\18CXX\cmath18.asm
;******************************************************************************* C:\MCC18\SRC\MATH\18CXX\cmath18.asm
; VARIABLE ALLOCATION - Core math library routines C:\MCC18\SRC\MATH\18CXX\cmath18.asm
;******************************************************************************* C:\MCC18\SRC\MATH\18CXX\cmath18.asm
C:\MCC18\SRC\MATH\18CXX\cmath18.asm
MATH_DATA UDATA_ACS C:\MCC18\SRC\MATH\18CXX\cmath18.asm
C:\MCC18\SRC\MATH\18CXX\cmath18.asm
SIGN RES 1 ; save location for sign in MSB C:\MCC18\SRC\MATH\18CXX\cmath18.asm
FPFLAGS RES 1 ; floating point library exception flags C:\MCC18\SRC\MATH\18CXX\cmath18.asm
C:\MCC18\SRC\MATH\18CXX\cmath18.asm
GLOBAL SIGN, FPFLAGS C:\MCC18\SRC\MATH\18CXX\cmath18.asm
C:\MCC18\SRC\MATH\18CXX\cmath18.asm
END C:\MCC18\SRC\MATH\18CXX\cmath18.asm
LIST P=18F452 C:\MCC18\SRC\PROC\p18f452.asm
LIST C:\MCC18\SRC\PROC\p18f452.asm
END C:\MCC18\SRC\PROC\p18f452.asm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -