vt.2.lst
来自「This is the source code for GSM - GPS ba」· LST 代码 · 共 1,570 行 · 第 1/5 页
LST
1,570 行
CCS PCH C Compiler, Version 3.236, 31076 16-Apr-08 11:54
Filename: vt.2.LST
ROM used: 2408 bytes (7%)
Largest free fragment is 30356
RAM used: 543 (27%) at main() level
565 (28%) worst case
Stack: 5 worst case (2 in main + 3 for interrupts)
*
0000: GOTO 04BE
*
0008: MOVFF FE8,05
000C: MOVFF FD8,06
0010: MOVFF FE0,07
0014: MOVLB 0
0016: MOVFF FE9,0D
001A: MOVFF FEA,08
001E: MOVFF FE1,09
0022: MOVFF FE2,0A
0026: MOVFF FD9,0B
002A: MOVFF FDA,0C
002E: MOVFF FF3,14
0032: MOVFF FF4,15
0036: MOVFF FFA,16
003A: MOVFF 00,0F
003E: MOVFF 01,10
0042: MOVFF 02,11
0046: MOVFF 03,12
004A: MOVFF 04,13
004E: BTFSS FF2.4
0050: GOTO 005A
0054: BTFSC FF2.1
0056: GOTO 01FE
005A: BTFSS FF0.3
005C: GOTO 0066
0060: BTFSC FF0.0
0062: GOTO 0364
0066: MOVFF 0F,00
006A: MOVFF 10,01
006E: MOVFF 11,02
0072: MOVFF 12,03
0076: MOVFF 13,04
007A: MOVFF 0D,FE9
007E: MOVFF 08,FEA
0082: MOVFF 09,FE1
0086: MOVFF 0A,FE2
008A: MOVFF 0B,FD9
008E: MOVFF 0C,FDA
0092: MOVFF 14,FF3
0096: MOVFF 15,FF4
009A: MOVFF 16,FFA
009E: MOVFF 05,FE8
00A2: MOVFF 07,FE0
00A6: MOVFF 06,FD8
00AA: RETFIE 0
.................... #include <18F4550.h>
.................... //////// Standard Header file for the PIC18F4550 device ////////////////
.................... #device PIC18F4550
.................... #list
....................
.................... #include <stdio.h>
.................... ///////////////////////////////////////////////////////////////////////////
.................... //// (C) Copyright 1996,2003 Custom Computer Services ////
.................... //// This source code may only be used by licensed users of the CCS C ////
.................... //// compiler. This source code may only be distributed to other ////
.................... //// licensed users of the CCS C compiler. No other use, reproduction ////
.................... //// or distribution is permitted without written permission. ////
.................... //// Derivative programs created using this software in object code ////
.................... //// form are not restricted in any way. ////
.................... ///////////////////////////////////////////////////////////////////////////
....................
.................... #ifndef _STDIO
.................... #define _STDIO
.................... #include <string.h>
.................... ////////////////////////////////////////////////////////////////////////////
.................... //// (C) Copyright 1996,2003 Custom Computer Services ////
.................... //// This source code may only be used by licensed users of the CCS C ////
.................... //// compiler. This source code may only be distributed to other ////
.................... //// licensed users of the CCS C compiler. No other use, reproduction ////
.................... //// or distribution is permitted without written permission. ////
.................... //// Derivative programs created using this software in object code ////
.................... //// form are not restricted in any way. ////
.................... ////////////////////////////////////////////////////////////////////////////
....................
.................... #ifndef _STRING
.................... #define _STRING
.................... #include <stddef.h>
.................... ///////////////////////////////////////////////////////////////////////////
.................... //// (C) Copyright 1996,2003 Custom Computer Services ////
.................... //// This source code may only be used by licensed users of the CCS C ////
.................... //// compiler. This source code may only be distributed to other ////
.................... //// licensed users of the CCS C compiler. No other use, reproduction ////
.................... //// or distribution is permitted without written permission. ////
.................... //// Derivative programs created using this software in object code ////
.................... //// form are not restricted in any way. ////
.................... ///////////////////////////////////////////////////////////////////////////
....................
.................... #ifndef _STDDEF
....................
.................... #define _STDDEF
....................
.................... #if sizeof(int *)==1
.................... #define ptrdiff_t int
.................... #else
.................... #define ptrdiff_t long
.................... #endif
....................
.................... #define size_t int
.................... #define wchar_t char
.................... #define NULL 0
....................
.................... #define offsetof(s,f) (offsetofbit(s,f)/8)
....................
.................... #endif
....................
.................... #include <ctype.h>
.................... ////////////////////////////////////////////////////////////////////////////
.................... //// (C) Copyright 1996,2003 Custom Computer Services ////
.................... //// This source code may only be used by licensed users of the CCS C ////
.................... //// compiler. This source code may only be distributed to other ////
.................... //// licensed users of the CCS C compiler. No other use, reproduction ////
.................... //// or distribution is permitted without written permission. ////
.................... //// Derivative programs created using this software in object code ////
.................... //// form are not restricted in any way. ////
.................... ////////////////////////////////////////////////////////////////////////////
....................
.................... #ifndef _CTYPE
.................... #define _CTYPE
....................
.................... #define islower(x) isamong(x,"abcdefghijklmnopqrstuvwxyz")
.................... #define isupper(x) isamong(x,"ABCDEFGHIJKLMNOPQRSTUVWXYZ")
.................... #define isalnum(x) isamong(x,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")
.................... #define isalpha(x) isamong(x,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")
.................... #define isdigit(x) isamong(x,"0123456789")
.................... #define isspace(x) (x==' ')
.................... #define isxdigit(x) isamong(x,"0123456789ABCDEFabcdef")
.................... #define iscntrl(x) (x<' ')
.................... #define isprint(x) (x>=' ')
.................... #define isgraph(x) (x>' ')
.................... #define ispunct(x) ((x>' ')&&!isalnum(x))
....................
.................... #endif
....................
....................
....................
....................
....................
.................... //////////////////////////////////////////////
.................... //// Uncomment the following define to ////
.................... //// allow some functions to use a ////
.................... //// quicker algorithm, but use more ROM ////
.................... //// ////
.................... //// #define FASTER_BUT_MORE_ROM ////
.................... //////////////////////////////////////////////
....................
....................
....................
.................... /*Copying functions*/
.................... /* standard template:
.................... void *memmove(void *s1, void *s2, size_t n).
.................... Copies max of n characters safely (not following ending '\0')
.................... from s2 in s1; if s2 has less than n characters, appends 0 */
....................
.................... char *memmove(void *s1,char *s2,size_t n)
.................... {
.................... char *sc1;
.................... char *sc2;
.................... sc1=s1;
.................... sc2=s2;
.................... if(sc2<sc1 && sc1 <sc2 +n)
.................... for(sc1+=n,sc2+=n;0<n;--n)
.................... *--sc1=*--sc2;
.................... else
.................... for(;0<n;--n)
.................... *sc1++=*sc2++;
.................... return s1;
.................... }
....................
.................... /* compiler ignored the name 'strcpy()'; perhaps, it's reserved?
.................... Standard template: char *strcpy(char *s1, const char *s2)
.................... copies the string s2 including the null character to s1*/
....................
.................... char *strcopy(char *s1, char *s2)
.................... {
.................... char *s;
....................
.................... for (s = s1; *s2 != 0; s++, s2++) {
.................... *s = *s2;
.................... }
.................... *s = *s2;
.................... return(s1);
.................... }
....................
.................... /* standard template:
.................... char *strncpy(char *s1, const char *s2, size_t n).
.................... Copies max of n characters (not following ending '\0')
.................... from s2 in s1; if s2 has less than n characters, appends 0 */
....................
.................... char *strncpy(char *s1, char *s2, size_t n)
.................... {
.................... char *s;
....................
.................... for (s = s1; n > 0 && *s2 != '\0'; n--)
.................... *s++ = *s2++;
.................... for (; n > 0; n--)
.................... *s++ = '\0';
....................
.................... return(s1);
.................... }
.................... /***********************************************************/
....................
.................... /*concatenation functions*/
.................... /* standard template: char *strcat(char *s1, const char *s2)
.................... appends s2 to s1*/
....................
.................... char *strcat(char *s1, char *s2)
.................... {
.................... char *s;
....................
.................... for (s = s1; *s != '\0'; ++s);
*
02AE: MOVFF 22D,231
02B2: MOVFF 22C,230
02B6: MOVFF 231,03
02BA: MOVLB 2
02BC: MOVFF 230,FE9
02C0: MOVFF 231,FEA
02C4: MOVF FEF,F
02C6: BZ 02D4
02C8: INCF x30,F
02CA: BTFSC FD8.2
02CC: INCF x31,F
02CE: MOVLB 0
02D0: BRA 02B6
02D2: MOVLB 2
.................... while(*s2 != '\0')
.................... {
02D4: MOVFF 22F,03
02D8: MOVFF 22E,FE9
02DC: MOVFF 22F,FEA
02E0: MOVF FEF,F
02E2: BZ 030A
.................... *s = *s2;
02E4: MOVFF 22E,FE9
02E8: MOVFF 22F,FEA
02EC: MOVFF FEF,234
02F0: MOVFF 231,FEA
02F4: MOVFF 230,FE9
02F8: MOVFF 234,FEF
.................... ++s;
02FC: INCF x30,F
02FE: BTFSC FD8.2
0300: INCF x31,F
.................... ++s2;
0302: INCF x2E,F
0304: BTFSC FD8.2
0306: INCF x2F,F
.................... }
0308: BRA 02D4
....................
.................... *s = '\0';
030A: MOVFF 230,FE9
030E: MOVFF 231,FEA
0312: CLRF FEF
.................... return(s1);
0314: MOVFF 22C,01
0318: MOVFF 22D,02
.................... }
031C: MOVLB 0
031E: GOTO 0394 (RETURN)
.................... /* standard template: char *strncat(char *s1, char *s2,size_t n)
.................... appends not more than n characters from s2 to s1*/
....................
.................... char *strncat(char *s1, char *s2, size_t n)
.................... {
.................... char *s;
....................
.................... for (s = s1; *s != '\0'; ++s);
.................... while(*s2 != '\0' && 0<n)
.................... {
.................... *s = *s2;
.................... ++s;
.................... ++s2;
.................... --n;
.................... }
....................
.................... *s = '\0';
.................... return(s1);
.................... }
....................
.................... /***********************************************************/
....................
....................
.................... /*comparison functions*/
.................... /* standard template: signed int memcmp(void *s1, void *s2).
.................... Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */
....................
.................... signed int memcmp(void * s1,char *s2,size_t n)
.................... {
.................... char *su1, *su2;
.................... for(su1=s1, su2=s2; 0<n; ++su1, ++su2, --n)
.................... {
.................... if(*su1!=*su2)
.................... return ((*su1<*su2)?-1:+1);
.................... }
.................... return 0;
.................... }
....................
.................... /* standard template: int strcmp(const char *s1, const char *s2).
.................... Compares s1 & s2; returns -1 if s1<s2, 0 if s1=s2, 1 if s1>s2 */
....................
.................... signed int strcmp(char *s1, char *s2)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?