📄 psp_wrt_receiver.lst
字号:
035B: BCF 54.7
035C: MOVLW 30
035D: ADDWF 78,W
035E: BTFSS 0C.4
035F: GOTO 35E
0360: MOVWF 19
0361: BTFSC 54.6
0362: GOTO 36B
0363: MOVF 77,W
0364: MOVWF 59
0365: MOVLW 0A
0366: MOVWF 5A
0367: CALL 31A
0368: MOVF 78,W
0369: BSF 54.6
036A: GOTO 335
036B: BTFSS 54.7
036C: GOTO 371
036D: MOVLW 2D
036E: BTFSS 0C.4
036F: GOTO 36E
0370: MOVWF 19
0371: MOVLW 30
0372: ADDWF 77,W
0373: BTFSS 0C.4
0374: GOTO 373
0375: MOVWF 19
0376: RETLW 00
0377: BTFSS 57.7
0378: GOTO 37D
0379: BSF 58.7
037A: COMF 57,F
037B: INCF 57,F
037C: GOTO 385
037D: BTFSS 58.2
037E: GOTO 385
037F: MOVLW 20
0380: BTFSS 58.4
0381: MOVLW 30
0382: BTFSS 0C.4
0383: GOTO 382
0384: MOVWF 19
0385: BCF 58.6
0386: MOVF 57,W
0387: MOVWF 59
0388: MOVLW 64
0389: MOVWF 5A
038A: CALL 31A
038B: MOVF 78,W
038C: BTFSS 03.2
038D: GOTO 3AB
038E: BTFSC 58.3
038F: GOTO 3B7
0390: BTFSC 58.6
0391: GOTO 398
0392: BTFSC 58.0
0393: GOTO 398
0394: BTFSC 58.2
0395: GOTO 398
0396: BTFSC 58.7
0397: GOTO 3B7
0398: BTFSS 58.0
0399: GOTO 3A4
039A: BTFSC 58.7
039B: GOTO 3B7
039C: BTFSC 58.6
039D: GOTO 3A4
039E: BTFSC 58.0
039F: GOTO 3B7
03A0: BTFSC 58.2
03A1: GOTO 3A4
03A2: BTFSC 58.7
03A3: GOTO 3B7
03A4: MOVLW 20
03A5: BTFSS 58.4
03A6: MOVLW 30
03A7: BTFSS 0C.4
03A8: GOTO 3A7
03A9: MOVWF 19
03AA: GOTO 3B7
03AB: BTFSS 58.7
03AC: GOTO 3B2
03AD: MOVLW 2D
03AE: BTFSS 0C.4
03AF: GOTO 3AE
03B0: MOVWF 19
03B1: BCF 58.7
03B2: MOVLW 30
03B3: ADDWF 78,W
03B4: BTFSS 0C.4
03B5: GOTO 3B4
03B6: MOVWF 19
03B7: BTFSC 58.6
03B8: GOTO 3C1
03B9: MOVF 77,W
03BA: MOVWF 59
03BB: MOVLW 0A
03BC: MOVWF 5A
03BD: CALL 31A
03BE: MOVF 78,W
03BF: BSF 58.6
03C0: GOTO 38B
03C1: BTFSS 58.7
03C2: GOTO 3C7
03C3: MOVLW 2D
03C4: BTFSS 0C.4
03C5: GOTO 3C4
03C6: MOVWF 19
03C7: MOVLW 30
03C8: ADDWF 77,W
03C9: BTFSS 0C.4
03CA: GOTO 3C9
03CB: MOVWF 19
03CC: RETLW 00
.................... #include <16f877.h>
.................... //////// Standard Header file for the PIC16F877 device ////////////////
.................... //#device PIC16F877
.................... #list
....................
.................... #include <math.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. ////
.................... ////////////////////////////////////////////////////////////////////////////
.................... //// ////
.................... //// History: ////
.................... //// * 9/20/2001 : Improvments are made to sin/cos code. ////
.................... //// The code now is small, much faster, ////
.................... //// and more accurate. ////
.................... //// ////
.................... ////////////////////////////////////////////////////////////////////////////
....................
.................... #ifndef MATH_H
.................... #define MATH_H
....................
....................
.................... #undef PI
.................... #define PI 3.141592654
....................
....................
.................... #define SQRT2 1.41421356
....................
.................... //float const ps[4] = {5.9304945, 21.125224, 8.9403076, 0.29730279};
.................... //float const qs[4] = {1.0000000, 15.035723, 17.764134, 2.4934718};
....................
.................... ///////////////////////////// Round Functions //////////////////////////////
....................
.................... float CEIL_FLOOR(float x, int n)
.................... {
.................... float y, res;
.................... long l;
.................... int1 s;
....................
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... y = -y;
.................... }
....................
.................... if (y <= 32768.0)
.................... res = (float)(long)y;
....................
.................... else if (y < 10000000.0)
.................... {
.................... l = (long)(y/32768.0);
.................... y = 32768.0*(y/32768.0 - (float)l);
.................... res = 32768.0*(float)l;
.................... res += (float)(long)y;
.................... }
....................
.................... else
.................... res = y;
....................
.................... y = y - (float)(long)y;
....................
.................... if (s)
.................... res = -res;
....................
.................... if (y != 0)
.................... {
.................... if (s == 1 && n == 0)
.................... res -= 1.0;
....................
.................... if (s == 0 && n == 1)
.................... res += 1.0;
.................... }
.................... if (x == 0)
.................... res = 0;
....................
.................... return (res);
.................... }
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float floor(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : rounds down the number x.
.................... // Date : N/A
.................... //
.................... float floor(float x)
.................... {
.................... return CEIL_FLOOR(x, 0);
.................... }
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float ceil(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : rounds up the number x.
.................... // Date : N/A
.................... //
.................... float ceil(float x)
.................... {
.................... return CEIL_FLOOR(x, 1);
.................... }
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float fabs(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : Computes the absolute value of floating point number x
.................... // Returns : returns the absolute value of x
.................... // Date : N/A
.................... //
.................... #define fabs abs
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float fmod(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : Computes the floating point remainder of x/y
.................... // Returns : returns the value of x= i*y, for some integer i such that, if y
.................... // is non zero, the result has the same isgn of x na dmagnitude less than the
.................... // magnitude of y. If y is zero then a domain error occurs.
.................... // Date : N/A
.................... //
....................
.................... float fmod(float x,float y)
.................... {
.................... float i;
.................... if (y!=0.0)
.................... {
.................... i=(x/y < 0.0)?ceil(x/y): floor(x/y);
.................... return(x-(i*y));
.................... }
.................... else
.................... {
.................... #ifdef _ERRNO
.................... {
.................... errno=EDOM;
.................... }
.................... #endif
.................... }
.................... }
....................
.................... //////////////////// Exponential and logarithmic functions ////////////////////
....................
.................... #define LN2 0.6931471806
....................
.................... float const pe[6] = {0.000207455774, 0.00127100575, 0.00965065093,
.................... 0.0554965651, 0.240227138, 0.693147172};
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float exp(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the value (e^x)
.................... // Date : N/A
.................... //
.................... float exp(float x)
.................... {
.................... float y, res, r;
.................... signed int n;
.................... int1 s;
.................... #ifdef _ERRNO
.................... if(x > 88.722838)
.................... {
.................... errno=ERANGE;
.................... return(0);
.................... }
.................... #endif
.................... n = (signed long)(x/LN2);
.................... s = 0;
.................... y = x;
....................
.................... if (x < 0)
.................... {
.................... s = 1;
.................... n = -n;
.................... y = -y;
.................... }
....................
.................... res = 0.0;
.................... *(&res) = n + 0x7F;
....................
.................... y = y/LN2 - (float)n;
....................
.................... r = pe[0]*y + pe[1];
.................... r = r*y + pe[2];
.................... r = r*y + pe[3];
.................... r = r*y + pe[4];
.................... r = r*y + pe[5];
....................
.................... res = res*(1.0 + y*r);
....................
.................... if (s)
.................... res = 1.0/res;
.................... return(res);
.................... }
....................
.................... /************************************************************/
....................
.................... float const pl[4] = {0.45145214, -9.0558803, 26.940971, -19.860189};
.................... float const ql[4] = {1.0000000, -8.1354259, 16.780517, -9.9300943};
....................
.................... ////////////////////////////////////////////////////////////////////////////
.................... // float log(float x)
.................... ////////////////////////////////////////////////////////////////////////////
.................... // Description : returns the the natural log of x
.................... // Date : N/A
.................... //
.................... float log(float x)
.................... {
.................... float y, res, r, y2;
.................... signed n;
.................... #ifdef _ERRNO
.................... if(x <0)
.................... {
.................... errno=EDOM;
.................... }
.................... if(x ==0)
.................... {
.................... errno=ERANGE;
.................... return(0);
.................... }
.................... #endif
.................... y = x;
....................
.................... if (y != 1.0)
.................... {
.................... *(&y) = 0x7E;
....................
.................... y = (y - 1.0)/(y + 1.0);
....................
.................... y2=y*y;
....................
.................... res = pl[0]*y2 + pl[1];
.................... res = res*y2 + pl[2];
.................... res = res*y2 + pl[3];
....................
.................... r = ql[0]*y2 + ql[1];
.................... r = r*y2 + ql[2];
.................... r = r*y2 + ql[3];
....................
.................... res = y*res/r;
....................
.................... n = *(&x) - 0x7E;
....................
.................... if (n<0)
.................... r = -(float)-n;
.................... else
.................... r = (float)n;
....................
.................... res += r*LN2;
.................... }
....................
.................... else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -