CCS PCM C Compiler, Version 4.106, 47914               28-4-13 13:38

               Filename: C:\Users\Honza\Documents\pic\poloha_slunce\main.lst

               ROM used: 4642 words (57%)
                         Largest free fragment is 2048
               RAM used: 10 (3%) at main() level
                         154 (42%) worst case
               Stack:    4 locations

*
0000:  MOVLW  07
0001:  MOVWF  0A
0002:  GOTO   733
0003:  NOP
.................... #include "C:\Users\Honza\Documents\pic\poloha_slunce\main.h" 
.................... #include <16F887.h> 
.................... //////// Standard Header file for the PIC16F887 device //////////////// 
*
029C:  MOVF   77,W
029D:  MOVWF  73
029E:  MOVF   78,W
029F:  MOVWF  74
02A0:  MOVF   79,W
02A1:  MOVWF  75
02A2:  MOVF   7A,W
02A3:  MOVWF  76
02A4:  BSF    03.5
02A5:  MOVWF  4D
02A6:  MOVF   79,W
02A7:  MOVWF  4C
02A8:  MOVF   78,W
02A9:  MOVWF  4B
02AA:  MOVF   77,W
02AB:  MOVWF  4A
02AC:  MOVLW  C3
02AD:  MOVWF  51
02AE:  MOVLW  F5
02AF:  MOVWF  50
02B0:  MOVLW  48
02B1:  MOVWF  4F
02B2:  MOVLW  80
02B3:  MOVWF  4E
02B4:  BCF    03.5
02B5:  CALL   20E
*
0688:  MOVF   77,W
0689:  MOVWF  5E
068A:  MOVF   78,W
068B:  MOVWF  5F
068C:  MOVF   79,W
068D:  MOVWF  60
068E:  MOVF   7A,W
068F:  MOVWF  61
0690:  BSF    03.5
0691:  MOVWF  4D
0692:  BCF    03.5
0693:  MOVF   60,W
0694:  BSF    03.5
0695:  MOVWF  4C
0696:  BCF    03.5
0697:  MOVF   5F,W
0698:  BSF    03.5
0699:  MOVWF  4B
069A:  BCF    03.5
069B:  MOVF   5E,W
069C:  BSF    03.5
069D:  MOVWF  4A
069E:  CLRF   51
069F:  CLRF   50
06A0:  MOVLW  34
06A1:  MOVWF  4F
06A2:  MOVLW  86
06A3:  MOVWF  4E
06A4:  BCF    03.5
06A5:  CALL   20E
06A6:  MOVF   7A,W
06A7:  BSF    03.5
06A8:  MOVWF  49
06A9:  MOVF   79,W
06AA:  MOVWF  48
06AB:  MOVF   78,W
06AC:  MOVWF  47
06AD:  MOVF   77,W
06AE:  MOVWF  46
06AF:  BCF    03.5
06B0:  CALL   44E
.................... #device PIC16F887 
.................... #list 
....................  
.................... #device adc=8 
....................  
.................... #FUSES NOWDT                       //No Watch Dog Timer 
.................... #FUSES INTRC                       //Internal RC Osc 
.................... #FUSES NOPUT                       //No Power Up Timer 
.................... #FUSES MCLR                        //Master Clear pin enabled 
.................... #FUSES NOPROTECT                   //Code not protected from reading 
.................... #FUSES NOCPD                       //No EE protection 
.................... #FUSES NOBROWNOUT                  //No brownout reset 
.................... #FUSES IESO                        //Internal External Switch Over mode enabled 
.................... #FUSES FCMEN                       //Fail-safe clock monitor enabled 
.................... #FUSES NOLVP                       //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O 
.................... #FUSES NODEBUG                     //No Debug mode for ICD 
.................... #FUSES NOWRT                       //Program memory not write protected 
.................... #FUSES BORV40                      //Brownout reset at 4.0V 
....................  
.................... #use delay(clock=8000000) 
*
071D:  MOVLW  25
071E:  MOVWF  04
071F:  BCF    03.7
0720:  MOVF   00,W
0721:  BTFSC  03.2
0722:  GOTO   730
0723:  MOVLW  02
0724:  MOVWF  78
0725:  CLRF   77
0726:  DECFSZ 77,F
0727:  GOTO   726
0728:  DECFSZ 78,F
0729:  GOTO   725
072A:  MOVLW  97
072B:  MOVWF  77
072C:  DECFSZ 77,F
072D:  GOTO   72C
072E:  DECFSZ 00,F
072F:  GOTO   723
0730:  BCF    0A.3
0731:  BCF    0A.4
0732:  GOTO   7E2 (RETURN)
....................  
....................  
....................  
.................... #include "math.h" 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2008 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.                                 //// 
.................... ////  * 2/21/2007 :  Compiler handles & operator differently and does 
.................... ////                 not return generic (int8 *) so type cast is done   //// 
.................... ////                                                                    //// 
.................... //////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef MATH_H 
.................... #define MATH_H 
....................  
.................... #ifdef PI 
.................... #undef  PI 
.................... #endif 
.................... #define PI     3.1415926535897932 
....................  
....................  
.................... #define SQRT2  1.4142135623730950 
....................  
.................... //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 ////////////////////////////// 
....................  
.................... float32 CEIL_FLOOR(float32 x, unsigned int8 n) 
.................... { 
....................    float32 y, res; 
....................    unsigned int16 l; 
....................    int1 s; 
....................  
....................    s = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       y = -y; 
....................    } 
....................  
....................    if (y <= 32768.0) 
....................   res = (float32)(unsigned int16)y; 
....................  
....................  else if (y < 10000000.0) 
....................    { 
....................   l = (unsigned int16)(y/32768.0); 
....................       y = 32768.0*(y/32768.0 - (float32)l); 
....................   res = 32768.0*(float32)l; 
....................   res += (float32)(unsigned int16)y; 
....................  } 
....................  
....................  else 
....................   res = y; 
....................  
....................  y = y - (float32)(unsigned int16)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); 
.................... } 
....................  
.................... // Overloaded Functions to take care for new Data types in PCD 
.................... // Overloaded function CEIL_FLOOR() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 CEIL_FLOOR(float48 x, unsigned int8 n) 
.................... { 
....................    float48 y, res; 
....................    unsigned int16 l; 
....................    int1 s; 
....................  
....................    s = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       y = -y; 
....................    } 
....................  
....................    if (y <= 32768.0) 
....................   res = (float48)(unsigned int16)y; 
....................  
....................  else if (y < 10000000.0) 
....................    { 
....................   l = (unsigned int16)(y/32768.0); 
....................       y = 32768.0*(y/32768.0 - (float48)l); 
....................   res = 32768.0*(float32)l; 
....................   res += (float48)(unsigned int16)y; 
....................  } 
....................  
....................  else 
....................   res = y; 
....................  
....................  y = y - (float48)(unsigned int16)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); 
.................... } 
....................  
....................  
.................... // Overloaded function CEIL_FLOOR() for data type - Float64 
.................... float64 CEIL_FLOOR(float64 x, unsigned int8 n) 
.................... { 
....................    float64 y, res; 
....................    unsigned int16 l; 
....................    int1 s; 
....................  
....................    s = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       y = -y; 
....................    } 
....................  
....................    if (y <= 32768.0) 
....................   res = (float64)(unsigned int16)y; 
....................  
....................  else if (y < 10000000.0) 
....................    { 
....................   l = (unsigned int16)(y/32768.0); 
....................       y = 32768.0*(y/32768.0 - (float64)l); 
....................   res = 32768.0*(float64)l; 
....................   res += (float64)(unsigned int16)y; 
....................  } 
....................  
....................  else 
....................   res = y; 
....................  
....................  y = y - (float64)(unsigned int16)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); 
.................... } 
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float floor(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : rounds down the number x. 
.................... // Date : N/A 
.................... // 
.................... float32 floor(float32 x) 
.................... { 
....................    return CEIL_FLOOR(x, 0); 
.................... } 
.................... // Following 2 functions are overloaded functions of floor() for PCD 
.................... // Overloaded function floor() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 floor(float48 x) 
.................... { 
....................    return CEIL_FLOOR(x, 0); 
.................... } 
....................  
.................... // Overloaded function floor() for data type - Float64 
.................... float64 floor(float64 x) 
.................... { 
....................    return CEIL_FLOOR(x, 0); 
.................... } 
.................... #endif 
....................  
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float ceil(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : rounds up the number x. 
.................... // Date : N/A 
.................... // 
.................... float32 ceil(float32 x) 
.................... { 
....................    return CEIL_FLOOR(x, 1); 
.................... } 
.................... // Following 2 functions are overloaded functions of ceil() for PCD 
.................... // Overloaded function ceil() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 ceil(float48 x) 
.................... { 
....................    return CEIL_FLOOR(x, 1); 
.................... } 
....................  
.................... // Overloaded function ceil() for data type - Float64 
.................... float64 ceil(float64 x) 
.................... { 
....................    return CEIL_FLOOR(x, 1); 
.................... } 
.................... #endif 
....................  
....................  //////////////////////////////////////////////////////////////////////////// 
.................... //   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(float32 x,float32 y) 
.................... { 
....................    float32 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 
....................    } 
.................... } 
.................... //Overloaded function for fmod() for PCD 
.................... // Overloaded function fmod() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 fmod(float48 x,float48 y) 
.................... { 
....................    float48 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 
....................    } 
.................... } 
.................... // Overloaded function fmod() for data type - Float64 
.................... float64 fmod(float64 x,float64 y) 
.................... { 
....................    float64 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 
....................    } 
.................... } 
.................... #endif 
.................... //////////////////// Exponential and logarithmic functions //////////////////// 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float exp(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the value (e^x) 
.................... // Date : N/A 
.................... // 
.................... #define LN2 0.6931471805599453 
....................  
.................... float const pe[6] = {0.000207455774, 0.00127100575, 0.00965065093, 
....................                      0.0554965651,  0.240227138,  0.693147172}; 
....................  
....................  
.................... float32 exp(float32 x) 
.................... { 
....................    float32 y, res, r; 
....................    #if defined(__PCD__) 
....................    int8 data1; 
....................    #endif 
....................    signed int8 n; 
....................    int1 s; 
....................    #ifdef _ERRNO 
....................    if(x > 88.722838) 
....................    { 
....................       errno=ERANGE; 
....................       return(0); 
....................    } 
....................    #endif 
....................    n = (signed int16)(x/LN2); 
....................    s = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       n = -n; 
....................       y = -y; 
....................    } 
....................  
....................    res = 0.0; 
.................... #if !defined(__PCD__) 
....................    *((unsigned int8 *)(&res)) = n + 0x7F; 
.................... #endif 
....................  
.................... #if defined(__PCD__)  // Takes care of IEEE format for PCD 
....................    data1 = n+0x7F; 
....................    if(bit_test(data1,0)) 
....................    bit_set(*(((unsigned int8 *)(&res)+2)),7); 
....................    rotate_right(&data1,1); 
....................    bit_clear(data1,7); 
....................    *(((unsigned int8 *)(&res)+3)) = data1; 
.................... #endif 
....................  
....................    y = y/LN2 - (float32)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); 
.................... } 
....................  
....................  
.................... //Overloaded function for exp() for PCD 
.................... // Overloaded function exp() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 exp(float48 x) 
.................... { 
....................    float48 y, res, r; 
....................    int8 data1; 
....................    signed int8 n; 
....................    int1 s; 
....................    #ifdef _ERRNO 
....................    if(x > 88.722838) 
....................    { 
....................       errno=ERANGE; 
....................       return(0); 
....................    } 
....................    #endif 
....................    n = (signed int16)(x/LN2); 
....................    s = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       n = -n; 
....................       y = -y; 
....................    } 
....................  
....................    res = 0.0; 
....................  
....................    data1 = n+0x7F; 
....................    if(bit_test(data1,0)) 
....................    bit_set(*(((unsigned int8 *)(&res)+4)),7); 
....................    rotate_right(&data1,1); 
....................    bit_clear(data1,7); 
....................    *(((unsigned int8 *)(&res)+5)) = data1; 
....................  
....................    y = y/LN2 - (float48)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); 
.................... } 
....................  
.................... // Overloaded function exp() for data type - Float64 
.................... float64 exp(float64 x) 
.................... { 
....................    float64 y, res, r; 
....................    unsigned int16 data1, data2; 
....................    unsigned int16 *p; 
....................    signed int16 n; 
....................    int1 s; 
....................    #ifdef _ERRNO 
....................    if(x > 709.7827128) 
....................    { 
....................       errno=ERANGE; 
....................       return(0); 
....................    } 
....................    #endif 
....................    n = (signed int16)(x/LN2); 
....................    s = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       n = -n; 
....................       y = -y; 
....................    } 
....................  
....................    res = 0.0; 
....................  
.................... #if !defined(__PCD__) 
....................    *((unsigned int16 *)(&res)) = n + 0x7F; 
.................... #endif 
....................    p= (((unsigned int16 *)(&res))+3); 
....................    data1 = *p; 
....................    data2 = *p;    
....................    data1 = n + 0x3FF; 
....................    data1 = data1 <<4; 
....................    if(bit_test(data2,15)) 
....................    bit_set(data1,15); 
....................    data2 = data2 & 0x000F; 
....................    data1 ^= data2; 
....................  
....................    *(((unsigned int16 *)(&res)+3)) = data1; 
....................  
....................  
....................    y = y/LN2 - (float64)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); 
.................... } 
....................  
.................... #ENDIF 
....................  
....................  
.................... /************************************************************/ 
....................  
.................... float32 const pl[4] = {0.45145214, -9.0558803, 26.940971, -19.860189}; 
.................... float32 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 
.................... // 
.................... float32 log(float32 x) 
.................... { 
....................    float32 y, res, r, y2; 
....................    #if defined(__PCD__) 
....................    unsigned int8  data1,data2; 
....................    #endif 
....................    signed int8 n; 
....................    #ifdef _ERRNO 
....................    if(x <0) 
....................    { 
....................       errno=EDOM; 
....................    } 
....................    if(x ==0) 
....................    { 
....................       errno=ERANGE; 
....................       return(0); 
....................    } 
....................    #endif 
....................    y = x; 
....................  
....................    if (y != 1.0) 
....................    { 
.................... #if !defined(__PCD__) 
....................     *((unsigned int8 *)(&y)) = 0x7E;  
.................... #endif 
....................  
.................... #if defined(__PCD__) // Takes care of IEEE format 
....................    data2 = *(((unsigned int8 *)(&y))+3); 
....................    *(((unsigned int8 *)(&y))+3) = 0x3F; 
....................    data1 = *(((unsigned int8 *)(&y))+2); 
....................    bit_clear(data1,7); 
....................    *(((unsigned int8 *)(&y))+2) = data1; 
....................    if(bit_test(data2,7)) 
....................    bit_set(*(((unsigned int8 *)(&y))+3),7); 
.................... #endif 
....................  
....................       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; 
.................... #if !defined(__PCD__) 
....................       n = *((unsigned int8 *)(&x)) - 0x7E; 
.................... #endif 
.................... #if defined(__PCD__)  
....................     data1 = *(((unsigned int8 *)(&x)+3)); 
....................     rotate_left(&data1,1); 
....................     data2 = *(((unsigned int8 *)(&x)+2)); 
....................     if(bit_test (data2,7)) 
....................       bit_set(data1,0); 
....................     n = data1 - 0x7E; 
.................... #endif 
....................  
....................       if (n<0)  
....................          r = -(float32)-n; 
....................       else 
....................          r = (float32)n; 
....................  
....................       res += r*LN2; 
....................    } 
....................  
....................    else 
....................       res = 0.0; 
....................  
....................    return(res); 
.................... } 
....................  
.................... //Overloaded function for log() for PCD 
.................... // Overloaded function log() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 log(float48 x) 
.................... { 
....................    float48 y, res, r, y2; 
....................    unsigned int8  data1,data2; 
....................    signed int8 n; 
....................    #ifdef _ERRNO 
....................    if(x <0) 
....................    { 
....................       errno=EDOM; 
....................    } 
....................    if(x ==0) 
....................    { 
....................       errno=ERANGE; 
....................       return(0); 
....................    } 
....................    #endif 
....................    y = x; 
....................  
....................    if (y != 1.0) 
....................    { 
....................     
....................    #if !defined(__PCD__) 
....................        *((unsigned int8 *)(&y)) = 0x7E;  
....................    #endif 
....................       data2 = *(((unsigned int8 *)(&y))+5); 
....................       *(((unsigned int8 *)(&y))+5) = 0x3F; 
....................       data1 = *(((unsigned int8 *)(&y))+4); 
....................       bit_clear(data1,7); 
....................       *(((unsigned int8 *)(&y))+4) = data1; 
....................    
....................       if(bit_test(data2,7)) 
....................          bit_set(*(((unsigned int8 *)(&y))+4),7); 
....................       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; 
....................  
....................     data1 = *(((unsigned int8 *)(&x)+5)); 
....................     rotate_left(&data1,1); 
....................     data2 = *(((unsigned int8 *)(&x)+4)); 
....................     if(bit_test (data2,7)) 
....................        bit_set(data1,0); 
....................       
....................     n = data1 - 0x7E; 
....................  
....................       if (n<0) 
....................          r = -(float48)-n; 
....................       else 
....................          r = (float48)n; 
....................  
....................       res += r*LN2; 
....................    } 
....................  
....................    else 
....................       res = 0.0; 
....................  
....................    return(res); 
.................... } 
....................  
.................... // Overloaded function log() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float32 const pl_64[4] = {0.45145214, -9.0558803, 26.940971, -19.860189}; 
.................... float32 const ql_64[4] = {1.0000000,  -8.1354259, 16.780517, -9.9300943}; 
.................... #endif 
.................... float64 log(float64 x) 
.................... { 
....................    float64 y, res, r, y2; 
....................    unsigned int16  data1,data2; 
....................    unsigned int16 *p; 
....................    signed int16 n; 
....................    #ifdef _ERRNO 
....................    if(x <0) 
....................    { 
....................       errno=EDOM; 
....................    } 
....................    if(x ==0) 
....................    { 
....................       errno=ERANGE; 
....................       return(0); 
....................    } 
....................    #endif 
....................    y = x; 
....................  
....................    if (y != 1.0) 
....................    { 
....................    #if !defined(__PCD__) 
....................        *((unsigned int8 *)(&y)) = 0x7E;  
....................    #endif 
....................       p= (((unsigned int16 *)(&y))+3); 
....................       data1 = *p; 
....................       data2 = *p; 
....................       data1 = 0x3FE; 
....................       data1 = data1 <<4; 
....................       if(bit_test (data2,15)) 
....................       bit_set(data1,15); 
....................       data2 = data2 & 0x000F; 
....................       data1 ^=data2; 
....................  
....................       *p = data1; 
....................  
....................       y = (y - 1.0)/(y + 1.0); 
....................  
....................       y2=y*y; 
....................  
....................       res = pl_64[0]*y2 + pl_64[1]; 
....................       res = res*y2 + pl_64[2]; 
....................       res = res*y2 + pl_64[3]; 
....................  
....................       r = ql_64[0]*y2 + ql_64[1]; 
....................       r = r*y2 + ql_64[2]; 
....................       r = r*y2 + ql_64[3]; 
....................  
....................       res = y*res/r; 
....................   
....................       p= (((unsigned int16 *)(&x))+3); 
....................       data1 = *p; 
....................       bit_clear(data1,15); 
....................       data1 = data1 >>4;     
....................       n = data1 - 0x3FE; 
....................  
....................  
....................       if (n<0) 
....................          r = -(float64)-n; 
....................       else 
....................          r = (float64)n; 
....................  
....................       res += r*LN2; 
....................    } 
....................  
....................    else 
....................       res = 0.0; 
....................  
....................    return(res); 
.................... } 
.................... #endif 
....................  
....................  
.................... #define LN10 2.3025850929940456 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float log10(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the the log base 10 of x 
.................... // Date : N/A 
.................... // 
.................... float32 log10(float32 x) 
.................... { 
....................    float32 r; 
....................  
....................    r = log(x); 
....................    r = r/LN10; 
....................    return(r); 
.................... } 
....................  
.................... //Overloaded functions for log10() for PCD 
.................... // Overloaded function log10() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 log10(float48 x) 
.................... { 
....................    float48 r; 
....................  
....................    r = log(x); 
....................    r = r/LN10; 
....................    return(r); 
.................... } 
....................  
.................... // Overloaded function log10() for data type - Float64 
.................... float64 log10(float64 x) 
.................... { 
....................    float64 r; 
....................  
....................    r = log(x); 
....................    r = r/LN10; 
....................    return(r); 
.................... } 
.................... #endif 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float modf(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description :breaks the argument value int integral and fractional parts, 
.................... // ach of which have the same sign as the argument.  It stores the integral part 
.................... // as a float in the object pointed to by the iptr 
.................... // Returns : returns the signed fractional part of value. 
.................... // Date : N/A 
.................... // 
....................  
.................... float32 modf(float32 value,float32 *iptr) 
.................... { 
....................    *iptr=(value < 0.0)? ceil(value): floor(value); 
....................    return(value - *iptr); 
.................... } 
.................... //Overloaded functions for modf() for PCD 
.................... // Overloaded function modf() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 modf(float48 value,float48 *iptr) 
.................... { 
....................    *iptr=(value < 0.0)? ceil(value): floor(value); 
....................    return(value - *iptr); 
.................... } 
.................... // Overloaded function modf() for data type - Float64 
.................... float64 modf(float64 value,float64 *iptr) 
.................... { 
....................    *iptr=(value < 0.0)? ceil(value): floor(value); 
....................    return(value - *iptr); 
.................... } 
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float pwr(float x,float y) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the value (x^y) 
.................... // Date : N/A 
.................... // Note : 0 is returned when the function will generate an imaginary number 
.................... // 
.................... float32 pwr(float32 x,float32 y) 
.................... { 
....................    if(0 > x && fmod(y, 1) == 0) { 
....................       if(fmod(y, 2) == 0) { 
....................          return (exp(log(-x) * y)); 
....................       } else { 
....................          return (-exp(log(-x) * y)); 
....................       } 
....................    } else if(0 > x && fmod(y, 1) != 0) { 
....................       return 0; 
....................    } else { 
....................       if(x != 0 || 0 >= y) { 
....................          return (exp(log(x) * y)); 
....................       } 
....................    } 
.................... } 
.................... //Overloaded functions for pwr() for PCD 
.................... // Overloaded function pwr() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 pwr(float48 x,float48 y) 
.................... { 
....................    if(0 > x && fmod(y, 1) == 0) { 
....................       if(fmod(y, 2) == 0) { 
....................          return (exp(log(-x) * y)); 
....................       } else { 
....................          return (-exp(log(-x) * y)); 
....................       } 
....................    } else if(0 > x && fmod(y, 1) != 0) { 
....................       return 0; 
....................    } else { 
....................       if(x != 0 || 0 >= y) { 
....................          return (exp(log(x) * y)); 
....................       } 
....................    } 
.................... } 
.................... // Overloaded function pwr() for data type - Float64 
.................... float64 pwr(float64 x,float64 y) 
.................... { 
....................    if(0 > x && fmod(y, 1) == 0) { 
....................       if(fmod(y, 2) == 0) { 
....................          return (exp(log(-x) * y)); 
....................       } else { 
....................          return (-exp(log(-x) * y)); 
....................       } 
....................    } else if(0 > x && fmod(y, 1) != 0) { 
....................       return 0; 
....................    } else { 
....................       if(x != 0 || 0 >= y) { 
....................          return (exp(log(x) * y)); 
....................       } 
....................    } 
.................... } 
.................... #endif 
....................  
.................... //////////////////// Power functions //////////////////// 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float pow(float x,float y) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the value (x^y) 
.................... // Date : N/A 
.................... // Note : 0 is returned when the function will generate an imaginary number 
.................... // 
.................... float32 pow(float32 x,float32 y) 
.................... { 
....................    if(0 > x && fmod(y, 1) == 0) { 
....................       if(fmod(y, 2) == 0) { 
....................          return (exp(log(-x) * y)); 
....................       } else { 
....................          return (-exp(log(-x) * y)); 
....................       } 
....................    } else if(0 > x && fmod(y, 1) != 0) { 
....................       return 0; 
....................    } else { 
....................       if(x != 0 || 0 >= y) { 
....................          return (exp(log(x) * y)); 
....................       } 
....................    } 
.................... } 
.................... //Overloaded functions for pow() for PCD 
.................... // Overloaded function for pow() data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 pow(float48 x,float48 y) 
.................... { 
....................    if(0 > x && fmod(y, 1) == 0) { 
....................       if(fmod(y, 2) == 0) { 
....................          return (exp(log(-x) * y)); 
....................       } else { 
....................          return (-exp(log(-x) * y)); 
....................       } 
....................    } else if(0 > x && fmod(y, 1) != 0) { 
....................       return 0; 
....................    } else { 
....................       if(x != 0 || 0 >= y) { 
....................          return (exp(log(x) * y)); 
....................       } 
....................    } 
.................... } 
....................  
.................... // Overloaded function pow() for data type - Float64 
.................... float64 pow(float64 x,float64 y) 
.................... { 
....................    if(0 > x && fmod(y, 1) == 0) { 
....................       if(fmod(y, 2) == 0) { 
....................          return (exp(log(-x) * y)); 
....................       } else { 
....................          return (-exp(log(-x) * y)); 
....................       } 
....................    } else if(0 > x && fmod(y, 1) != 0) { 
....................       return 0; 
....................    } else { 
....................       if(x != 0 || 0 >= y) { 
....................          return (exp(log(x) * y)); 
....................       } 
....................    } 
.................... } 
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float sqrt(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the square root of x 
.................... // Date : N/A 
.................... // 
.................... float32 sqrt(float32 x) 
.................... { 
....................    float32 y, res; 
....................    #if defined(__PCD__) 
....................    unsigned int16 data1,data2; 
....................    #endif 
....................    BYTE *p; 
....................  
....................    #ifdef _ERRNO 
....................    if(x < 0) 
....................    { 
....................       errno=EDOM; 
....................    } 
....................    #endif 
....................  
....................    if( x<=0.0) 
*
0888:  MOVF   2C,W
0889:  MOVWF  49
088A:  MOVF   2B,W
088B:  MOVWF  48
088C:  MOVF   2A,W
088D:  MOVWF  47
088E:  MOVF   29,W
088F:  MOVWF  46
0890:  CLRF   4D
0891:  CLRF   4C
0892:  CLRF   4B
0893:  CLRF   4A
0894:  BCF    0A.3
0895:  BCF    03.5
0896:  CALL   40D
0897:  BSF    0A.3
0898:  BTFSC  03.0
0899:  GOTO   09C
089A:  BTFSS  03.2
089B:  GOTO   0A1
....................       return(0.0); 
089C:  CLRF   77
089D:  CLRF   78
089E:  CLRF   79
089F:  CLRF   7A
08A0:  GOTO   129
....................  
....................    y=x; 
08A1:  BSF    03.5
08A2:  MOVF   2C,W
08A3:  MOVWF  30
08A4:  MOVF   2B,W
08A5:  MOVWF  2F
08A6:  MOVF   2A,W
08A7:  MOVWF  2E
08A8:  MOVF   29,W
08A9:  MOVWF  2D
....................     
....................    #if !defined(__PCD__) 
....................     p=&y; 
08AA:  CLRF   36
08AB:  MOVLW  AD
08AC:  MOVWF  35
....................    (*p)=(BYTE)((((unsigned int16)(*p)) + 127) >> 1); 
08AD:  MOVF   35,W
08AE:  MOVWF  04
08AF:  BCF    03.7
08B0:  BTFSC  36.0
08B1:  BSF    03.7
08B2:  MOVF   00,W
08B3:  CLRF   3A
08B4:  MOVWF  39
08B5:  MOVLW  7F
08B6:  ADDWF  39,F
08B7:  BTFSC  03.0
08B8:  INCF   3A,F
08B9:  BCF    03.0
08BA:  RRF    3A,W
08BB:  MOVWF  7A
08BC:  RRF    39,W
08BD:  MOVWF  79
08BE:  MOVWF  39
08BF:  MOVF   35,W
08C0:  MOVWF  04
08C1:  BCF    03.7
08C2:  BTFSC  36.0
08C3:  BSF    03.7
08C4:  MOVF   39,W
08C5:  MOVWF  00
....................    #endif 
....................     
....................    #if defined(__PCD__) 
....................     p = (((unsigned int8 *)(&y))+3); 
....................     data1 = *(((unsigned int8 *)(&y))+3); 
....................     data2 = *(((unsigned int8 *)(&y))+2); 
....................     rotate_left(&data1,1);     
....................     if(bit_test(data2,7))     
....................     bit_set(data1,0);     
....................     data1 = ((data1+127) >>1); 
....................     bit_clear(data2,7); 
....................     if(bit_test(data1,0)) 
....................     bit_set(data2,7); 
....................     data1 = data1 >>1; 
....................     *(((unsigned int8 *)(&y))+3) = data1; 
....................     *(((unsigned int8 *)(&y))+2) = data2; 
....................      
....................   #endif 
....................  
....................    do { 
....................       res=y; 
08C6:  MOVF   30,W
08C7:  MOVWF  34
08C8:  MOVF   2F,W
08C9:  MOVWF  33
08CA:  MOVF   2E,W
08CB:  MOVWF  32
08CC:  MOVF   2D,W
08CD:  MOVWF  31
....................       y+=(x/y); 
08CE:  MOVF   2C,W
08CF:  MOVWF  49
08D0:  MOVF   2B,W
08D1:  MOVWF  48
08D2:  MOVF   2A,W
08D3:  MOVWF  47
08D4:  MOVF   29,W
08D5:  MOVWF  46
08D6:  MOVF   30,W
08D7:  MOVWF  4D
08D8:  MOVF   2F,W
08D9:  MOVWF  4C
08DA:  MOVF   2E,W
08DB:  MOVWF  4B
08DC:  MOVF   2D,W
08DD:  MOVWF  4A
08DE:  BCF    0A.3
08DF:  BCF    03.5
08E0:  CALL   142
08E1:  BSF    0A.3
08E2:  BCF    03.1
08E3:  BSF    03.5
08E4:  MOVF   30,W
08E5:  MOVWF  4D
08E6:  MOVF   2F,W
08E7:  MOVWF  4C
08E8:  MOVF   2E,W
08E9:  MOVWF  4B
08EA:  MOVF   2D,W
08EB:  MOVWF  4A
08EC:  MOVF   7A,W
08ED:  MOVWF  51
08EE:  MOVF   79,W
08EF:  MOVWF  50
08F0:  MOVF   78,W
08F1:  MOVWF  4F
08F2:  MOVF   77,W
08F3:  MOVWF  4E
08F4:  BCF    0A.3
08F5:  BCF    03.5
08F6:  CALL   2C7
08F7:  BSF    0A.3
08F8:  MOVF   7A,W
08F9:  BSF    03.5
08FA:  MOVWF  30
08FB:  MOVF   79,W
08FC:  MOVWF  2F
08FD:  MOVF   78,W
08FE:  MOVWF  2E
08FF:  MOVF   77,W
0900:  MOVWF  2D
....................  
....................       #if !defined(__PCD__) 
....................      (*p)--; 
0901:  MOVF   35,W
0902:  MOVWF  04
0903:  BCF    03.7
0904:  BTFSC  36.0
0905:  BSF    03.7
0906:  DECF   00,F
....................    #endif 
....................     
....................    #if defined(__PCD__) 
....................     data1 = *(((unsigned int8 *)(&y))+3); 
....................     data2 = *(((unsigned int8 *)(&y))+2); 
....................     rotate_left(&data1,1); 
....................     if(bit_test(data2,7)) 
....................     bit_set(data1,0);     
....................     data1--; 
....................     bit_clear(data2,7); 
....................     if(bit_test(data1,0)) 
....................     bit_set(data2,7); 
....................     data1 = data1 >>1; 
....................     *(((unsigned int8 *)(&y))+3) = data1; 
....................     *(((unsigned int8 *)(&y))+2) = data2; 
....................      
....................   #endif 
....................    } while(res != y); 
0907:  MOVF   34,W
0908:  MOVWF  49
0909:  MOVF   33,W
090A:  MOVWF  48
090B:  MOVF   32,W
090C:  MOVWF  47
090D:  MOVF   31,W
090E:  MOVWF  46
090F:  MOVF   30,W
0910:  MOVWF  4D
0911:  MOVF   2F,W
0912:  MOVWF  4C
0913:  MOVF   2E,W
0914:  MOVWF  4B
0915:  MOVF   2D,W
0916:  MOVWF  4A
0917:  BCF    0A.3
0918:  BCF    03.5
0919:  CALL   40D
091A:  BSF    0A.3
091B:  BTFSC  03.2
091C:  GOTO   11F
091D:  BSF    03.5
091E:  GOTO   0C6
....................  
....................    return(res); 
091F:  BSF    03.5
0920:  MOVF   31,W
0921:  MOVWF  77
0922:  MOVF   32,W
0923:  MOVWF  78
0924:  MOVF   33,W
0925:  MOVWF  79
0926:  MOVF   34,W
0927:  MOVWF  7A
0928:  BCF    03.5
.................... } 
.................... //Overloaded functions for sqrt() for PCD 
.................... // Overloaded function sqrt() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 sqrt(float48 x) 
.................... { 
....................    float48 y, res; 
....................    unsigned int16 data1,data2; 
....................    BYTE *p; 
....................  
....................    #ifdef _ERRNO 
....................    if(x < 0) 
....................    { 
....................       errno=EDOM; 
....................    } 
....................    #endif 
....................  
....................    if( x<=0.0) 
....................       return(0.0); 
....................  
....................    y=x; 
....................     
....................    #if !defined(__PCD__) 
....................     p=&y; 
....................    (*p)=(BYTE)((((unsigned int16)(*p)) + 127) >> 1); 
....................    #endif 
....................     
....................    #if defined(__PCD__) 
....................     p = (((unsigned int8 *)(&y))+5); 
....................     data1 = *(((unsigned int8 *)(&y))+5); 
....................     data2 = *(((unsigned int8 *)(&y))+4); 
....................     rotate_left(&data1,1); 
....................     if(bit_test(data2,7)) 
....................     bit_set(data1,0);     
....................     data1 = ((data1+127) >>1); 
....................     bit_clear(data2,7); 
....................     if(bit_test(data1,0)) 
....................     bit_set(data2,7); 
....................     data1 = data1 >>1; 
....................     *(((unsigned int8 *)(&y))+5) = data1; 
....................     *(((unsigned int8 *)(&y))+4) = data2; 
....................      
....................   #endif 
....................  
....................    do { 
....................       res=y; 
....................       y+=(x/y); 
....................  
....................       #if !defined(__PCD__) 
....................      (*p)--; 
....................    #endif 
....................     
....................     data1 = *(((unsigned int8 *)(&y))+5); 
....................     data2 = *(((unsigned int8 *)(&y))+4); 
....................     rotate_left(&data1,1); 
....................     if(bit_test(data2,7)) 
....................     bit_set(data1,0);     
....................     data1--; 
....................     bit_clear(data2,7); 
....................     if(bit_test(data1,0)) 
....................     bit_set(data2,7); 
....................     data1 = data1 >>1; 
....................     *(((unsigned int8 *)(&y))+5) = data1; 
....................     *(((unsigned int8 *)(&y))+4) = data2; 
....................      
....................    } while(res != y); 
....................  
....................    return(res); 
.................... } 
....................  
.................... // Overloaded function sqrt() for data type - Float64 
.................... float64 sqrt(float64 x) 
.................... { 
....................    float64 y, res; 
....................    unsigned int16 *p; 
....................    unsigned int16 temp1,temp2; 
....................  
....................    #ifdef _ERRNO 
....................    if(x < 0) 
....................    { 
....................       errno=EDOM; 
....................    } 
....................    #endif 
....................  
....................    if( x<=0.0) 
....................       return(0.0); 
....................  
....................    y=x; 
....................    p= (((unsigned int16 *)(&y))+3); 
....................    temp1 = *p; 
....................    temp2 = *p; 
....................    bit_clear(temp1,15); 
....................    temp1 = (temp1>>4)+1023; 
....................    temp1 = temp1 >> 1; 
....................    temp1 = (temp1<<4) & 0xFFF0; 
....................    if(bit_test(temp2,15)) 
....................    bit_set(temp1,15); 
....................    temp2 = temp2 & 0x000F; 
....................    temp1 ^= temp2; 
....................     
....................    (*p) = temp1; 
....................     
....................    do { 
....................       res=y; 
....................       y+=(x/y); 
....................      temp1 = *p; 
....................      temp2 = *p; 
....................      bit_clear(temp1,15); 
....................      temp1 = (temp1>>4); 
....................      temp1--; 
....................      temp1 = (temp1<<4) & 0xFFF0; 
....................      if(bit_test(temp2,15)) 
....................      bit_set(temp1,15); 
....................      temp2 = temp2 & 0x000F; 
....................      temp1 ^= temp2; 
....................      (*p) = temp1; 
....................  
....................    } while(res != y); 
....................  
....................    return(res); 
.................... } 
.................... #endif 
....................  
.................... ////////////////////////////// Trig Functions ////////////////////////////// 
.................... #ifdef PI_DIV_BY_TWO 
.................... #undef PI_DIV_BY_TWO 
.................... #endif 
.................... #define PI_DIV_BY_TWO   1.5707963267948966 
.................... #ifdef TWOBYPI 
.................... #undef TWOBYPI 
.................... #define TWOBYPI          0.6366197723675813 
.................... #endif 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float cos(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the cosine value of the angle x, which is in radian 
.................... // Date : 9/20/2001 
.................... // 
.................... float32 cos(float32 x) 
.................... { 
*
046F:  BSF    03.5
0470:  CLRF   27
0471:  CLRF   26
0472:  CLRF   25
0473:  MOVLW  7F
0474:  MOVWF  24
....................    float32 y, t, t2 = 1.0; 
....................    unsigned int8 quad, i; 
....................    float32 frac; 
....................    float32 p[6] = {                    //by the series definition for cosine 
....................       -0.5,                            // sum ( ( (-1)^n * x^2n )/(2n)! ) 
....................        0.04166666666667, 
....................       -0.00138888888889, 
....................        0.00002480158730, 
....................       -0.00000027557319, 
....................        0.00000000208767, 
....................       //-0.00000000001147, 
....................       // 0.00000000000005 
....................    }; 
0475:  MOVLW  7E
0476:  MOVWF  2E
0477:  MOVLW  80
0478:  MOVWF  2F
0479:  CLRF   30
047A:  CLRF   31
047B:  MOVLW  7A
047C:  MOVWF  32
047D:  MOVLW  2A
047E:  MOVWF  33
047F:  MOVLW  AA
0480:  MOVWF  34
0481:  MOVLW  AB
0482:  MOVWF  35
0483:  MOVLW  75
0484:  MOVWF  36
0485:  MOVLW  B6
0486:  MOVWF  37
0487:  MOVLW  0B
0488:  MOVWF  38
0489:  MOVLW  61
048A:  MOVWF  39
048B:  MOVLW  6F
048C:  MOVWF  3A
048D:  MOVLW  50
048E:  MOVWF  3B
048F:  MOVLW  0D
0490:  MOVWF  3C
0491:  MOVLW  01
0492:  MOVWF  3D
0493:  MOVLW  69
0494:  MOVWF  3E
0495:  MOVLW  93
0496:  MOVWF  3F
0497:  MOVLW  F2
0498:  MOVWF  40
0499:  MOVLW  7E
049A:  MOVWF  41
049B:  MOVLW  62
049C:  MOVWF  42
049D:  MOVLW  0F
049E:  MOVWF  43
049F:  MOVLW  76
04A0:  MOVWF  44
04A1:  MOVLW  AE
04A2:  MOVWF  45
....................  
....................    if (x < 0) x = -x;                  // absolute value of input 
04A3:  MOVF   76,W
04A4:  MOVWF  49
04A5:  MOVF   75,W
04A6:  MOVWF  48
04A7:  MOVF   74,W
04A8:  MOVWF  47
04A9:  MOVF   73,W
04AA:  MOVWF  46
04AB:  CLRF   4D
04AC:  CLRF   4C
04AD:  CLRF   4B
04AE:  CLRF   4A
04AF:  BCF    03.5
04B0:  CALL   40D
04B1:  BTFSS  03.0
04B2:  GOTO   4B6
04B3:  MOVF   74,W
04B4:  XORLW  80
04B5:  MOVWF  74
....................  
....................    quad = (unsigned int8)(x / PI_DIV_BY_TWO);    // quadrant 
04B6:  MOVF   76,W
04B7:  BSF    03.5
04B8:  MOVWF  49
04B9:  MOVF   75,W
04BA:  MOVWF  48
04BB:  MOVF   74,W
04BC:  MOVWF  47
04BD:  MOVF   73,W
04BE:  MOVWF  46
04BF:  MOVLW  DB
04C0:  MOVWF  4D
04C1:  MOVLW  0F
04C2:  MOVWF  4C
04C3:  MOVLW  49
04C4:  MOVWF  4B
04C5:  MOVLW  7F
04C6:  MOVWF  4A
04C7:  BCF    03.5
04C8:  CALL   142
04C9:  MOVF   7A,W
04CA:  BSF    03.5
04CB:  MOVWF  49
04CC:  MOVF   79,W
04CD:  MOVWF  48
04CE:  MOVF   78,W
04CF:  MOVWF  47
04D0:  MOVF   77,W
04D1:  MOVWF  46
04D2:  BCF    03.5
04D3:  CALL   44E
04D4:  MOVF   78,W
04D5:  BSF    03.5
04D6:  MOVWF  28
....................    frac = (x / PI_DIV_BY_TWO) - quad;  // fractional part of input 
04D7:  MOVF   76,W
04D8:  MOVWF  49
04D9:  MOVF   75,W
04DA:  MOVWF  48
04DB:  MOVF   74,W
04DC:  MOVWF  47
04DD:  MOVF   73,W
04DE:  MOVWF  46
04DF:  MOVLW  DB
04E0:  MOVWF  4D
04E1:  MOVLW  0F
04E2:  MOVWF  4C
04E3:  MOVLW  49
04E4:  MOVWF  4B
04E5:  MOVLW  7F
04E6:  MOVWF  4A
04E7:  BCF    03.5
04E8:  CALL   142
04E9:  MOVF   77,W
04EA:  BSF    03.5
04EB:  MOVWF  46
04EC:  MOVF   78,W
04ED:  MOVWF  47
04EE:  MOVF   79,W
04EF:  MOVWF  48
04F0:  MOVF   7A,W
04F1:  MOVWF  49
04F2:  CLRF   4B
04F3:  MOVF   28,W
04F4:  MOVWF  4A
04F5:  BCF    03.5
04F6:  CALL   030
04F7:  BSF    03.1
04F8:  BSF    03.5
04F9:  MOVF   49,W
04FA:  MOVWF  4D
04FB:  MOVF   48,W
04FC:  MOVWF  4C
04FD:  MOVF   47,W
04FE:  MOVWF  4B
04FF:  MOVF   46,W
0500:  MOVWF  4A
0501:  MOVF   7A,W
0502:  MOVWF  51
0503:  MOVF   79,W
0504:  MOVWF  50
0505:  MOVF   78,W
0506:  MOVWF  4F
0507:  MOVF   77,W
0508:  MOVWF  4E
0509:  BCF    03.5
050A:  CALL   2C7
050B:  MOVF   7A,W
050C:  BSF    03.5
050D:  MOVWF  2D
050E:  MOVF   79,W
050F:  MOVWF  2C
0510:  MOVF   78,W
0511:  MOVWF  2B
0512:  MOVF   77,W
0513:  MOVWF  2A
....................    quad = quad % 4;                    // quadrant (0 to 3) 
0514:  MOVLW  03
0515:  ANDWF  28,F
....................  
....................    if (quad == 0 || quad == 2) 
0516:  MOVF   28,F
0517:  BTFSC  03.2
0518:  GOTO   51D
0519:  MOVF   28,W
051A:  SUBLW  02
051B:  BTFSS  03.2
051C:  GOTO   539
....................       t = frac * PI_DIV_BY_TWO; 
051D:  MOVF   2D,W
051E:  MOVWF  4D
051F:  MOVF   2C,W
0520:  MOVWF  4C
0521:  MOVF   2B,W
0522:  MOVWF  4B
0523:  MOVF   2A,W
0524:  MOVWF  4A
0525:  MOVLW  DB
0526:  MOVWF  51
0527:  MOVLW  0F
0528:  MOVWF  50
0529:  MOVLW  49
052A:  MOVWF  4F
052B:  MOVLW  7F
052C:  MOVWF  4E
052D:  BCF    03.5
052E:  CALL   20E
052F:  MOVF   7A,W
0530:  BSF    03.5
0531:  MOVWF  23
0532:  MOVF   79,W
0533:  MOVWF  22
0534:  MOVF   78,W
0535:  MOVWF  21
0536:  MOVF   77,W
0537:  MOVWF  20
....................    else if (quad == 1) 
0538:  GOTO   5A2
0539:  DECFSZ 28,W
053A:  GOTO   56F
....................       t = (1-frac) * PI_DIV_BY_TWO; 
053B:  BSF    03.1
053C:  CLRF   4D
053D:  CLRF   4C
053E:  CLRF   4B
053F:  MOVLW  7F
0540:  MOVWF  4A
0541:  MOVF   2D,W
0542:  MOVWF  51
0543:  MOVF   2C,W
0544:  MOVWF  50
0545:  MOVF   2B,W
0546:  MOVWF  4F
0547:  MOVF   2A,W
0548:  MOVWF  4E
0549:  BCF    03.5
054A:  CALL   2C7
054B:  MOVF   77,W
054C:  BSF    03.5
054D:  MOVWF  46
054E:  MOVF   78,W
054F:  MOVWF  47
0550:  MOVF   79,W
0551:  MOVWF  48
0552:  MOVF   7A,W
0553:  MOVWF  49
0554:  MOVWF  4D
0555:  MOVF   48,W
0556:  MOVWF  4C
0557:  MOVF   47,W
0558:  MOVWF  4B
0559:  MOVF   46,W
055A:  MOVWF  4A
055B:  MOVLW  DB
055C:  MOVWF  51
055D:  MOVLW  0F
055E:  MOVWF  50
055F:  MOVLW  49
0560:  MOVWF  4F
0561:  MOVLW  7F
0562:  MOVWF  4E
0563:  BCF    03.5
0564:  CALL   20E
0565:  MOVF   7A,W
0566:  BSF    03.5
0567:  MOVWF  23
0568:  MOVF   79,W
0569:  MOVWF  22
056A:  MOVF   78,W
056B:  MOVWF  21
056C:  MOVF   77,W
056D:  MOVWF  20
....................    else // should be 3 
056E:  GOTO   5A2
....................       t = (frac-1) * PI_DIV_BY_TWO; 
056F:  BSF    03.1
0570:  MOVF   2D,W
0571:  MOVWF  4D
0572:  MOVF   2C,W
0573:  MOVWF  4C
0574:  MOVF   2B,W
0575:  MOVWF  4B
0576:  MOVF   2A,W
0577:  MOVWF  4A
0578:  CLRF   51
0579:  CLRF   50
057A:  CLRF   4F
057B:  MOVLW  7F
057C:  MOVWF  4E
057D:  BCF    03.5
057E:  CALL   2C7
057F:  MOVF   77,W
0580:  BSF    03.5
0581:  MOVWF  46
0582:  MOVF   78,W
0583:  MOVWF  47
0584:  MOVF   79,W
0585:  MOVWF  48
0586:  MOVF   7A,W
0587:  MOVWF  49
0588:  MOVWF  4D
0589:  MOVF   48,W
058A:  MOVWF  4C
058B:  MOVF   47,W
058C:  MOVWF  4B
058D:  MOVF   46,W
058E:  MOVWF  4A
058F:  MOVLW  DB
0590:  MOVWF  51
0591:  MOVLW  0F
0592:  MOVWF  50
0593:  MOVLW  49
0594:  MOVWF  4F
0595:  MOVLW  7F
0596:  MOVWF  4E
0597:  BCF    03.5
0598:  CALL   20E
0599:  MOVF   7A,W
059A:  BSF    03.5
059B:  MOVWF  23
059C:  MOVF   79,W
059D:  MOVWF  22
059E:  MOVF   78,W
059F:  MOVWF  21
05A0:  MOVF   77,W
05A1:  MOVWF  20
....................  
....................    y = 1.0; 
05A2:  CLRF   7E
05A3:  CLRF   7D
05A4:  CLRF   7C
05A5:  MOVLW  7F
05A6:  MOVWF  7B
....................    t = t * t; 
05A7:  MOVF   23,W
05A8:  MOVWF  4D
05A9:  MOVF   22,W
05AA:  MOVWF  4C
05AB:  MOVF   21,W
05AC:  MOVWF  4B
05AD:  MOVF   20,W
05AE:  MOVWF  4A
05AF:  MOVF   23,W
05B0:  MOVWF  51
05B1:  MOVF   22,W
05B2:  MOVWF  50
05B3:  MOVF   21,W
05B4:  MOVWF  4F
05B5:  MOVF   20,W
05B6:  MOVWF  4E
05B7:  BCF    03.5
05B8:  CALL   20E
05B9:  MOVF   7A,W
05BA:  BSF    03.5
05BB:  MOVWF  23
05BC:  MOVF   79,W
05BD:  MOVWF  22
05BE:  MOVF   78,W
05BF:  MOVWF  21
05C0:  MOVF   77,W
05C1:  MOVWF  20
....................    for (i = 0; i <= 5; i++) 
05C2:  CLRF   29
05C3:  MOVF   29,W
05C4:  SUBLW  05
05C5:  BTFSS  03.0
05C6:  GOTO   631
....................    { 
....................       t2 = t2 * t; 
05C7:  MOVF   27,W
05C8:  MOVWF  4D
05C9:  MOVF   26,W
05CA:  MOVWF  4C
05CB:  MOVF   25,W
05CC:  MOVWF  4B
05CD:  MOVF   24,W
05CE:  MOVWF  4A
05CF:  MOVF   23,W
05D0:  MOVWF  51
05D1:  MOVF   22,W
05D2:  MOVWF  50
05D3:  MOVF   21,W
05D4:  MOVWF  4F
05D5:  MOVF   20,W
05D6:  MOVWF  4E
05D7:  BCF    03.5
05D8:  CALL   20E
05D9:  MOVF   7A,W
05DA:  BSF    03.5
05DB:  MOVWF  27
05DC:  MOVF   79,W
05DD:  MOVWF  26
05DE:  MOVF   78,W
05DF:  MOVWF  25
05E0:  MOVF   77,W
05E1:  MOVWF  24
....................       y = y + p[i] * t2; 
05E2:  RLF    29,W
05E3:  MOVWF  77
05E4:  RLF    77,F
05E5:  MOVLW  FC
05E6:  ANDWF  77,F
05E7:  MOVF   77,W
05E8:  ADDLW  AE
05E9:  MOVWF  04
05EA:  BCF    03.7
05EB:  MOVF   00,W
05EC:  MOVWF  46
05ED:  INCF   04,F
05EE:  MOVF   00,W
05EF:  MOVWF  47
05F0:  INCF   04,F
05F1:  MOVF   00,W
05F2:  MOVWF  48
05F3:  INCF   04,F
05F4:  MOVF   00,W
05F5:  MOVWF  49
05F6:  MOVWF  4D
05F7:  MOVF   48,W
05F8:  MOVWF  4C
05F9:  MOVF   47,W
05FA:  MOVWF  4B
05FB:  MOVF   46,W
05FC:  MOVWF  4A
05FD:  MOVF   27,W
05FE:  MOVWF  51
05FF:  MOVF   26,W
0600:  MOVWF  50
0601:  MOVF   25,W
0602:  MOVWF  4F
0603:  MOVF   24,W
0604:  MOVWF  4E
0605:  BCF    03.5
0606:  CALL   20E
0607:  BSF    03.5
0608:  CLRF   47
0609:  MOVF   04,W
060A:  MOVWF  46
060B:  BCF    47.0
060C:  BTFSC  03.7
060D:  BSF    47.0
060E:  BCF    03.1
060F:  MOVF   7E,W
0610:  MOVWF  4D
0611:  MOVF   7D,W
0612:  MOVWF  4C
0613:  MOVF   7C,W
0614:  MOVWF  4B
0615:  MOVF   7B,W
0616:  MOVWF  4A
0617:  MOVF   7A,W
0618:  MOVWF  51
0619:  MOVF   79,W
061A:  MOVWF  50
061B:  MOVF   78,W
061C:  MOVWF  4F
061D:  MOVF   77,W
061E:  MOVWF  4E
061F:  BCF    03.5
0620:  CALL   2C7
0621:  BSF    03.5
0622:  MOVF   46,W
0623:  MOVWF  04
0624:  BCF    03.7
0625:  BTFSC  47.0
0626:  BSF    03.7
0627:  MOVF   7A,W
0628:  MOVWF  7E
0629:  MOVF   79,W
062A:  MOVWF  7D
062B:  MOVF   78,W
062C:  MOVWF  7C
062D:  MOVF   77,W
062E:  MOVWF  7B
....................    } 
062F:  INCF   29,F
0630:  GOTO   5C3
....................  
....................    if (quad == 2 || quad == 1) 
0631:  MOVF   28,W
0632:  SUBLW  02
0633:  BTFSC  03.2
0634:  GOTO   637
0635:  DECFSZ 28,W
0636:  GOTO   63A
....................       y = -y;  // correct sign 
0637:  MOVF   7C,W
0638:  XORLW  80
0639:  MOVWF  7C
....................  
....................    return (y); 
063A:  MOVF   7B,W
063B:  MOVWF  77
063C:  MOVF   7C,W
063D:  MOVWF  78
063E:  MOVF   7D,W
063F:  MOVWF  79
0640:  MOVF   7E,W
0641:  MOVWF  7A
.................... } 
0642:  BCF    03.5
0643:  RETURN
....................  
....................  
.................... //Overloaded functions for cos() for PCD 
.................... // Overloaded function cos() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 cos(float48 x) 
.................... { 
....................    float48 y, t, t2 = 1.0; 
....................    unsigned int8 quad, i; 
....................    float48 frac; 
....................    float48 p[6] = {                    //by the series definition for cosine 
....................       -0.5,                            // sum ( ( (-1)^n * x^2n )/(2n)! ) 
....................        0.04166666666667, 
....................       -0.00138888888889, 
....................        0.00002480158730, 
....................       -0.00000027557319, 
....................        0.00000000208767, 
....................       //-0.00000000001147, 
....................       // 0.00000000000005 
....................    }; 
....................  
....................    if (x < 0) x = -x;                  // absolute value of input 
....................  
....................    quad = (unsigned int8)(x / PI_DIV_BY_TWO);    // quadrant 
....................    frac = (x / PI_DIV_BY_TWO) - quad;  // fractional part of input 
....................    quad = quad % 4;                    // quadrant (0 to 3) 
....................  
....................    if (quad == 0 || quad == 2) 
....................       t = frac * PI_DIV_BY_TWO; 
....................    else if (quad == 1) 
....................       t = (1-frac) * PI_DIV_BY_TWO; 
....................    else // should be 3 
....................       t = (frac-1) * PI_DIV_BY_TWO; 
....................  
....................    y = 0.999999999781; 
....................    t = t * t; 
....................    for (i = 0; i <= 5; i++) 
....................    { 
....................       t2 = t2 * t; 
....................       y = y + p[i] * t2; 
....................    } 
....................  
....................    if (quad == 2 || quad == 1) 
....................       y = -y;  // correct sign 
....................  
....................    return (y); 
.................... } 
....................  
.................... // Overloaded function cos() for data type - Float48 
.................... float64 cos(float64 x) 
.................... { 
....................    float64 y, t, t2 = 1.0; 
....................    unsigned int8 quad, i; 
....................    float64 frac; 
....................    float64 p[6] = {                    //by the series definition for cosine 
....................       -0.5,                            // sum ( ( (-1)^n * x^2n )/(2n)! ) 
....................        0.04166666666667, 
....................       -0.00138888888889, 
....................        0.00002480158730, 
....................       -0.00000027557319, 
....................        0.00000000208767, 
....................       //-0.00000000001147, 
....................       // 0.00000000000005 
....................    }; 
....................  
....................    if (x < 0) x = -x;                  // absolute value of input 
....................  
....................    quad = (unsigned int8)(x / PI_DIV_BY_TWO);    // quadrant 
....................    frac = (x / PI_DIV_BY_TWO) - quad;  // fractional part of input 
....................    quad = quad % 4;                    // quadrant (0 to 3) 
....................  
....................    if (quad == 0 || quad == 2) 
....................       t = frac * PI_DIV_BY_TWO; 
....................    else if (quad == 1) 
....................       t = (1-frac) * PI_DIV_BY_TWO; 
....................    else // should be 3 
....................       t = (frac-1) * PI_DIV_BY_TWO; 
....................  
....................    y = 0.999999999781; 
....................    t = t * t; 
....................    for (i = 0; i <= 5; i++) 
....................    { 
....................       t2 = t2 * t; 
....................       y = y + p[i] * t2; 
....................    } 
....................  
....................    if (quad == 2 || quad == 1) 
....................       y = -y;  // correct sign 
....................  
....................    return (y); 
.................... } 
....................  
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float sin(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the sine value of the angle x, which is in radian 
.................... // Date : 9/20/2001 
.................... // 
.................... float32 sin(float32 x) 
.................... { 
....................    return cos(x - PI_DIV_BY_TWO); 
0644:  BSF    03.1
0645:  MOVF   6E,W
0646:  BSF    03.5
0647:  MOVWF  4D
0648:  BCF    03.5
0649:  MOVF   6D,W
064A:  BSF    03.5
064B:  MOVWF  4C
064C:  BCF    03.5
064D:  MOVF   6C,W
064E:  BSF    03.5
064F:  MOVWF  4B
0650:  BCF    03.5
0651:  MOVF   6B,W
0652:  BSF    03.5
0653:  MOVWF  4A
0654:  MOVLW  DB
0655:  MOVWF  51
0656:  MOVLW  0F
0657:  MOVWF  50
0658:  MOVLW  49
0659:  MOVWF  4F
065A:  MOVLW  7F
065B:  MOVWF  4E
065C:  BCF    03.5
065D:  CALL   2C7
065E:  MOVF   77,W
065F:  MOVWF  6F
0660:  MOVF   78,W
0661:  MOVWF  70
0662:  MOVF   79,W
0663:  MOVWF  71
0664:  MOVF   7A,W
0665:  MOVWF  72
0666:  MOVWF  76
0667:  MOVF   79,W
0668:  MOVWF  75
0669:  MOVF   78,W
066A:  MOVWF  74
066B:  MOVF   77,W
066C:  MOVWF  73
066D:  CALL   46F
.................... } 
066E:  RETURN
....................  
.................... //Overloaded functions for sin() for PCD 
.................... // Overloaded function sin() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 sin(float48 x) 
.................... { 
....................    return cos(x - PI_DIV_BY_TWO); 
.................... } 
....................  
.................... // Overloaded function sin() for data type - Float48 
.................... float64 sin(float64 x) 
.................... { 
....................    return cos(x - PI_DIV_BY_TWO); 
.................... } 
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float tan(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the tangent value of the angle x, which is in radian 
.................... // Date : 9/20/2001 
.................... // 
.................... float32 tan(float32 x) 
.................... { 
....................    float32 c, s; 
....................  
....................    c = cos(x); 
....................    if (c == 0.0) 
....................       return (1.0e+36); 
....................  
....................    s = sin(x); 
....................    return(s/c); 
.................... } 
.................... //Overloaded functions for tan() for PCD 
.................... // Overloaded function tan() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 tan(float48 x) 
.................... { 
....................    float48 c, s; 
....................  
....................    c = cos(x); 
....................    if (c == 0.0) 
....................       return (1.0e+36); 
....................  
....................    s = sin(x); 
....................    return(s/c); 
.................... } 
....................  
.................... // Overloaded function tan() for data type - Float48 
.................... float64 tan(float64 x) 
.................... { 
....................    float64 c, s; 
....................  
....................    c = cos(x); 
....................    if (c == 0.0) 
....................       return (1.0e+36); 
....................  
....................    s = sin(x); 
....................    return(s/c); 
.................... } 
.................... #endif 
....................  
.................... float32 const pas[3] = {0.49559947, -4.6145309, 5.6036290}; 
.................... float32 const qas[3] = {1.0000000,  -5.5484666, 5.6036290}; 
....................  
.................... float32 ASIN_COS(float32 x, unsigned int8 n) 
.................... { 
....................    float32 y, res, r, y2; 
....................    int1 s; 
....................    #ifdef _ERRNO 
....................    if(x <-1 || x > 1) 
....................    { 
....................       errno=EDOM; 
....................    } 
....................    #endif 
....................    s = 0; 
*
0800:  BCF    74.0
....................    y = x; 
0801:  MOVF   6A,W
0802:  MOVWF  6F
0803:  MOVF   69,W
0804:  MOVWF  6E
0805:  MOVF   68,W
0806:  MOVWF  6D
0807:  MOVF   67,W
0808:  MOVWF  6C
....................  
....................    if (x < 0) 
0809:  MOVF   6A,W
080A:  BSF    03.5
080B:  MOVWF  49
080C:  BCF    03.5
080D:  MOVF   69,W
080E:  BSF    03.5
080F:  MOVWF  48
0810:  BCF    03.5
0811:  MOVF   68,W
0812:  BSF    03.5
0813:  MOVWF  47
0814:  BCF    03.5
0815:  MOVF   67,W
0816:  BSF    03.5
0817:  MOVWF  46
0818:  CLRF   4D
0819:  CLRF   4C
081A:  CLRF   4B
081B:  CLRF   4A
081C:  BCF    0A.3
081D:  BCF    03.5
081E:  CALL   40D
081F:  BSF    0A.3
0820:  BTFSS  03.0
0821:  GOTO   026
....................    { 
....................       s = 1; 
0822:  BSF    74.0
....................       y = -y; 
0823:  MOVF   6D,W
0824:  XORLW  80
0825:  MOVWF  6D
....................    } 
....................  
....................    if (y > 0.5) 
0826:  BSF    03.5
0827:  CLRF   49
0828:  CLRF   48
0829:  CLRF   47
082A:  MOVLW  7E
082B:  MOVWF  46
082C:  BCF    03.5
082D:  MOVF   6F,W
082E:  BSF    03.5
082F:  MOVWF  4D
0830:  BCF    03.5
0831:  MOVF   6E,W
0832:  BSF    03.5
0833:  MOVWF  4C
0834:  BCF    03.5
0835:  MOVF   6D,W
0836:  BSF    03.5
0837:  MOVWF  4B
0838:  BCF    03.5
0839:  MOVF   6C,W
083A:  BSF    03.5
083B:  MOVWF  4A
083C:  BCF    0A.3
083D:  BCF    03.5
083E:  CALL   40D
083F:  BSF    0A.3
0840:  BTFSS  03.0
0841:  GOTO   133
....................    { 
....................       y = sqrt((1.0 - y)/2.0); 
0842:  BSF    03.1
0843:  BSF    03.5
0844:  CLRF   4D
0845:  CLRF   4C
0846:  CLRF   4B
0847:  MOVLW  7F
0848:  MOVWF  4A
0849:  BCF    03.5
084A:  MOVF   6F,W
084B:  BSF    03.5
084C:  MOVWF  51
084D:  BCF    03.5
084E:  MOVF   6E,W
084F:  BSF    03.5
0850:  MOVWF  50
0851:  BCF    03.5
0852:  MOVF   6D,W
0853:  BSF    03.5
0854:  MOVWF  4F
0855:  BCF    03.5
0856:  MOVF   6C,W
0857:  BSF    03.5
0858:  MOVWF  4E
0859:  BCF    0A.3
085A:  BCF    03.5
085B:  CALL   2C7
085C:  BSF    0A.3
085D:  MOVF   77,W
085E:  BSF    03.5
085F:  MOVWF  24
0860:  MOVF   78,W
0861:  MOVWF  25
0862:  MOVF   79,W
0863:  MOVWF  26
0864:  MOVF   7A,W
0865:  MOVWF  27
0866:  MOVF   27,W
0867:  MOVWF  49
0868:  MOVF   26,W
0869:  MOVWF  48
086A:  MOVF   25,W
086B:  MOVWF  47
086C:  MOVF   24,W
086D:  MOVWF  46
086E:  CLRF   4D
086F:  CLRF   4C
0870:  CLRF   4B
0871:  MOVLW  80
0872:  MOVWF  4A
0873:  BCF    0A.3
0874:  BCF    03.5
0875:  CALL   142
0876:  BSF    0A.3
0877:  MOVF   77,W
0878:  BSF    03.5
0879:  MOVWF  24
087A:  MOVF   78,W
087B:  MOVWF  25
087C:  MOVF   79,W
087D:  MOVWF  26
087E:  MOVF   7A,W
087F:  MOVWF  27
0880:  MOVF   27,W
0881:  MOVWF  2C
0882:  MOVF   26,W
0883:  MOVWF  2B
0884:  MOVF   25,W
0885:  MOVWF  2A
0886:  MOVF   24,W
0887:  MOVWF  29
*
0929:  MOVF   7A,W
092A:  MOVWF  6F
092B:  MOVF   79,W
092C:  MOVWF  6E
092D:  MOVF   78,W
092E:  MOVWF  6D
092F:  MOVF   77,W
0930:  MOVWF  6C
....................       n += 2; 
0931:  MOVLW  02
0932:  ADDWF  6B,F
....................    } 
....................  
....................    y2=y*y; 
0933:  MOVF   6F,W
0934:  BSF    03.5
0935:  MOVWF  4D
0936:  BCF    03.5
0937:  MOVF   6E,W
0938:  BSF    03.5
0939:  MOVWF  4C
093A:  BCF    03.5
093B:  MOVF   6D,W
093C:  BSF    03.5
093D:  MOVWF  4B
093E:  BCF    03.5
093F:  MOVF   6C,W
0940:  BSF    03.5
0941:  MOVWF  4A
0942:  BCF    03.5
0943:  MOVF   6F,W
0944:  BSF    03.5
0945:  MOVWF  51
0946:  BCF    03.5
0947:  MOVF   6E,W
0948:  BSF    03.5
0949:  MOVWF  50
094A:  BCF    03.5
094B:  MOVF   6D,W
094C:  BSF    03.5
094D:  MOVWF  4F
094E:  BCF    03.5
094F:  MOVF   6C,W
0950:  BSF    03.5
0951:  MOVWF  4E
0952:  BCF    0A.3
0953:  BCF    03.5
0954:  CALL   20E
0955:  BSF    0A.3
0956:  MOVF   7A,W
0957:  BSF    03.5
0958:  MOVWF  23
0959:  MOVF   79,W
095A:  MOVWF  22
095B:  MOVF   78,W
095C:  MOVWF  21
095D:  MOVF   77,W
095E:  MOVWF  20
....................  
....................    res = pas[0]*y2 + pas[1]; 
095F:  MOVLW  37
0960:  MOVWF  4D
0961:  MOVLW  BF
0962:  MOVWF  4C
0963:  MOVLW  7D
0964:  MOVWF  4B
0965:  MOVWF  4A
0966:  MOVF   23,W
0967:  MOVWF  51
0968:  MOVF   22,W
0969:  MOVWF  50
096A:  MOVF   21,W
096B:  MOVWF  4F
096C:  MOVF   20,W
096D:  MOVWF  4E
096E:  BCF    0A.3
096F:  BCF    03.5
0970:  CALL   20E
0971:  BSF    0A.3
0972:  MOVF   77,W
0973:  BSF    03.5
0974:  MOVWF  24
0975:  MOVF   78,W
0976:  MOVWF  25
0977:  MOVF   79,W
0978:  MOVWF  26
0979:  MOVF   7A,W
097A:  MOVWF  27
097B:  BCF    03.1
097C:  MOVF   27,W
097D:  MOVWF  4D
097E:  MOVF   26,W
097F:  MOVWF  4C
0980:  MOVF   25,W
0981:  MOVWF  4B
0982:  MOVF   24,W
0983:  MOVWF  4A
0984:  MOVLW  3D
0985:  MOVWF  51
0986:  MOVLW  AA
0987:  MOVWF  50
0988:  MOVLW  93
0989:  MOVWF  4F
098A:  MOVLW  81
098B:  MOVWF  4E
098C:  BCF    0A.3
098D:  BCF    03.5
098E:  CALL   2C7
098F:  BSF    0A.3
0990:  MOVF   7A,W
0991:  MOVWF  73
0992:  MOVF   79,W
0993:  MOVWF  72
0994:  MOVF   78,W
0995:  MOVWF  71
0996:  MOVF   77,W
0997:  MOVWF  70
....................    res = res*y2 + pas[2]; 
0998:  MOVF   73,W
0999:  BSF    03.5
099A:  MOVWF  4D
099B:  MOVF   72,W
099C:  MOVWF  4C
099D:  MOVF   71,W
099E:  MOVWF  4B
099F:  MOVF   70,W
09A0:  MOVWF  4A
09A1:  MOVF   23,W
09A2:  MOVWF  51
09A3:  MOVF   22,W
09A4:  MOVWF  50
09A5:  MOVF   21,W
09A6:  MOVWF  4F
09A7:  MOVF   20,W
09A8:  MOVWF  4E
09A9:  BCF    0A.3
09AA:  BCF    03.5
09AB:  CALL   20E
09AC:  BSF    0A.3
09AD:  MOVF   77,W
09AE:  BSF    03.5
09AF:  MOVWF  24
09B0:  MOVF   78,W
09B1:  MOVWF  25
09B2:  MOVF   79,W
09B3:  MOVWF  26
09B4:  MOVF   7A,W
09B5:  MOVWF  27
09B6:  BCF    03.1
09B7:  MOVF   27,W
09B8:  MOVWF  4D
09B9:  MOVF   26,W
09BA:  MOVWF  4C
09BB:  MOVF   25,W
09BC:  MOVWF  4B
09BD:  MOVF   24,W
09BE:  MOVWF  4A
09BF:  MOVLW  EE
09C0:  MOVWF  51
09C1:  MOVLW  50
09C2:  MOVWF  50
09C3:  MOVLW  33
09C4:  MOVWF  4F
09C5:  MOVLW  81
09C6:  MOVWF  4E
09C7:  BCF    0A.3
09C8:  BCF    03.5
09C9:  CALL   2C7
09CA:  BSF    0A.3
09CB:  MOVF   7A,W
09CC:  MOVWF  73
09CD:  MOVF   79,W
09CE:  MOVWF  72
09CF:  MOVF   78,W
09D0:  MOVWF  71
09D1:  MOVF   77,W
09D2:  MOVWF  70
....................  
....................    r = qas[0]*y2 + qas[1]; 
09D3:  BSF    03.5
09D4:  CLRF   4D
09D5:  CLRF   4C
09D6:  CLRF   4B
09D7:  MOVLW  7F
09D8:  MOVWF  4A
09D9:  MOVF   23,W
09DA:  MOVWF  51
09DB:  MOVF   22,W
09DC:  MOVWF  50
09DD:  MOVF   21,W
09DE:  MOVWF  4F
09DF:  MOVF   20,W
09E0:  MOVWF  4E
09E1:  BCF    0A.3
09E2:  BCF    03.5
09E3:  CALL   20E
09E4:  BSF    0A.3
09E5:  MOVF   77,W
09E6:  BSF    03.5
09E7:  MOVWF  24
09E8:  MOVF   78,W
09E9:  MOVWF  25
09EA:  MOVF   79,W
09EB:  MOVWF  26
09EC:  MOVF   7A,W
09ED:  MOVWF  27
09EE:  BCF    03.1
09EF:  MOVF   27,W
09F0:  MOVWF  4D
09F1:  MOVF   26,W
09F2:  MOVWF  4C
09F3:  MOVF   25,W
09F4:  MOVWF  4B
09F5:  MOVF   24,W
09F6:  MOVWF  4A
09F7:  MOVLW  0A
09F8:  MOVWF  51
09F9:  MOVLW  8D
09FA:  MOVWF  50
09FB:  MOVLW  B1
09FC:  MOVWF  4F
09FD:  MOVLW  81
09FE:  MOVWF  4E
09FF:  BCF    0A.3
0A00:  BCF    03.5
0A01:  CALL   2C7
0A02:  BSF    0A.3
0A03:  MOVF   7A,W
0A04:  MOVWF  7E
0A05:  MOVF   79,W
0A06:  MOVWF  7D
0A07:  MOVF   78,W
0A08:  MOVWF  7C
0A09:  MOVF   77,W
0A0A:  MOVWF  7B
....................    r = r*y2 + qas[2]; 
0A0B:  MOVF   7E,W
0A0C:  BSF    03.5
0A0D:  MOVWF  4D
0A0E:  MOVF   7D,W
0A0F:  MOVWF  4C
0A10:  MOVF   7C,W
0A11:  MOVWF  4B
0A12:  MOVF   7B,W
0A13:  MOVWF  4A
0A14:  MOVF   23,W
0A15:  MOVWF  51
0A16:  MOVF   22,W
0A17:  MOVWF  50
0A18:  MOVF   21,W
0A19:  MOVWF  4F
0A1A:  MOVF   20,W
0A1B:  MOVWF  4E
0A1C:  BCF    0A.3
0A1D:  BCF    03.5
0A1E:  CALL   20E
0A1F:  BSF    0A.3
0A20:  MOVF   77,W
0A21:  BSF    03.5
0A22:  MOVWF  24
0A23:  MOVF   78,W
0A24:  MOVWF  25
0A25:  MOVF   79,W
0A26:  MOVWF  26
0A27:  MOVF   7A,W
0A28:  MOVWF  27
0A29:  BCF    03.1
0A2A:  MOVF   27,W
0A2B:  MOVWF  4D
0A2C:  MOVF   26,W
0A2D:  MOVWF  4C
0A2E:  MOVF   25,W
0A2F:  MOVWF  4B
0A30:  MOVF   24,W
0A31:  MOVWF  4A
0A32:  MOVLW  EE
0A33:  MOVWF  51
0A34:  MOVLW  50
0A35:  MOVWF  50
0A36:  MOVLW  33
0A37:  MOVWF  4F
0A38:  MOVLW  81
0A39:  MOVWF  4E
0A3A:  BCF    0A.3
0A3B:  BCF    03.5
0A3C:  CALL   2C7
0A3D:  BSF    0A.3
0A3E:  MOVF   7A,W
0A3F:  MOVWF  7E
0A40:  MOVF   79,W
0A41:  MOVWF  7D
0A42:  MOVF   78,W
0A43:  MOVWF  7C
0A44:  MOVF   77,W
0A45:  MOVWF  7B
....................  
....................    res = y*res/r; 
0A46:  MOVF   6F,W
0A47:  BSF    03.5
0A48:  MOVWF  4D
0A49:  BCF    03.5
0A4A:  MOVF   6E,W
0A4B:  BSF    03.5
0A4C:  MOVWF  4C
0A4D:  BCF    03.5
0A4E:  MOVF   6D,W
0A4F:  BSF    03.5
0A50:  MOVWF  4B
0A51:  BCF    03.5
0A52:  MOVF   6C,W
0A53:  BSF    03.5
0A54:  MOVWF  4A
0A55:  MOVF   73,W
0A56:  MOVWF  51
0A57:  MOVF   72,W
0A58:  MOVWF  50
0A59:  MOVF   71,W
0A5A:  MOVWF  4F
0A5B:  MOVF   70,W
0A5C:  MOVWF  4E
0A5D:  BCF    0A.3
0A5E:  BCF    03.5
0A5F:  CALL   20E
0A60:  BSF    0A.3
0A61:  MOVF   77,W
0A62:  BSF    03.5
0A63:  MOVWF  24
0A64:  MOVF   78,W
0A65:  MOVWF  25
0A66:  MOVF   79,W
0A67:  MOVWF  26
0A68:  MOVF   7A,W
0A69:  MOVWF  27
0A6A:  MOVWF  49
0A6B:  MOVF   26,W
0A6C:  MOVWF  48
0A6D:  MOVF   25,W
0A6E:  MOVWF  47
0A6F:  MOVF   24,W
0A70:  MOVWF  46
0A71:  MOVF   7E,W
0A72:  MOVWF  4D
0A73:  MOVF   7D,W
0A74:  MOVWF  4C
0A75:  MOVF   7C,W
0A76:  MOVWF  4B
0A77:  MOVF   7B,W
0A78:  MOVWF  4A
0A79:  BCF    0A.3
0A7A:  BCF    03.5
0A7B:  CALL   142
0A7C:  BSF    0A.3
0A7D:  MOVF   7A,W
0A7E:  MOVWF  73
0A7F:  MOVF   79,W
0A80:  MOVWF  72
0A81:  MOVF   78,W
0A82:  MOVWF  71
0A83:  MOVF   77,W
0A84:  MOVWF  70
....................  
....................    if (n & 2)     // |x| > 0.5 
0A85:  BTFSS  6B.1
0A86:  GOTO   2B7
....................       res = PI_DIV_BY_TWO - 2.0*res; 
0A87:  BSF    03.5
0A88:  CLRF   4D
0A89:  CLRF   4C
0A8A:  CLRF   4B
0A8B:  MOVLW  80
0A8C:  MOVWF  4A
0A8D:  MOVF   73,W
0A8E:  MOVWF  51
0A8F:  MOVF   72,W
0A90:  MOVWF  50
0A91:  MOVF   71,W
0A92:  MOVWF  4F
0A93:  MOVF   70,W
0A94:  MOVWF  4E
0A95:  BCF    0A.3
0A96:  BCF    03.5
0A97:  CALL   20E
0A98:  BSF    0A.3
0A99:  BSF    03.1
0A9A:  MOVLW  DB
0A9B:  BSF    03.5
0A9C:  MOVWF  4D
0A9D:  MOVLW  0F
0A9E:  MOVWF  4C
0A9F:  MOVLW  49
0AA0:  MOVWF  4B
0AA1:  MOVLW  7F
0AA2:  MOVWF  4A
0AA3:  MOVF   7A,W
0AA4:  MOVWF  51
0AA5:  MOVF   79,W
0AA6:  MOVWF  50
0AA7:  MOVF   78,W
0AA8:  MOVWF  4F
0AA9:  MOVF   77,W
0AAA:  MOVWF  4E
0AAB:  BCF    0A.3
0AAC:  BCF    03.5
0AAD:  CALL   2C7
0AAE:  BSF    0A.3
0AAF:  MOVF   7A,W
0AB0:  MOVWF  73
0AB1:  MOVF   79,W
0AB2:  MOVWF  72
0AB3:  MOVF   78,W
0AB4:  MOVWF  71
0AB5:  MOVF   77,W
0AB6:  MOVWF  70
....................    if (s) 
0AB7:  BTFSS  74.0
0AB8:  GOTO   2BC
....................       res = -res; 
0AB9:  MOVF   71,W
0ABA:  XORLW  80
0ABB:  MOVWF  71
....................    if (n & 1)           // take arccos 
0ABC:  BTFSS  6B.0
0ABD:  GOTO   2DC
....................       res = PI_DIV_BY_TWO - res; 
0ABE:  BSF    03.1
0ABF:  MOVLW  DB
0AC0:  BSF    03.5
0AC1:  MOVWF  4D
0AC2:  MOVLW  0F
0AC3:  MOVWF  4C
0AC4:  MOVLW  49
0AC5:  MOVWF  4B
0AC6:  MOVLW  7F
0AC7:  MOVWF  4A
0AC8:  MOVF   73,W
0AC9:  MOVWF  51
0ACA:  MOVF   72,W
0ACB:  MOVWF  50
0ACC:  MOVF   71,W
0ACD:  MOVWF  4F
0ACE:  MOVF   70,W
0ACF:  MOVWF  4E
0AD0:  BCF    0A.3
0AD1:  BCF    03.5
0AD2:  CALL   2C7
0AD3:  BSF    0A.3
0AD4:  MOVF   7A,W
0AD5:  MOVWF  73
0AD6:  MOVF   79,W
0AD7:  MOVWF  72
0AD8:  MOVF   78,W
0AD9:  MOVWF  71
0ADA:  MOVF   77,W
0ADB:  MOVWF  70
....................  
....................    return(res); 
0ADC:  MOVF   70,W
0ADD:  MOVWF  77
0ADE:  MOVF   71,W
0ADF:  MOVWF  78
0AE0:  MOVF   72,W
0AE1:  MOVWF  79
0AE2:  MOVF   73,W
0AE3:  MOVWF  7A
.................... } 
0AE4:  RETURN
....................  
.................... //Overloaded functions for ASIN_COS() for PCD 
.................... // Overloaded function ASIN_COS() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 ASIN_COS(float48 x, unsigned int8 n) 
.................... { 
....................    float48 y, res, r, y2; 
....................    int1 s; 
....................    #ifdef _ERRNO 
....................    if(x <-1 || x > 1) 
....................    { 
....................       errno=EDOM; 
....................    } 
....................    #endif 
....................    s = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       y = -y; 
....................    } 
....................  
....................    if (y > 0.5) 
....................    { 
....................       y = sqrt((1.0 - y)/2.0); 
....................       n += 2; 
....................    } 
....................  
....................    y2=y*y; 
....................  
....................    res = pas[0]*y2 + pas[1]; 
....................    res = res*y2 + pas[2]; 
....................  
....................    r = qas[0]*y2 + qas[1]; 
....................    r = r*y2 + qas[2]; 
....................  
....................    res = y*res/r; 
....................  
....................    if (n & 2)     // |x| > 0.5 
....................       res = PI_DIV_BY_TWO - 2.0*res; 
....................    if (s) 
....................       res = -res; 
....................    if (n & 1)           // take arccos 
....................       res = PI_DIV_BY_TWO - res; 
....................  
....................    return(res); 
.................... } 
....................  
.................... // Overloaded function ASIN_COS() for data type - Float64 
.................... float64 ASIN_COS(float64 x, unsigned int8 n) 
.................... { 
....................    float64 y, res, r, y2; 
....................    int1 s; 
....................    #ifdef _ERRNO 
....................    if(x <-1 || x > 1) 
....................    { 
....................       errno=EDOM; 
....................    } 
....................    #endif 
....................    s = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       y = -y; 
....................    } 
....................  
....................    if (y > 0.5) 
....................    { 
....................       y = sqrt((1.0 - y)/2.0); 
....................       n += 2; 
....................    } 
....................  
....................    y2=y*y; 
....................  
....................    res = pas[0]*y2 + pas[1]; 
....................    res = res*y2 + pas[2]; 
....................  
....................    r = qas[0]*y2 + qas[1]; 
....................    r = r*y2 + qas[2]; 
....................  
....................    res = y*res/r; 
....................  
....................    if (n & 2)     // |x| > 0.5 
....................       res = PI_DIV_BY_TWO - 2.0*res; 
....................    if (s) 
....................       res = -res; 
....................    if (n & 1)           // take arccos 
....................       res = PI_DIV_BY_TWO - res; 
....................  
....................    return(res); 
.................... } 
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float asin(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the arcsine value of the value x. 
.................... // Date : N/A 
.................... // 
.................... float32 asin(float32 x) 
.................... { 
....................    float32 r; 
....................  
....................    r = ASIN_COS(x, 0); 
*
15B6:  MOVF   62,W
15B7:  MOVWF  6A
15B8:  MOVF   61,W
15B9:  MOVWF  69
15BA:  MOVF   60,W
15BB:  MOVWF  68
15BC:  MOVF   5F,W
15BD:  MOVWF  67
15BE:  CLRF   6B
15BF:  BCF    0A.4
15C0:  BSF    0A.3
15C1:  CALL   000
15C2:  BSF    0A.4
15C3:  BCF    0A.3
15C4:  MOVF   7A,W
15C5:  MOVWF  66
15C6:  MOVF   79,W
15C7:  MOVWF  65
15C8:  MOVF   78,W
15C9:  MOVWF  64
15CA:  MOVF   77,W
15CB:  MOVWF  63
....................    return(r); 
15CC:  MOVF   63,W
15CD:  MOVWF  77
15CE:  MOVF   64,W
15CF:  MOVWF  78
15D0:  MOVF   65,W
15D1:  MOVWF  79
15D2:  MOVF   66,W
15D3:  MOVWF  7A
.................... } 
.................... //Overloaded functions for asin() for PCD 
.................... // Overloaded function asin() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 asin(float48 x) 
.................... { 
....................    float48 r; 
....................  
....................    r = ASIN_COS(x, 0); 
....................    return(r); 
.................... } 
....................  
.................... // Overloaded function asin() for data type - Float64 
.................... float64 asin(float64 x) 
.................... { 
....................    float64 r; 
....................  
....................    r = ASIN_COS(x, 0); 
....................    return(r); 
.................... } 
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float acos(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the arccosine value of the value x. 
.................... // Date : N/A 
.................... // 
.................... float32 acos(float32 x) 
.................... { 
....................    float32 r; 
....................  
....................    r = ASIN_COS(x, 1); 
*
16E9:  MOVF   62,W
16EA:  MOVWF  6A
16EB:  MOVF   61,W
16EC:  MOVWF  69
16ED:  MOVF   60,W
16EE:  MOVWF  68
16EF:  MOVF   5F,W
16F0:  MOVWF  67
16F1:  MOVLW  01
16F2:  MOVWF  6B
16F3:  BCF    0A.4
16F4:  BSF    0A.3
16F5:  CALL   000
16F6:  BSF    0A.4
16F7:  BCF    0A.3
16F8:  MOVF   7A,W
16F9:  MOVWF  66
16FA:  MOVF   79,W
16FB:  MOVWF  65
16FC:  MOVF   78,W
16FD:  MOVWF  64
16FE:  MOVF   77,W
16FF:  MOVWF  63
....................    return(r); 
1700:  MOVF   63,W
1701:  MOVWF  77
1702:  MOVF   64,W
1703:  MOVWF  78
1704:  MOVF   65,W
1705:  MOVWF  79
1706:  MOVF   66,W
1707:  MOVWF  7A
.................... } 
.................... //Overloaded functions for acos() for PCD 
.................... // Overloaded function acos() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 acos(float48 x) 
.................... { 
....................    float48 r; 
....................  
....................    r = ASIN_COS(x, 1); 
....................    return(r); 
.................... } 
....................  
.................... // Overloaded function acos() for data type - Float64 
.................... float64 acos(float64 x) 
.................... { 
....................    float64 r; 
....................  
....................    r = ASIN_COS(x, 1); 
....................    return(r); 
.................... } 
.................... #endif 
....................  
.................... float32 const pat[4] = {0.17630401, 5.6710795, 22.376096, 19.818457}; 
.................... float32 const qat[4] = {1.0000000,  11.368190, 28.982246, 19.818457}; 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float atan(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : returns the arctangent value of the value x. 
.................... // Date : N/A 
.................... // 
.................... float32 atan(float32 x) 
.................... { 
....................    float32 y, res, r; 
....................    int1 s, flag; 
....................  
....................    s = 0; 
....................    flag = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       y = -y; 
....................    } 
....................  
....................    if (y > 1.0) 
....................    { 
....................       y = 1.0/y; 
....................       flag = 1; 
....................    } 
....................  
....................    res = pat[0]*y*y + pat[1]; 
....................    res = res*y*y + pat[2]; 
....................    res = res*y*y + pat[3]; 
....................  
....................    r = qat[0]*y*y + qat[1]; 
....................    r = r*y*y + qat[2]; 
....................    r = r*y*y + qat[3]; 
....................  
....................    res = y*res/r; 
....................  
....................  
....................    if (flag)                              // for |x| > 1 
....................       res = PI_DIV_BY_TWO - res; 
....................    if (s) 
....................       res = -res; 
....................  
....................    return(res); 
.................... } 
.................... //Overloaded functions for atan() for PCD 
.................... // Overloaded function atan() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 atan(float48 x) 
.................... { 
....................    float48 y, res, r; 
....................    int1 s, flag; 
....................  
....................    s = 0; 
....................    flag = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       y = -y; 
....................    } 
....................  
....................    if (y > 1.0) 
....................    { 
....................       y = 1.0/y; 
....................       flag = 1; 
....................    } 
....................  
....................    res = pat[0]*y*y + pat[1]; 
....................    res = res*y*y + pat[2]; 
....................    res = res*y*y + pat[3]; 
....................  
....................    r = qat[0]*y*y + qat[1]; 
....................    r = r*y*y + qat[2]; 
....................    r = r*y*y + qat[3]; 
....................  
....................    res = y*res/r; 
....................  
....................  
....................    if (flag)                              // for |x| > 1 
....................       res = PI_DIV_BY_TWO - res; 
....................    if (s) 
....................       res = -res; 
....................  
....................    return(res); 
.................... } 
....................  
.................... // Overloaded function atan() for data type - Float64 
.................... float64 atan(float64 x) 
.................... { 
....................    float64 y, res, r; 
....................    int1 s, flag; 
....................  
....................    s = 0; 
....................    flag = 0; 
....................    y = x; 
....................  
....................    if (x < 0) 
....................    { 
....................       s = 1; 
....................       y = -y; 
....................    } 
....................  
....................    if (y > 1.0) 
....................    { 
....................       y = 1.0/y; 
....................       flag = 1; 
....................    } 
....................  
....................    res = pat[0]*y*y + pat[1]; 
....................    res = res*y*y + pat[2]; 
....................    res = res*y*y + pat[3]; 
....................  
....................    r = qat[0]*y*y + qat[1]; 
....................    r = r*y*y + qat[2]; 
....................    r = r*y*y + qat[3]; 
....................  
....................    res = y*res/r; 
....................  
....................  
....................    if (flag)                              // for |x| > 1 
....................       res = PI_DIV_BY_TWO - res; 
....................    if (s) 
....................       res = -res; 
....................  
....................    return(res); 
.................... } 
.................... #endif 
....................  
.................... ///////////////////////////////////////////////////////////////////////////// 
.................... //   float atan2(float y, float x) 
.................... ///////////////////////////////////////////////////////////////////////////// 
.................... // Description :computes the principal value of arc tangent of y/x, using the 
.................... // signs of both the arguments to determine the quadrant of the return value 
.................... // Returns : returns the arc tangent of y/x. 
.................... // Date : N/A 
.................... // 
....................  
.................... float32 atan2(float32 y,float32 x) 
.................... { 
....................    float32 z; 
....................    int1 sign; 
....................    unsigned int8 quad; 
....................    sign=0; 
....................    quad=0; //quadrant 
....................    quad=((y<=0.0)?((x<=0.0)?3:4):((x<0.0)?2:1)); 
....................    if(y<0.0) 
....................    { 
....................       sign=1; 
....................       y=-y; 
....................    } 
....................    if(x<0.0) 
....................    { 
....................       x=-x; 
....................    } 
....................    if (x==0.0) 
....................    { 
....................       if(y==0.0) 
....................       { 
....................       #ifdef _ERRNO 
....................       { 
....................          errno=EDOM; 
....................       } 
....................       #endif 
....................       } 
....................       else 
....................       { 
....................          if(sign) 
....................          { 
....................          return (-(PI_DIV_BY_TWO)); 
....................          } 
....................          else 
....................          { 
....................          return (PI_DIV_BY_TWO); 
....................          } 
....................       } 
....................    } 
....................    else 
....................    { 
....................       z=y/x; 
....................       switch(quad) 
....................       { 
....................          case 1: 
....................          { 
....................             return atan(z); 
....................             break; 
....................          } 
....................          case 2: 
....................          { 
.................... //            return (atan(z)+PI_DIV_BY_TWO);  //2L3122 
....................             return (PI-atan(z)); 
....................             break; 
....................          } 
....................          case 3: 
....................          { 
....................             return (atan(z)-PI); 
....................             break; 
....................          } 
....................          case 4: 
....................          { 
....................             return (-atan(z)); 
....................             break; 
....................          } 
....................       } 
....................    } 
.................... } 
....................  
.................... //Overloaded functions for atan2() for PCD 
.................... // Overloaded function atan2() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 atan2(float48 y,float48 x) 
.................... { 
....................    float48 z; 
....................    int1 sign; 
....................    unsigned int8 quad; 
....................    sign=0; 
....................    quad=0; //quadrant 
....................    quad=((y<=0.0)?((x<=0.0)?3:4):((x<0.0)?2:1)); 
....................    if(y<0.0) 
....................    { 
....................       sign=1; 
....................       y=-y; 
....................    } 
....................    if(x<0.0) 
....................    { 
....................       x=-x; 
....................    } 
....................    if (x==0.0) 
....................    { 
....................       if(y==0.0) 
....................       { 
....................       #ifdef _ERRNO 
....................       { 
....................          errno=EDOM; 
....................       } 
....................       #endif 
....................       } 
....................       else 
....................       { 
....................          if(sign) 
....................          { 
....................          return (-(PI_DIV_BY_TWO)); 
....................          } 
....................          else 
....................          { 
....................          return (PI_DIV_BY_TWO); 
....................          } 
....................       } 
....................    } 
....................    else 
....................    { 
....................       z=y/x; 
....................       switch(quad) 
....................       { 
....................          case 1: 
....................          { 
....................             return atan(z); 
....................             break; 
....................          } 
....................          case 2: 
....................          { 
.................... //            return (atan(z)+PI_DIV_BY_TWO);  //2L3122 
....................             return (PI-atan(z)); 
....................             break; 
....................          } 
....................          case 3: 
....................          { 
....................             return (atan(z)-PI); 
....................             break; 
....................          } 
....................          case 4: 
....................          { 
....................             return (-atan(z)); 
....................             break; 
....................          } 
....................       } 
....................    } 
.................... } 
....................  
.................... // Overloaded function atan2() for data type - Float64 
.................... float64 atan2(float64 y,float64 x) 
.................... { 
....................    float64 z; 
....................    int1 sign; 
....................    unsigned int8 quad; 
....................    sign=0; 
....................    quad=0; //quadrant 
....................    quad=((y<=0.0)?((x<=0.0)?3:4):((x<0.0)?2:1)); 
....................    if(y<0.0) 
....................    { 
....................       sign=1; 
....................       y=-y; 
....................    } 
....................    if(x<0.0) 
....................    { 
....................       x=-x; 
....................    } 
....................    if (x==0.0) 
....................    { 
....................       if(y==0.0) 
....................       { 
....................       #ifdef _ERRNO 
....................       { 
....................          errno=EDOM; 
....................       } 
....................       #endif 
....................       } 
....................       else 
....................       { 
....................          if(sign) 
....................          { 
....................          return (-(PI_DIV_BY_TWO)); 
....................          } 
....................          else 
....................          { 
....................          return (PI_DIV_BY_TWO); 
....................          } 
....................       } 
....................    } 
....................    else 
....................    { 
....................       z=y/x; 
....................       switch(quad) 
....................       { 
....................          case 1: 
....................          { 
....................             return atan(z); 
....................             break; 
....................          } 
....................          case 2: 
....................          { 
.................... //            return (atan(z)+PI_DIV_BY_TWO);  //2L3122 
....................             return (PI-atan(z)); 
....................             break; 
....................          } 
....................          case 3: 
....................          { 
....................             return (atan(z)-PI); 
....................             break; 
....................          } 
....................          case 4: 
....................          { 
....................             return (-atan(z)); 
....................             break; 
....................          } 
....................       } 
....................    } 
.................... } 
.................... #endif 
....................  
.................... //////////////////// Hyperbolic functions //////////////////// 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float cosh(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : Computes the hyperbolic cosine value of x 
.................... // Returns : returns the hyperbolic cosine value of x 
.................... // Date : N/A 
.................... // 
....................  
.................... float32 cosh(float32 x) 
.................... { 
....................    return ((exp(x)+exp(-x))/2); 
.................... } 
.................... //Overloaded functions for cosh() for PCD 
.................... // Overloaded function cosh() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 cosh(float48 x) 
.................... { 
....................    return ((exp(x)+exp(-x))/2); 
.................... } 
....................  
.................... // Overloaded function cosh() for data type - Float64 
.................... float64 cosh(float64 x) 
.................... { 
....................    return ((exp(x)+exp(-x))/2); 
.................... } 
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float sinh(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : Computes the hyperbolic sine value of x 
.................... // Returns : returns the hyperbolic sine value of x 
.................... // Date : N/A 
.................... // 
....................  
.................... float32 sinh(float32 x) 
.................... { 
....................  
....................    return ((exp(x) - exp(-x))/2); 
.................... } 
.................... //Overloaded functions for sinh() for PCD 
.................... // Overloaded function sinh() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 sinh(float48 x) 
.................... { 
....................  
....................    return ((exp(x) - exp(-x))/2); 
.................... } 
....................  
.................... // Overloaded function sinh() for data type - Float48 
.................... float64 sinh(float64 x) 
.................... { 
....................  
....................    return ((exp(x) - exp(-x))/2); 
.................... } 
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float tanh(float x) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : Computes the hyperbolic tangent value of x 
.................... // Returns : returns the hyperbolic tangent value of x 
.................... // Date : N/A 
.................... // 
....................  
.................... float32 tanh(float32 x) 
.................... { 
....................    return(sinh(x)/cosh(x)); 
.................... } 
.................... //Overloaded functions for tanh() for PCD 
.................... // Overloaded function tanh() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 tanh(float48 x) 
.................... { 
....................    return(sinh(x)/cosh(x)); 
.................... } 
....................  
.................... // Overloaded function tanh() for data type - Float64 
.................... float64 tanh(float64 x) 
.................... { 
....................    return(sinh(x)/cosh(x)); 
.................... } 
.................... #endif 
....................  
.................... //////////////////////////////////////////////////////////////////////////// 
.................... //   float frexp(float x, signed int *exp) 
.................... //////////////////////////////////////////////////////////////////////////// 
.................... // Description : breaks a floating point number into a normalized fraction and an integral 
.................... // power of 2. It stores the integer in the signed int object pointed to by exp. 
.................... // Returns : returns the value x, such that x is a double with magnitude in the interval 
.................... // [1/2,1) or zero, and value equals x times 2 raised to the power *exp.If value is zero, 
.................... // both parts of the result are zero. 
.................... // Date : N/A 
.................... // 
....................  
.................... #define LOG2 .30102999566398119521 
.................... float32 frexp(float32 x, signed int8 *exp) 
.................... { 
....................    float32 res; 
....................    int1 sign = 0; 
....................    if(x == 0.0) 
....................    { 
....................       *exp=0; 
....................       return (0.0); 
....................    } 
....................    if(x < 0.0) 
....................    { 
....................      x=-x; 
....................      sign=1; 
....................    } 
....................    if (x > 1.0) 
....................    { 
....................       *exp=(ceil(log10(x)/LOG2)); 
....................       res=x/(pow(2, *exp)); 
....................       if (res == 1) 
....................       { 
....................          *exp=*exp+1; 
....................           res=.5; 
....................       } 
....................    } 
....................    else 
....................    { 
....................       if(x < 0.5) 
....................       { 
....................          *exp=-1; 
....................          res=x*2; 
....................       } 
....................       else 
....................       { 
....................          *exp=0; 
....................           res=x; 
....................       } 
....................    } 
....................    if(sign) 
....................    { 
....................       res=-res; 
....................    } 
....................    return res; 
.................... } 
....................  
.................... //Overloaded functions for frexp() for PCD 
.................... // Overloaded function frexp() for data type - Float48 
.................... #if defined(__PCD__) 
.................... float48 frexp(float48 x, signed int8 *exp) 
.................... { 
....................    float48 res; 
....................    int1 sign = 0; 
....................    if(x == 0.0) 
....................    { 
....................       *exp=0; 
....................       return (0.0); 
....................    } 
....................    if(x < 0.0) 
....................    { 
....................      x=-x; 
....................      sign=1; 
....................    } 
....................    if (x > 1.0) 
....................    { 
....................       *exp=(ceil(log10(x)/LOG2)); 
....................       res=x/(pow(2, *exp)); 
....................       if (res == 1) 
....................       { 
....................          *exp=*exp+1; 
....................           res=.5; 
....................       } 
....................    } 
....................    else 
....................    { 
....................       if(x < 0.5) 
....................       { 
....................          *exp=-1; 
....................          res=x*2; 
....................       } 
....................       else 
....................       { 
....................          *exp=0; 
....................           res=x; 
....................       } 
....................    } 
....................    if(sign) 
....................    { 
....................       res=-res; 
....................    } 
....................    return res; 
.................... } 
....................  
.................... // Overloaded function frexp() for data type - Float64 
.................... float64 frexp(float64 x, signed int8 *exp) 
.................... { 
....................    float64 res; 
....................    int1 sign = 0; 
....................    if(x == 0.0) 
....................    { 
....................       *exp=0; 
....................       return (0.0); 
....................    } 
....................    if(x < 0.0) 
....................    { 
....................      x=-x; 
....................      sign=1; 
....................    } 
....................    if (x > 1.0) 
....................    { 
....................       *exp=(ceil(log10(x)/LOG2)); 
....................       res=x/(pow(2, *exp)); 
....................       if (res == 1) 
....................       { 
....................          *exp=*exp+1; 
....................           res=.5; 
....................       } 
....................    } 
....................    else 
....................    { 
....................       if(x < 0.5) 
....................       { 
....................          *exp=-1; 
....................          res=x*2; 
....................       } 
....................       else 
....................       { 
....................          *exp=0; 
....................           res=x; 
....................       } 
....................    } 
....................    if(sign) 
....................    { 
....................       res=-res; 
....................    } 
....................    return res; 
.................... } 
.................... #endif 
....................  
.................... ////////////////////////////////////////////////////////////////////////////// 
.................... //   float ldexp(float x, signed int *exp) 
.................... ////////////////////////////////////////////////////////////////////////////// 
.................... // Description : multiplies a floating point number by an integral power of 2. 
.................... // Returns : returns the value of x times 2 raised to the power exp. 
.................... // Date : N/A 
.................... // 
....................  
.................... float32 ldexp(float32 value, signed int8 exp) 
.................... { 
....................    return (value * pow(2,exp)); 
.................... } 
.................... //Overloaded functions for ldexp() for PCD 
.................... // Overloaded function ldexp() for data type - Float48 
....................  
.................... #if defined(__PCD__) 
.................... float48 ldexp(float48 value, signed int8 exp) 
.................... { 
....................    return (value * pow(2,exp)); 
.................... } 
.................... // Overloaded function ldexp() for data type - Float64 
.................... float64 ldexp(float64 value, signed int8 exp) 
.................... { 
....................    return (value * pow(2,exp)); 
.................... } 
.................... #endif 
....................  
.................... #endif 
....................  
....................  
.................... #define PIN_SDA  PIN_B0 
.................... #define PIN_SCL  PIN_B1 
.................... #use i2c(master, sda=PIN_SDA, scl=PIN_SCL) 
.................... //set RS232 
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD 
*
004F:  BCF    20.7
0050:  MOVF   20,W
0051:  BSF    03.5
0052:  MOVWF  07
0053:  BCF    03.5
0054:  BCF    07.7
0055:  MOVLW  08
0056:  MOVWF  78
0057:  GOTO   058
0058:  NOP
0059:  BSF    78.7
005A:  GOTO   069
005B:  BCF    78.7
005C:  RRF    65,F
005D:  BTFSC  03.0
005E:  BSF    07.7
005F:  BTFSS  03.0
0060:  BCF    07.7
0061:  BSF    78.6
0062:  GOTO   069
0063:  BCF    78.6
0064:  DECFSZ 78,F
0065:  GOTO   05C
0066:  GOTO   067
0067:  NOP
0068:  BSF    07.7
0069:  MOVLW  3F
006A:  MOVWF  04
006B:  DECFSZ 04,F
006C:  GOTO   06B
006D:  NOP
006E:  BTFSC  78.7
006F:  GOTO   05B
0070:  BTFSC  78.6
0071:  GOTO   063
0072:  RETURN
....................  
....................  
.................... signed int16 AZIMUT; 
.................... signed int ELEVACE; 
....................  
.................... int stupne (float rad) 
.................... { 
*
066F:  MOVF   5C,W
0670:  BSF    03.5
0671:  MOVWF  49
0672:  BCF    03.5
0673:  MOVF   5B,W
0674:  BSF    03.5
0675:  MOVWF  48
0676:  BCF    03.5
0677:  MOVF   5A,W
0678:  BSF    03.5
0679:  MOVWF  47
067A:  BCF    03.5
067B:  MOVF   59,W
067C:  BSF    03.5
067D:  MOVWF  46
067E:  MOVLW  C3
067F:  MOVWF  4D
0680:  MOVLW  F5
0681:  MOVWF  4C
0682:  MOVLW  48
0683:  MOVWF  4B
0684:  MOVLW  80
0685:  MOVWF  4A
0686:  BCF    03.5
0687:  CALL   142
*
06B1:  MOVF   78,W
06B2:  MOVWF  5D
.................... int a =(int) ((rad/3.14)*180); 
.................... return a; 
06B3:  MOVF   5D,W
06B4:  MOVWF  78
.................... } 
06B5:  RETURN
....................  
.................... float rad (float stup) 
.................... { 
*
0285:  MOVF   6E,W
0286:  BSF    03.5
0287:  MOVWF  49
0288:  BCF    03.5
0289:  MOVF   6D,W
028A:  BSF    03.5
028B:  MOVWF  48
028C:  BCF    03.5
028D:  MOVF   6C,W
028E:  BSF    03.5
028F:  MOVWF  47
0290:  BCF    03.5
0291:  MOVF   6B,W
0292:  BSF    03.5
0293:  MOVWF  46
0294:  CLRF   4D
0295:  CLRF   4C
0296:  MOVLW  34
0297:  MOVWF  4B
0298:  MOVLW  86
0299:  MOVWF  4A
029A:  BCF    03.5
029B:  CALL   142
*
02B6:  MOVF   7A,W
02B7:  MOVWF  72
02B8:  MOVF   79,W
02B9:  MOVWF  71
02BA:  MOVF   78,W
02BB:  MOVWF  70
02BC:  MOVF   77,W
02BD:  MOVWF  6F
.................... float a = ((stup/180)*3.14); 
.................... return a; 
02BE:  MOVF   6F,W
02BF:  MOVWF  77
02C0:  MOVF   70,W
02C1:  MOVWF  78
02C2:  MOVF   71,W
02C3:  MOVWF  79
02C4:  MOVF   72,W
02C5:  MOVWF  7A
.................... } 
02C6:  RETURN
....................  
.................... //provede vypocet dnu od zacatku roku 
.................... int16 den (int m, int16 d) //vstupem je mesic a den 
.................... { 
.................... switch (m) { 
*
101D:  MOVF   59,W
101E:  XORLW  01
101F:  BTFSC  03.2
1020:  GOTO   043
1021:  XORLW  03
1022:  BTFSC  03.2
1023:  GOTO   044
1024:  XORLW  01
1025:  BTFSC  03.2
1026:  GOTO   049
1027:  XORLW  07
1028:  BTFSC  03.2
1029:  GOTO   04E
102A:  XORLW  01
102B:  BTFSC  03.2
102C:  GOTO   053
102D:  XORLW  03
102E:  BTFSC  03.2
102F:  GOTO   058
1030:  XORLW  01
1031:  BTFSC  03.2
1032:  GOTO   05D
1033:  XORLW  0F
1034:  BTFSC  03.2
1035:  GOTO   062
1036:  XORLW  01
1037:  BTFSC  03.2
1038:  GOTO   067
1039:  XORLW  03
103A:  BTFSC  03.2
103B:  GOTO   06C
103C:  XORLW  01
103D:  BTFSC  03.2
103E:  GOTO   073
103F:  XORLW  07
1040:  BTFSC  03.2
1041:  GOTO   07A
1042:  GOTO   081
....................  
....................     case 1: d=d; 
....................  
....................            break; 
1043:  GOTO   0CD
....................  
....................     case 2: d=31+d; 
1044:  MOVLW  1F
1045:  ADDWF  5A,F
1046:  BTFSC  03.0
1047:  INCF   5B,F
....................  
....................            break; 
1048:  GOTO   0CD
....................             
....................     case 3: d=58+d; 
1049:  MOVLW  3A
104A:  ADDWF  5A,F
104B:  BTFSC  03.0
104C:  INCF   5B,F
....................  
....................            break; 
104D:  GOTO   0CD
....................  
....................     case 4: d=89+d; 
104E:  MOVLW  59
104F:  ADDWF  5A,F
1050:  BTFSC  03.0
1051:  INCF   5B,F
....................  
....................            break; 
1052:  GOTO   0CD
....................     case 5: d=119+d; 
1053:  MOVLW  77
1054:  ADDWF  5A,F
1055:  BTFSC  03.0
1056:  INCF   5B,F
....................  
....................            break; 
1057:  GOTO   0CD
....................  
....................     case 6: d=150+d; 
1058:  MOVLW  96
1059:  ADDWF  5A,F
105A:  BTFSC  03.0
105B:  INCF   5B,F
....................  
....................            break; 
105C:  GOTO   0CD
....................     case 7: d=180+d; 
105D:  MOVLW  B4
105E:  ADDWF  5A,F
105F:  BTFSC  03.0
1060:  INCF   5B,F
....................  
....................            break; 
1061:  GOTO   0CD
....................  
....................     case 8: d=211+d; 
1062:  MOVLW  D3
1063:  ADDWF  5A,F
1064:  BTFSC  03.0
1065:  INCF   5B,F
....................  
....................            break; 
1066:  GOTO   0CD
....................     case 9: d=242+d; 
1067:  MOVLW  F2
1068:  ADDWF  5A,F
1069:  BTFSC  03.0
106A:  INCF   5B,F
....................  
....................            break; 
106B:  GOTO   0CD
....................  
....................     case 10: d=262+d; 
106C:  MOVLW  06
106D:  ADDWF  5A,F
106E:  MOVLW  01
106F:  BTFSC  03.0
1070:  MOVLW  02
1071:  ADDWF  5B,F
....................  
....................            break; 
1072:  GOTO   0CD
....................     case 11: d=303+d; 
1073:  MOVLW  2F
1074:  ADDWF  5A,F
1075:  MOVLW  01
1076:  BTFSC  03.0
1077:  MOVLW  02
1078:  ADDWF  5B,F
....................  
....................            break; 
1079:  GOTO   0CD
....................  
....................     case 12: d=333+d; 
107A:  MOVLW  4D
107B:  ADDWF  5A,F
107C:  MOVLW  01
107D:  BTFSC  03.0
107E:  MOVLW  02
107F:  ADDWF  5B,F
....................  
....................            break; 
1080:  GOTO   0CD
....................  
....................     default:printf("chyba"); 
1081:  MOVLW  04
1082:  BSF    03.6
1083:  MOVWF  0D
1084:  MOVLW  00
1085:  MOVWF  0F
....................  
....................            break; } 
*
10CB:  BCF    03.6
10CC:  GOTO   0CD
....................             
....................             
....................  printf("Den: %ld\r\n", d);           
10CD:  MOVLW  07
10CE:  BSF    03.6
10CF:  MOVWF  0D
10D0:  MOVLW  00
10D1:  MOVWF  0F
10D2:  BCF    03.0
10D3:  MOVLW  05
10D4:  BCF    03.6
10D5:  MOVWF  5C
10D6:  BCF    0A.4
10D7:  CALL   073
10D8:  BSF    0A.4
10D9:  MOVLW  10
10DA:  MOVWF  04
10DB:  MOVF   5B,W
10DC:  MOVWF  5D
10DD:  MOVF   5A,W
10DE:  MOVWF  5C
10DF:  BCF    0A.4
10E0:  CALL   0C2
10E1:  BSF    0A.4
10E2:  MOVLW  0D
10E3:  MOVWF  65
10E4:  BCF    0A.4
10E5:  CALL   04F
10E6:  BSF    0A.4
10E7:  MOVLW  0A
10E8:  MOVWF  65
10E9:  BCF    0A.4
10EA:  CALL   04F
10EB:  BSF    0A.4
....................     return d; 
10EC:  MOVF   5A,W
10ED:  MOVWF  78
10EE:  MOVF   5B,W
10EF:  MOVWF  79
....................  
.................... } 
....................  
.................... float deklinace (float d) //vstupem je den v roce 
.................... { 
*
1109:  MOVLW  3F
110A:  MOVWF  60
110B:  MOVLW  7E
110C:  MOVWF  5F
110D:  MOVLW  7C
110E:  MOVWF  5E
110F:  MOVLW  7E
1110:  MOVWF  5D
.................... float b = 0.98630137; 
.................... d=((rad(23.45))*sin(rad(b*(d-81)))); 
1111:  MOVLW  9A
1112:  MOVWF  6E
1113:  MOVLW  99
1114:  MOVWF  6D
1115:  MOVLW  3B
1116:  MOVWF  6C
1117:  MOVLW  83
1118:  MOVWF  6B
1119:  BCF    0A.4
111A:  CALL   285
111B:  BSF    0A.4
111C:  MOVF   77,W
111D:  MOVWF  61
111E:  MOVF   78,W
111F:  MOVWF  62
1120:  MOVF   79,W
1121:  MOVWF  63
1122:  MOVF   7A,W
1123:  MOVWF  64
1124:  CLRF   66
1125:  MOVF   04,W
1126:  MOVWF  65
1127:  BCF    66.0
1128:  BTFSC  03.7
1129:  BSF    66.0
112A:  BSF    03.1
112B:  MOVF   5C,W
112C:  BSF    03.5
112D:  MOVWF  4D
112E:  BCF    03.5
112F:  MOVF   5B,W
1130:  BSF    03.5
1131:  MOVWF  4C
1132:  BCF    03.5
1133:  MOVF   5A,W
1134:  BSF    03.5
1135:  MOVWF  4B
1136:  BCF    03.5
1137:  MOVF   59,W
1138:  BSF    03.5
1139:  MOVWF  4A
113A:  CLRF   51
113B:  CLRF   50
113C:  MOVLW  22
113D:  MOVWF  4F
113E:  MOVLW  85
113F:  MOVWF  4E
1140:  BCF    0A.4
1141:  BCF    03.5
1142:  CALL   2C7
1143:  BSF    0A.4
1144:  MOVF   65,W
1145:  MOVWF  04
1146:  BCF    03.7
1147:  BTFSC  66.0
1148:  BSF    03.7
1149:  MOVF   60,W
114A:  BSF    03.5
114B:  MOVWF  4D
114C:  BCF    03.5
114D:  MOVF   5F,W
114E:  BSF    03.5
114F:  MOVWF  4C
1150:  BCF    03.5
1151:  MOVF   5E,W
1152:  BSF    03.5
1153:  MOVWF  4B
1154:  BCF    03.5
1155:  MOVF   5D,W
1156:  BSF    03.5
1157:  MOVWF  4A
1158:  MOVF   7A,W
1159:  MOVWF  51
115A:  MOVF   79,W
115B:  MOVWF  50
115C:  MOVF   78,W
115D:  MOVWF  4F
115E:  MOVF   77,W
115F:  MOVWF  4E
1160:  BCF    0A.4
1161:  BCF    03.5
1162:  CALL   20E
1163:  BSF    0A.4
1164:  MOVF   77,W
1165:  MOVWF  67
1166:  MOVF   78,W
1167:  MOVWF  68
1168:  MOVF   79,W
1169:  MOVWF  69
116A:  MOVF   7A,W
116B:  MOVWF  6A
116C:  MOVWF  6E
116D:  MOVF   79,W
116E:  MOVWF  6D
116F:  MOVF   78,W
1170:  MOVWF  6C
1171:  MOVF   77,W
1172:  MOVWF  6B
1173:  BCF    0A.4
1174:  CALL   285
1175:  BSF    0A.4
1176:  MOVF   77,W
1177:  MOVWF  67
1178:  MOVF   78,W
1179:  MOVWF  68
117A:  MOVF   79,W
117B:  MOVWF  69
117C:  MOVF   7A,W
117D:  MOVWF  6A
117E:  MOVWF  6E
117F:  MOVF   79,W
1180:  MOVWF  6D
1181:  MOVF   78,W
1182:  MOVWF  6C
1183:  MOVF   77,W
1184:  MOVWF  6B
1185:  BCF    0A.4
1186:  CALL   644
1187:  BSF    0A.4
1188:  MOVF   64,W
1189:  BSF    03.5
118A:  MOVWF  4D
118B:  BCF    03.5
118C:  MOVF   63,W
118D:  BSF    03.5
118E:  MOVWF  4C
118F:  BCF    03.5
1190:  MOVF   62,W
1191:  BSF    03.5
1192:  MOVWF  4B
1193:  BCF    03.5
1194:  MOVF   61,W
1195:  BSF    03.5
1196:  MOVWF  4A
1197:  MOVF   7A,W
1198:  MOVWF  51
1199:  MOVF   79,W
119A:  MOVWF  50
119B:  MOVF   78,W
119C:  MOVWF  4F
119D:  MOVF   77,W
119E:  MOVWF  4E
119F:  BCF    0A.4
11A0:  BCF    03.5
11A1:  CALL   20E
11A2:  BSF    0A.4
11A3:  MOVF   7A,W
11A4:  MOVWF  5C
11A5:  MOVF   79,W
11A6:  MOVWF  5B
11A7:  MOVF   78,W
11A8:  MOVWF  5A
11A9:  MOVF   77,W
11AA:  MOVWF  59
.................... return d; 
11AB:  MOVF   59,W
11AC:  MOVWF  77
11AD:  MOVF   5A,W
11AE:  MOVWF  78
11AF:  MOVF   5B,W
11B0:  MOVWF  79
11B1:  MOVF   5C,W
11B2:  MOVWF  7A
....................  
.................... } 
....................  
.................... float lstm (int gmt) //vstupem je GMT dane lokality 
.................... { 
.................... float a; 
.................... a=((rad(15))*gmt); 
*
11BD:  CLRF   6E
11BE:  CLRF   6D
11BF:  MOVLW  70
11C0:  MOVWF  6C
11C1:  MOVLW  82
11C2:  MOVWF  6B
11C3:  BCF    0A.4
11C4:  CALL   285
11C5:  BSF    0A.4
11C6:  MOVF   77,W
11C7:  MOVWF  5E
11C8:  MOVF   78,W
11C9:  MOVWF  5F
11CA:  MOVF   79,W
11CB:  MOVWF  60
11CC:  MOVF   7A,W
11CD:  MOVWF  61
11CE:  BSF    03.5
11CF:  CLRF   4B
11D0:  BCF    03.5
11D1:  MOVF   59,W
11D2:  BSF    03.5
11D3:  MOVWF  4A
11D4:  BCF    0A.4
11D5:  BCF    03.5
11D6:  CALL   030
11D7:  BSF    0A.4
11D8:  MOVF   61,W
11D9:  BSF    03.5
11DA:  MOVWF  4D
11DB:  BCF    03.5
11DC:  MOVF   60,W
11DD:  BSF    03.5
11DE:  MOVWF  4C
11DF:  BCF    03.5
11E0:  MOVF   5F,W
11E1:  BSF    03.5
11E2:  MOVWF  4B
11E3:  BCF    03.5
11E4:  MOVF   5E,W
11E5:  BSF    03.5
11E6:  MOVWF  4A
11E7:  MOVF   7A,W
11E8:  MOVWF  51
11E9:  MOVF   79,W
11EA:  MOVWF  50
11EB:  MOVF   78,W
11EC:  MOVWF  4F
11ED:  MOVF   77,W
11EE:  MOVWF  4E
11EF:  BCF    0A.4
11F0:  BCF    03.5
11F1:  CALL   20E
11F2:  BSF    0A.4
11F3:  MOVF   7A,W
11F4:  MOVWF  5D
11F5:  MOVF   79,W
11F6:  MOVWF  5C
11F7:  MOVF   78,W
11F8:  MOVWF  5B
11F9:  MOVF   77,W
11FA:  MOVWF  5A
.................... return a; 
11FB:  MOVF   5A,W
11FC:  MOVWF  77
11FD:  MOVF   5B,W
11FE:  MOVWF  78
11FF:  MOVF   5C,W
1200:  MOVWF  79
1201:  MOVF   5D,W
1202:  MOVWF  7A
.................... } 
....................  
....................  
.................... float eot (float d) //vstupem je den v roce 
.................... { 
.................... float a; 
.................... a=rad(0.98630137*(d-81)); 
*
1213:  BSF    03.1
1214:  MOVF   5C,W
1215:  BSF    03.5
1216:  MOVWF  4D
1217:  BCF    03.5
1218:  MOVF   5B,W
1219:  BSF    03.5
121A:  MOVWF  4C
121B:  BCF    03.5
121C:  MOVF   5A,W
121D:  BSF    03.5
121E:  MOVWF  4B
121F:  BCF    03.5
1220:  MOVF   59,W
1221:  BSF    03.5
1222:  MOVWF  4A
1223:  CLRF   51
1224:  CLRF   50
1225:  MOVLW  22
1226:  MOVWF  4F
1227:  MOVLW  85
1228:  MOVWF  4E
1229:  BCF    0A.4
122A:  BCF    03.5
122B:  CALL   2C7
122C:  BSF    0A.4
122D:  MOVLW  3F
122E:  BSF    03.5
122F:  MOVWF  4D
1230:  MOVLW  7E
1231:  MOVWF  4C
1232:  MOVLW  7C
1233:  MOVWF  4B
1234:  MOVLW  7E
1235:  MOVWF  4A
1236:  MOVF   7A,W
1237:  MOVWF  51
1238:  MOVF   79,W
1239:  MOVWF  50
123A:  MOVF   78,W
123B:  MOVWF  4F
123C:  MOVF   77,W
123D:  MOVWF  4E
123E:  BCF    0A.4
123F:  BCF    03.5
1240:  CALL   20E
1241:  BSF    0A.4
1242:  MOVF   77,W
1243:  MOVWF  61
1244:  MOVF   78,W
1245:  MOVWF  62
1246:  MOVF   79,W
1247:  MOVWF  63
1248:  MOVF   7A,W
1249:  MOVWF  64
124A:  MOVWF  6E
124B:  MOVF   79,W
124C:  MOVWF  6D
124D:  MOVF   78,W
124E:  MOVWF  6C
124F:  MOVF   77,W
1250:  MOVWF  6B
1251:  BCF    0A.4
1252:  CALL   285
1253:  BSF    0A.4
1254:  MOVF   7A,W
1255:  MOVWF  60
1256:  MOVF   79,W
1257:  MOVWF  5F
1258:  MOVF   78,W
1259:  MOVWF  5E
125A:  MOVF   77,W
125B:  MOVWF  5D
.................... a=9.87*sin(2*a)-7.53*cos(a)-1.5*sin(a); 
125C:  BSF    03.5
125D:  CLRF   4D
125E:  CLRF   4C
125F:  CLRF   4B
1260:  MOVLW  80
1261:  MOVWF  4A
1262:  BCF    03.5
1263:  MOVF   60,W
1264:  BSF    03.5
1265:  MOVWF  51
1266:  BCF    03.5
1267:  MOVF   5F,W
1268:  BSF    03.5
1269:  MOVWF  50
126A:  BCF    03.5
126B:  MOVF   5E,W
126C:  BSF    03.5
126D:  MOVWF  4F
126E:  BCF    03.5
126F:  MOVF   5D,W
1270:  BSF    03.5
1271:  MOVWF  4E
1272:  BCF    0A.4
1273:  BCF    03.5
1274:  CALL   20E
1275:  BSF    0A.4
1276:  MOVF   77,W
1277:  MOVWF  61
1278:  MOVF   78,W
1279:  MOVWF  62
127A:  MOVF   79,W
127B:  MOVWF  63
127C:  MOVF   7A,W
127D:  MOVWF  64
127E:  MOVWF  6E
127F:  MOVF   79,W
1280:  MOVWF  6D
1281:  MOVF   78,W
1282:  MOVWF  6C
1283:  MOVF   77,W
1284:  MOVWF  6B
1285:  BCF    0A.4
1286:  CALL   644
1287:  BSF    0A.4
1288:  MOVLW  85
1289:  BSF    03.5
128A:  MOVWF  4D
128B:  MOVLW  EB
128C:  MOVWF  4C
128D:  MOVLW  1D
128E:  MOVWF  4B
128F:  MOVLW  82
1290:  MOVWF  4A
1291:  MOVF   7A,W
1292:  MOVWF  51
1293:  MOVF   79,W
1294:  MOVWF  50
1295:  MOVF   78,W
1296:  MOVWF  4F
1297:  MOVF   77,W
1298:  MOVWF  4E
1299:  BCF    0A.4
129A:  BCF    03.5
129B:  CALL   20E
129C:  BSF    0A.4
129D:  MOVF   77,W
129E:  MOVWF  61
129F:  MOVF   78,W
12A0:  MOVWF  62
12A1:  MOVF   79,W
12A2:  MOVWF  63
12A3:  MOVF   7A,W
12A4:  MOVWF  64
12A5:  MOVF   60,W
12A6:  MOVWF  76
12A7:  MOVF   5F,W
12A8:  MOVWF  75
12A9:  MOVF   5E,W
12AA:  MOVWF  74
12AB:  MOVF   5D,W
12AC:  MOVWF  73
12AD:  BCF    0A.4
12AE:  CALL   46F
12AF:  BSF    0A.4
12B0:  MOVLW  C3
12B1:  BSF    03.5
12B2:  MOVWF  4D
12B3:  MOVLW  F5
12B4:  MOVWF  4C
12B5:  MOVLW  70
12B6:  MOVWF  4B
12B7:  MOVLW  81
12B8:  MOVWF  4A
12B9:  MOVF   7A,W
12BA:  MOVWF  51
12BB:  MOVF   79,W
12BC:  MOVWF  50
12BD:  MOVF   78,W
12BE:  MOVWF  4F
12BF:  MOVF   77,W
12C0:  MOVWF  4E
12C1:  BCF    0A.4
12C2:  BCF    03.5
12C3:  CALL   20E
12C4:  BSF    0A.4
12C5:  CLRF   66
12C6:  MOVF   04,W
12C7:  MOVWF  65
12C8:  BCF    66.0
12C9:  BTFSC  03.7
12CA:  BSF    66.0
12CB:  BSF    03.1
12CC:  MOVF   64,W
12CD:  BSF    03.5
12CE:  MOVWF  4D
12CF:  BCF    03.5
12D0:  MOVF   63,W
12D1:  BSF    03.5
12D2:  MOVWF  4C
12D3:  BCF    03.5
12D4:  MOVF   62,W
12D5:  BSF    03.5
12D6:  MOVWF  4B
12D7:  BCF    03.5
12D8:  MOVF   61,W
12D9:  BSF    03.5
12DA:  MOVWF  4A
12DB:  MOVF   7A,W
12DC:  MOVWF  51
12DD:  MOVF   79,W
12DE:  MOVWF  50
12DF:  MOVF   78,W
12E0:  MOVWF  4F
12E1:  MOVF   77,W
12E2:  MOVWF  4E
12E3:  BCF    0A.4
12E4:  BCF    03.5
12E5:  CALL   2C7
12E6:  BSF    0A.4
12E7:  MOVF   65,W
12E8:  MOVWF  04
12E9:  BCF    03.7
12EA:  BTFSC  66.0
12EB:  BSF    03.7
12EC:  MOVF   77,W
12ED:  MOVWF  61
12EE:  MOVF   78,W
12EF:  MOVWF  62
12F0:  MOVF   79,W
12F1:  MOVWF  63
12F2:  MOVF   7A,W
12F3:  MOVWF  64
12F4:  MOVF   60,W
12F5:  MOVWF  6E
12F6:  MOVF   5F,W
12F7:  MOVWF  6D
12F8:  MOVF   5E,W
12F9:  MOVWF  6C
12FA:  MOVF   5D,W
12FB:  MOVWF  6B
12FC:  BCF    0A.4
12FD:  CALL   644
12FE:  BSF    0A.4
12FF:  BSF    03.5
1300:  CLRF   4D
1301:  CLRF   4C
1302:  MOVLW  40
1303:  MOVWF  4B
1304:  MOVLW  7F
1305:  MOVWF  4A
1306:  MOVF   7A,W
1307:  MOVWF  51
1308:  MOVF   79,W
1309:  MOVWF  50
130A:  MOVF   78,W
130B:  MOVWF  4F
130C:  MOVF   77,W
130D:  MOVWF  4E
130E:  BCF    0A.4
130F:  BCF    03.5
1310:  CALL   20E
1311:  BSF    0A.4
1312:  CLRF   68
1313:  MOVF   04,W
1314:  MOVWF  67
1315:  BCF    68.0
1316:  BTFSC  03.7
1317:  BSF    68.0
1318:  BSF    03.1
1319:  MOVF   64,W
131A:  BSF    03.5
131B:  MOVWF  4D
131C:  BCF    03.5
131D:  MOVF   63,W
131E:  BSF    03.5
131F:  MOVWF  4C
1320:  BCF    03.5
1321:  MOVF   62,W
1322:  BSF    03.5
1323:  MOVWF  4B
1324:  BCF    03.5
1325:  MOVF   61,W
1326:  BSF    03.5
1327:  MOVWF  4A
1328:  MOVF   7A,W
1329:  MOVWF  51
132A:  MOVF   79,W
132B:  MOVWF  50
132C:  MOVF   78,W
132D:  MOVWF  4F
132E:  MOVF   77,W
132F:  MOVWF  4E
1330:  BCF    0A.4
1331:  BCF    03.5
1332:  CALL   2C7
1333:  BSF    0A.4
1334:  MOVF   67,W
1335:  MOVWF  04
1336:  BCF    03.7
1337:  BTFSC  68.0
1338:  BSF    03.7
1339:  MOVF   7A,W
133A:  MOVWF  60
133B:  MOVF   79,W
133C:  MOVWF  5F
133D:  MOVF   78,W
133E:  MOVWF  5E
133F:  MOVF   77,W
1340:  MOVWF  5D
.................... return a; 
1341:  MOVF   5D,W
1342:  MOVWF  77
1343:  MOVF   5E,W
1344:  MOVWF  78
1345:  MOVF   5F,W
1346:  MOVWF  79
1347:  MOVF   60,W
1348:  MOVWF  7A
....................  
.................... } 
....................  
....................  
.................... float tc (int delka, float lstm, float eot) //vstupem je zemepisná delka, LSTM, EoT 
.................... { 
.................... float a; 
.................... a=4*(float)(delka-lstm)+eot; 
*
1378:  BSF    03.5
1379:  CLRF   4B
137A:  BCF    03.5
137B:  MOVF   5A,W
137C:  BSF    03.5
137D:  MOVWF  4A
137E:  BCF    0A.4
137F:  BCF    03.5
1380:  CALL   030
1381:  BSF    0A.4
1382:  BSF    03.1
1383:  MOVF   7A,W
1384:  BSF    03.5
1385:  MOVWF  4D
1386:  MOVF   79,W
1387:  MOVWF  4C
1388:  MOVF   78,W
1389:  MOVWF  4B
138A:  MOVF   77,W
138B:  MOVWF  4A
138C:  BCF    03.5
138D:  MOVF   5E,W
138E:  BSF    03.5
138F:  MOVWF  51
1390:  BCF    03.5
1391:  MOVF   5D,W
1392:  BSF    03.5
1393:  MOVWF  50
1394:  BCF    03.5
1395:  MOVF   5C,W
1396:  BSF    03.5
1397:  MOVWF  4F
1398:  BCF    03.5
1399:  MOVF   5B,W
139A:  BSF    03.5
139B:  MOVWF  4E
139C:  BCF    0A.4
139D:  BCF    03.5
139E:  CALL   2C7
139F:  BSF    0A.4
13A0:  BSF    03.5
13A1:  CLRF   4D
13A2:  CLRF   4C
13A3:  CLRF   4B
13A4:  MOVLW  81
13A5:  MOVWF  4A
13A6:  MOVF   7A,W
13A7:  MOVWF  51
13A8:  MOVF   79,W
13A9:  MOVWF  50
13AA:  MOVF   78,W
13AB:  MOVWF  4F
13AC:  MOVF   77,W
13AD:  MOVWF  4E
13AE:  BCF    0A.4
13AF:  BCF    03.5
13B0:  CALL   20E
13B1:  BSF    0A.4
13B2:  MOVF   77,W
13B3:  MOVWF  67
13B4:  MOVF   78,W
13B5:  MOVWF  68
13B6:  MOVF   79,W
13B7:  MOVWF  69
13B8:  MOVF   7A,W
13B9:  MOVWF  6A
13BA:  BCF    03.1
13BB:  MOVF   7A,W
13BC:  BSF    03.5
13BD:  MOVWF  4D
13BE:  BCF    03.5
13BF:  MOVF   79,W
13C0:  BSF    03.5
13C1:  MOVWF  4C
13C2:  BCF    03.5
13C3:  MOVF   78,W
13C4:  BSF    03.5
13C5:  MOVWF  4B
13C6:  BCF    03.5
13C7:  MOVF   77,W
13C8:  BSF    03.5
13C9:  MOVWF  4A
13CA:  BCF    03.5
13CB:  MOVF   62,W
13CC:  BSF    03.5
13CD:  MOVWF  51
13CE:  BCF    03.5
13CF:  MOVF   61,W
13D0:  BSF    03.5
13D1:  MOVWF  50
13D2:  BCF    03.5
13D3:  MOVF   60,W
13D4:  BSF    03.5
13D5:  MOVWF  4F
13D6:  BCF    03.5
13D7:  MOVF   5F,W
13D8:  BSF    03.5
13D9:  MOVWF  4E
13DA:  BCF    0A.4
13DB:  BCF    03.5
13DC:  CALL   2C7
13DD:  BSF    0A.4
13DE:  MOVF   7A,W
13DF:  MOVWF  66
13E0:  MOVF   79,W
13E1:  MOVWF  65
13E2:  MOVF   78,W
13E3:  MOVWF  64
13E4:  MOVF   77,W
13E5:  MOVWF  63
.................... return a; 
13E6:  MOVF   63,W
13E7:  MOVWF  77
13E8:  MOVF   64,W
13E9:  MOVWF  78
13EA:  MOVF   65,W
13EB:  MOVWF  79
13EC:  MOVF   66,W
13ED:  MOVWF  7A
.................... } 
....................  
....................  
.................... float lst (float lt, float tc) //vstupem je den GMT dane lokality 
.................... { 
.................... float a; 
.................... a=lt+(tc/60); 
*
1406:  MOVF   60,W
1407:  BSF    03.5
1408:  MOVWF  49
1409:  BCF    03.5
140A:  MOVF   5F,W
140B:  BSF    03.5
140C:  MOVWF  48
140D:  BCF    03.5
140E:  MOVF   5E,W
140F:  BSF    03.5
1410:  MOVWF  47
1411:  BCF    03.5
1412:  MOVF   5D,W
1413:  BSF    03.5
1414:  MOVWF  46
1415:  CLRF   4D
1416:  CLRF   4C
1417:  MOVLW  70
1418:  MOVWF  4B
1419:  MOVLW  84
141A:  MOVWF  4A
141B:  BCF    0A.4
141C:  BCF    03.5
141D:  CALL   142
141E:  BSF    0A.4
141F:  BCF    03.1
1420:  MOVF   5C,W
1421:  BSF    03.5
1422:  MOVWF  4D
1423:  BCF    03.5
1424:  MOVF   5B,W
1425:  BSF    03.5
1426:  MOVWF  4C
1427:  BCF    03.5
1428:  MOVF   5A,W
1429:  BSF    03.5
142A:  MOVWF  4B
142B:  BCF    03.5
142C:  MOVF   59,W
142D:  BSF    03.5
142E:  MOVWF  4A
142F:  MOVF   7A,W
1430:  MOVWF  51
1431:  MOVF   79,W
1432:  MOVWF  50
1433:  MOVF   78,W
1434:  MOVWF  4F
1435:  MOVF   77,W
1436:  MOVWF  4E
1437:  BCF    0A.4
1438:  BCF    03.5
1439:  CALL   2C7
143A:  BSF    0A.4
143B:  MOVF   7A,W
143C:  MOVWF  64
143D:  MOVF   79,W
143E:  MOVWF  63
143F:  MOVF   78,W
1440:  MOVWF  62
1441:  MOVF   77,W
1442:  MOVWF  61
.................... return a; 
1443:  MOVF   61,W
1444:  MOVWF  77
1445:  MOVF   62,W
1446:  MOVWF  78
1447:  MOVF   63,W
1448:  MOVWF  79
1449:  MOVF   64,W
144A:  MOVWF  7A
.................... } 
....................  
.................... float hra (float lst) //vstupem je den v roce 
.................... { 
.................... lst=(rad(15))*(lst-12); 
*
145B:  CLRF   6E
145C:  CLRF   6D
145D:  MOVLW  70
145E:  MOVWF  6C
145F:  MOVLW  82
1460:  MOVWF  6B
1461:  BCF    0A.4
1462:  CALL   285
1463:  BSF    0A.4
1464:  MOVF   77,W
1465:  MOVWF  5D
1466:  MOVF   78,W
1467:  MOVWF  5E
1468:  MOVF   79,W
1469:  MOVWF  5F
146A:  MOVF   7A,W
146B:  MOVWF  60
146C:  CLRF   62
146D:  MOVF   04,W
146E:  MOVWF  61
146F:  BCF    62.0
1470:  BTFSC  03.7
1471:  BSF    62.0
1472:  BSF    03.1
1473:  MOVF   5C,W
1474:  BSF    03.5
1475:  MOVWF  4D
1476:  BCF    03.5
1477:  MOVF   5B,W
1478:  BSF    03.5
1479:  MOVWF  4C
147A:  BCF    03.5
147B:  MOVF   5A,W
147C:  BSF    03.5
147D:  MOVWF  4B
147E:  BCF    03.5
147F:  MOVF   59,W
1480:  BSF    03.5
1481:  MOVWF  4A
1482:  CLRF   51
1483:  CLRF   50
1484:  MOVLW  40
1485:  MOVWF  4F
1486:  MOVLW  82
1487:  MOVWF  4E
1488:  BCF    0A.4
1489:  BCF    03.5
148A:  CALL   2C7
148B:  BSF    0A.4
148C:  MOVF   61,W
148D:  MOVWF  04
148E:  BCF    03.7
148F:  BTFSC  62.0
1490:  BSF    03.7
1491:  MOVF   60,W
1492:  BSF    03.5
1493:  MOVWF  4D
1494:  BCF    03.5
1495:  MOVF   5F,W
1496:  BSF    03.5
1497:  MOVWF  4C
1498:  BCF    03.5
1499:  MOVF   5E,W
149A:  BSF    03.5
149B:  MOVWF  4B
149C:  BCF    03.5
149D:  MOVF   5D,W
149E:  BSF    03.5
149F:  MOVWF  4A
14A0:  MOVF   7A,W
14A1:  MOVWF  51
14A2:  MOVF   79,W
14A3:  MOVWF  50
14A4:  MOVF   78,W
14A5:  MOVWF  4F
14A6:  MOVF   77,W
14A7:  MOVWF  4E
14A8:  BCF    0A.4
14A9:  BCF    03.5
14AA:  CALL   20E
14AB:  BSF    0A.4
14AC:  MOVF   7A,W
14AD:  MOVWF  5C
14AE:  MOVF   79,W
14AF:  MOVWF  5B
14B0:  MOVF   78,W
14B1:  MOVWF  5A
14B2:  MOVF   77,W
14B3:  MOVWF  59
.................... return lst; 
14B4:  MOVF   59,W
14B5:  MOVWF  77
14B6:  MOVF   5A,W
14B7:  MOVWF  78
14B8:  MOVF   5B,W
14B9:  MOVWF  79
14BA:  MOVF   5C,W
14BB:  MOVWF  7A
....................  
.................... } 
....................  
.................... void poziceSL(int m, int d, int h, int min, int gmt, float sirka, float delka) //vstupem je mesic, den, hodina, minuty, GMT, zemepisna sirka ve stupnich 
.................... { 
*
1000:  MOVF   27,W
1001:  MOVWF  59
1002:  MOVLW  3C
1003:  MOVWF  5A
1004:  BCF    0A.4
1005:  CALL   01B
1006:  BSF    0A.4
1007:  MOVF   78,W
1008:  ADDWF  26,W
1009:  BSF    03.5
100A:  CLRF   4B
100B:  MOVWF  4A
100C:  BCF    0A.4
100D:  BCF    03.5
100E:  CALL   030
100F:  BSF    0A.4
1010:  MOVF   7A,W
1011:  MOVWF  58
1012:  MOVF   79,W
1013:  MOVWF  57
1014:  MOVF   78,W
1015:  MOVWF  56
1016:  MOVF   77,W
1017:  MOVWF  55
.................... float den1; 
.................... float ele,azi,deklin, lstm1, eot1, tc1, lst1, hra1; 
.................... float lt = h+(min/60); 
....................  
.................... den1=(float) den(m,d); 
1018:  MOVF   24,W
1019:  MOVWF  59
101A:  CLRF   5B
101B:  MOVF   25,W
101C:  MOVWF  5A
*
10F0:  MOVF   79,W
10F1:  BSF    03.5
10F2:  MOVWF  4B
10F3:  MOVF   78,W
10F4:  MOVWF  4A
10F5:  BCF    0A.4
10F6:  BCF    03.5
10F7:  CALL   030
10F8:  BSF    0A.4
10F9:  MOVF   7A,W
10FA:  MOVWF  34
10FB:  MOVF   79,W
10FC:  MOVWF  33
10FD:  MOVF   78,W
10FE:  MOVWF  32
10FF:  MOVF   77,W
1100:  MOVWF  31
.................... deklin=deklinace(den1); 
1101:  MOVF   34,W
1102:  MOVWF  5C
1103:  MOVF   33,W
1104:  MOVWF  5B
1105:  MOVF   32,W
1106:  MOVWF  5A
1107:  MOVF   31,W
1108:  MOVWF  59
*
11B3:  MOVF   7A,W
11B4:  MOVWF  40
11B5:  MOVF   79,W
11B6:  MOVWF  3F
11B7:  MOVF   78,W
11B8:  MOVWF  3E
11B9:  MOVF   77,W
11BA:  MOVWF  3D
.................... lstm1=lstm(gmt); 
11BB:  MOVF   28,W
11BC:  MOVWF  59
*
1203:  MOVF   7A,W
1204:  MOVWF  44
1205:  MOVF   79,W
1206:  MOVWF  43
1207:  MOVF   78,W
1208:  MOVWF  42
1209:  MOVF   77,W
120A:  MOVWF  41
.................... eot1=eot(den1); 
120B:  MOVF   34,W
120C:  MOVWF  5C
120D:  MOVF   33,W
120E:  MOVWF  5B
120F:  MOVF   32,W
1210:  MOVWF  5A
1211:  MOVF   31,W
1212:  MOVWF  59
*
1349:  MOVF   7A,W
134A:  MOVWF  48
134B:  MOVF   79,W
134C:  MOVWF  47
134D:  MOVF   78,W
134E:  MOVWF  46
134F:  MOVF   77,W
1350:  MOVWF  45
.................... tc1=tc(delka, lstm1, eot1); 
1351:  MOVF   30,W
1352:  BSF    03.5
1353:  MOVWF  49
1354:  BCF    03.5
1355:  MOVF   2F,W
1356:  BSF    03.5
1357:  MOVWF  48
1358:  BCF    03.5
1359:  MOVF   2E,W
135A:  BSF    03.5
135B:  MOVWF  47
135C:  BCF    03.5
135D:  MOVF   2D,W
135E:  BSF    03.5
135F:  MOVWF  46
1360:  BCF    0A.4
1361:  BCF    03.5
1362:  CALL   44E
1363:  BSF    0A.4
1364:  MOVF   78,W
1365:  MOVWF  59
1366:  MOVF   59,W
1367:  MOVWF  5A
1368:  MOVF   44,W
1369:  MOVWF  5E
136A:  MOVF   43,W
136B:  MOVWF  5D
136C:  MOVF   42,W
136D:  MOVWF  5C
136E:  MOVF   41,W
136F:  MOVWF  5B
1370:  MOVF   48,W
1371:  MOVWF  62
1372:  MOVF   47,W
1373:  MOVWF  61
1374:  MOVF   46,W
1375:  MOVWF  60
1376:  MOVF   45,W
1377:  MOVWF  5F
*
13EE:  MOVF   7A,W
13EF:  MOVWF  4C
13F0:  MOVF   79,W
13F1:  MOVWF  4B
13F2:  MOVF   78,W
13F3:  MOVWF  4A
13F4:  MOVF   77,W
13F5:  MOVWF  49
.................... lst1=lst(lt,tc1); 
13F6:  MOVF   58,W
13F7:  MOVWF  5C
13F8:  MOVF   57,W
13F9:  MOVWF  5B
13FA:  MOVF   56,W
13FB:  MOVWF  5A
13FC:  MOVF   55,W
13FD:  MOVWF  59
13FE:  MOVF   4C,W
13FF:  MOVWF  60
1400:  MOVF   4B,W
1401:  MOVWF  5F
1402:  MOVF   4A,W
1403:  MOVWF  5E
1404:  MOVF   49,W
1405:  MOVWF  5D
*
144B:  MOVF   7A,W
144C:  MOVWF  50
144D:  MOVF   79,W
144E:  MOVWF  4F
144F:  MOVF   78,W
1450:  MOVWF  4E
1451:  MOVF   77,W
1452:  MOVWF  4D
.................... hra1=hra(lst1); 
1453:  MOVF   50,W
1454:  MOVWF  5C
1455:  MOVF   4F,W
1456:  MOVWF  5B
1457:  MOVF   4E,W
1458:  MOVWF  5A
1459:  MOVF   4D,W
145A:  MOVWF  59
*
14BC:  MOVF   7A,W
14BD:  MOVWF  54
14BE:  MOVF   79,W
14BF:  MOVWF  53
14C0:  MOVF   78,W
14C1:  MOVWF  52
14C2:  MOVF   77,W
14C3:  MOVWF  51
....................  
.................... sirka=rad(sirka); 
14C4:  MOVF   2C,W
14C5:  MOVWF  6E
14C6:  MOVF   2B,W
14C7:  MOVWF  6D
14C8:  MOVF   2A,W
14C9:  MOVWF  6C
14CA:  MOVF   29,W
14CB:  MOVWF  6B
14CC:  BCF    0A.4
14CD:  CALL   285
14CE:  BSF    0A.4
14CF:  MOVF   7A,W
14D0:  MOVWF  2C
14D1:  MOVF   79,W
14D2:  MOVWF  2B
14D3:  MOVF   78,W
14D4:  MOVWF  2A
14D5:  MOVF   77,W
14D6:  MOVWF  29
.................... ele=asin((sin(deklin)*sin(sirka))+(cos(deklin)*cos(sirka)*cos(hra1))); 
14D7:  MOVF   40,W
14D8:  MOVWF  6E
14D9:  MOVF   3F,W
14DA:  MOVWF  6D
14DB:  MOVF   3E,W
14DC:  MOVWF  6C
14DD:  MOVF   3D,W
14DE:  MOVWF  6B
14DF:  BCF    0A.4
14E0:  CALL   644
14E1:  BSF    0A.4
14E2:  MOVF   77,W
14E3:  MOVWF  59
14E4:  MOVF   78,W
14E5:  MOVWF  5A
14E6:  MOVF   79,W
14E7:  MOVWF  5B
14E8:  MOVF   7A,W
14E9:  MOVWF  5C
14EA:  MOVF   2C,W
14EB:  MOVWF  6E
14EC:  MOVF   2B,W
14ED:  MOVWF  6D
14EE:  MOVF   2A,W
14EF:  MOVWF  6C
14F0:  MOVF   29,W
14F1:  MOVWF  6B
14F2:  BCF    0A.4
14F3:  CALL   644
14F4:  BSF    0A.4
14F5:  MOVF   5C,W
14F6:  BSF    03.5
14F7:  MOVWF  4D
14F8:  BCF    03.5
14F9:  MOVF   5B,W
14FA:  BSF    03.5
14FB:  MOVWF  4C
14FC:  BCF    03.5
14FD:  MOVF   5A,W
14FE:  BSF    03.5
14FF:  MOVWF  4B
1500:  BCF    03.5
1501:  MOVF   59,W
1502:  BSF    03.5
1503:  MOVWF  4A
1504:  MOVF   7A,W
1505:  MOVWF  51
1506:  MOVF   79,W
1507:  MOVWF  50
1508:  MOVF   78,W
1509:  MOVWF  4F
150A:  MOVF   77,W
150B:  MOVWF  4E
150C:  BCF    0A.4
150D:  BCF    03.5
150E:  CALL   20E
150F:  BSF    0A.4
1510:  MOVF   77,W
1511:  MOVWF  59
1512:  MOVF   78,W
1513:  MOVWF  5A
1514:  MOVF   79,W
1515:  MOVWF  5B
1516:  MOVF   7A,W
1517:  MOVWF  5C
1518:  MOVF   40,W
1519:  MOVWF  76
151A:  MOVF   3F,W
151B:  MOVWF  75
151C:  MOVF   3E,W
151D:  MOVWF  74
151E:  MOVF   3D,W
151F:  MOVWF  73
1520:  BCF    0A.4
1521:  CALL   46F
1522:  BSF    0A.4
1523:  MOVF   77,W
1524:  MOVWF  5D
1525:  MOVF   78,W
1526:  MOVWF  5E
1527:  MOVF   79,W
1528:  MOVWF  5F
1529:  MOVF   7A,W
152A:  MOVWF  60
152B:  MOVF   2C,W
152C:  MOVWF  76
152D:  MOVF   2B,W
152E:  MOVWF  75
152F:  MOVF   2A,W
1530:  MOVWF  74
1531:  MOVF   29,W
1532:  MOVWF  73
1533:  BCF    0A.4
1534:  CALL   46F
1535:  BSF    0A.4
1536:  MOVF   60,W
1537:  BSF    03.5
1538:  MOVWF  4D
1539:  BCF    03.5
153A:  MOVF   5F,W
153B:  BSF    03.5
153C:  MOVWF  4C
153D:  BCF    03.5
153E:  MOVF   5E,W
153F:  BSF    03.5
1540:  MOVWF  4B
1541:  BCF    03.5
1542:  MOVF   5D,W
1543:  BSF    03.5
1544:  MOVWF  4A
1545:  MOVF   7A,W
1546:  MOVWF  51
1547:  MOVF   79,W
1548:  MOVWF  50
1549:  MOVF   78,W
154A:  MOVWF  4F
154B:  MOVF   77,W
154C:  MOVWF  4E
154D:  BCF    0A.4
154E:  BCF    03.5
154F:  CALL   20E
1550:  BSF    0A.4
1551:  MOVF   77,W
1552:  MOVWF  5D
1553:  MOVF   78,W
1554:  MOVWF  5E
1555:  MOVF   79,W
1556:  MOVWF  5F
1557:  MOVF   7A,W
1558:  MOVWF  60
1559:  MOVF   54,W
155A:  MOVWF  76
155B:  MOVF   53,W
155C:  MOVWF  75
155D:  MOVF   52,W
155E:  MOVWF  74
155F:  MOVF   51,W
1560:  MOVWF  73
1561:  BCF    0A.4
1562:  CALL   46F
1563:  BSF    0A.4
1564:  MOVF   60,W
1565:  BSF    03.5
1566:  MOVWF  4D
1567:  BCF    03.5
1568:  MOVF   5F,W
1569:  BSF    03.5
156A:  MOVWF  4C
156B:  BCF    03.5
156C:  MOVF   5E,W
156D:  BSF    03.5
156E:  MOVWF  4B
156F:  BCF    03.5
1570:  MOVF   5D,W
1571:  BSF    03.5
1572:  MOVWF  4A
1573:  MOVF   7A,W
1574:  MOVWF  51
1575:  MOVF   79,W
1576:  MOVWF  50
1577:  MOVF   78,W
1578:  MOVWF  4F
1579:  MOVF   77,W
157A:  MOVWF  4E
157B:  BCF    0A.4
157C:  BCF    03.5
157D:  CALL   20E
157E:  BSF    0A.4
157F:  CLRF   5E
1580:  MOVF   04,W
1581:  MOVWF  5D
1582:  BCF    5E.0
1583:  BTFSC  03.7
1584:  BSF    5E.0
1585:  BCF    03.1
1586:  MOVF   5C,W
1587:  BSF    03.5
1588:  MOVWF  4D
1589:  BCF    03.5
158A:  MOVF   5B,W
158B:  BSF    03.5
158C:  MOVWF  4C
158D:  BCF    03.5
158E:  MOVF   5A,W
158F:  BSF    03.5
1590:  MOVWF  4B
1591:  BCF    03.5
1592:  MOVF   59,W
1593:  BSF    03.5
1594:  MOVWF  4A
1595:  MOVF   7A,W
1596:  MOVWF  51
1597:  MOVF   79,W
1598:  MOVWF  50
1599:  MOVF   78,W
159A:  MOVWF  4F
159B:  MOVF   77,W
159C:  MOVWF  4E
159D:  BCF    0A.4
159E:  BCF    03.5
159F:  CALL   2C7
15A0:  BSF    0A.4
15A1:  MOVF   5D,W
15A2:  MOVWF  04
15A3:  BCF    03.7
15A4:  BTFSC  5E.0
15A5:  BSF    03.7
15A6:  MOVF   77,W
15A7:  MOVWF  59
15A8:  MOVF   78,W
15A9:  MOVWF  5A
15AA:  MOVF   79,W
15AB:  MOVWF  5B
15AC:  MOVF   7A,W
15AD:  MOVWF  5C
15AE:  MOVF   5C,W
15AF:  MOVWF  62
15B0:  MOVF   5B,W
15B1:  MOVWF  61
15B2:  MOVF   5A,W
15B3:  MOVWF  60
15B4:  MOVF   59,W
15B5:  MOVWF  5F
*
15D4:  MOVF   7A,W
15D5:  MOVWF  38
15D6:  MOVF   79,W
15D7:  MOVWF  37
15D8:  MOVF   78,W
15D9:  MOVWF  36
15DA:  MOVF   77,W
15DB:  MOVWF  35
.................... azi = acos(((sin(deklin)*cos(sirka))-(cos(deklin)*sin(sirka)*cos(hra1)))/(cos(ele))); 
15DC:  MOVF   40,W
15DD:  MOVWF  6E
15DE:  MOVF   3F,W
15DF:  MOVWF  6D
15E0:  MOVF   3E,W
15E1:  MOVWF  6C
15E2:  MOVF   3D,W
15E3:  MOVWF  6B
15E4:  BCF    0A.4
15E5:  CALL   644
15E6:  BSF    0A.4
15E7:  MOVF   77,W
15E8:  MOVWF  59
15E9:  MOVF   78,W
15EA:  MOVWF  5A
15EB:  MOVF   79,W
15EC:  MOVWF  5B
15ED:  MOVF   7A,W
15EE:  MOVWF  5C
15EF:  MOVF   2C,W
15F0:  MOVWF  76
15F1:  MOVF   2B,W
15F2:  MOVWF  75
15F3:  MOVF   2A,W
15F4:  MOVWF  74
15F5:  MOVF   29,W
15F6:  MOVWF  73
15F7:  BCF    0A.4
15F8:  CALL   46F
15F9:  BSF    0A.4
15FA:  MOVF   5C,W
15FB:  BSF    03.5
15FC:  MOVWF  4D
15FD:  BCF    03.5
15FE:  MOVF   5B,W
15FF:  BSF    03.5
1600:  MOVWF  4C
1601:  BCF    03.5
1602:  MOVF   5A,W
1603:  BSF    03.5
1604:  MOVWF  4B
1605:  BCF    03.5
1606:  MOVF   59,W
1607:  BSF    03.5
1608:  MOVWF  4A
1609:  MOVF   7A,W
160A:  MOVWF  51
160B:  MOVF   79,W
160C:  MOVWF  50
160D:  MOVF   78,W
160E:  MOVWF  4F
160F:  MOVF   77,W
1610:  MOVWF  4E
1611:  BCF    0A.4
1612:  BCF    03.5
1613:  CALL   20E
1614:  BSF    0A.4
1615:  MOVF   77,W
1616:  MOVWF  59
1617:  MOVF   78,W
1618:  MOVWF  5A
1619:  MOVF   79,W
161A:  MOVWF  5B
161B:  MOVF   7A,W
161C:  MOVWF  5C
161D:  MOVF   40,W
161E:  MOVWF  76
161F:  MOVF   3F,W
1620:  MOVWF  75
1621:  MOVF   3E,W
1622:  MOVWF  74
1623:  MOVF   3D,W
1624:  MOVWF  73
1625:  BCF    0A.4
1626:  CALL   46F
1627:  BSF    0A.4
1628:  MOVF   77,W
1629:  MOVWF  5D
162A:  MOVF   78,W
162B:  MOVWF  5E
162C:  MOVF   79,W
162D:  MOVWF  5F
162E:  MOVF   7A,W
162F:  MOVWF  60
1630:  MOVF   2C,W
1631:  MOVWF  6E
1632:  MOVF   2B,W
1633:  MOVWF  6D
1634:  MOVF   2A,W
1635:  MOVWF  6C
1636:  MOVF   29,W
1637:  MOVWF  6B
1638:  BCF    0A.4
1639:  CALL   644
163A:  BSF    0A.4
163B:  MOVF   60,W
163C:  BSF    03.5
163D:  MOVWF  4D
163E:  BCF    03.5
163F:  MOVF   5F,W
1640:  BSF    03.5
1641:  MOVWF  4C
1642:  BCF    03.5
1643:  MOVF   5E,W
1644:  BSF    03.5
1645:  MOVWF  4B
1646:  BCF    03.5
1647:  MOVF   5D,W
1648:  BSF    03.5
1649:  MOVWF  4A
164A:  MOVF   7A,W
164B:  MOVWF  51
164C:  MOVF   79,W
164D:  MOVWF  50
164E:  MOVF   78,W
164F:  MOVWF  4F
1650:  MOVF   77,W
1651:  MOVWF  4E
1652:  BCF    0A.4
1653:  BCF    03.5
1654:  CALL   20E
1655:  BSF    0A.4
1656:  MOVF   77,W
1657:  MOVWF  5D
1658:  MOVF   78,W
1659:  MOVWF  5E
165A:  MOVF   79,W
165B:  MOVWF  5F
165C:  MOVF   7A,W
165D:  MOVWF  60
165E:  MOVF   54,W
165F:  MOVWF  76
1660:  MOVF   53,W
1661:  MOVWF  75
1662:  MOVF   52,W
1663:  MOVWF  74
1664:  MOVF   51,W
1665:  MOVWF  73
1666:  BCF    0A.4
1667:  CALL   46F
1668:  BSF    0A.4
1669:  MOVF   60,W
166A:  BSF    03.5
166B:  MOVWF  4D
166C:  BCF    03.5
166D:  MOVF   5F,W
166E:  BSF    03.5
166F:  MOVWF  4C
1670:  BCF    03.5
1671:  MOVF   5E,W
1672:  BSF    03.5
1673:  MOVWF  4B
1674:  BCF    03.5
1675:  MOVF   5D,W
1676:  BSF    03.5
1677:  MOVWF  4A
1678:  MOVF   7A,W
1679:  MOVWF  51
167A:  MOVF   79,W
167B:  MOVWF  50
167C:  MOVF   78,W
167D:  MOVWF  4F
167E:  MOVF   77,W
167F:  MOVWF  4E
1680:  BCF    0A.4
1681:  BCF    03.5
1682:  CALL   20E
1683:  BSF    0A.4
1684:  CLRF   5E
1685:  MOVF   04,W
1686:  MOVWF  5D
1687:  BCF    5E.0
1688:  BTFSC  03.7
1689:  BSF    5E.0
168A:  BSF    03.1
168B:  MOVF   5C,W
168C:  BSF    03.5
168D:  MOVWF  4D
168E:  BCF    03.5
168F:  MOVF   5B,W
1690:  BSF    03.5
1691:  MOVWF  4C
1692:  BCF    03.5
1693:  MOVF   5A,W
1694:  BSF    03.5
1695:  MOVWF  4B
1696:  BCF    03.5
1697:  MOVF   59,W
1698:  BSF    03.5
1699:  MOVWF  4A
169A:  MOVF   7A,W
169B:  MOVWF  51
169C:  MOVF   79,W
169D:  MOVWF  50
169E:  MOVF   78,W
169F:  MOVWF  4F
16A0:  MOVF   77,W
16A1:  MOVWF  4E
16A2:  BCF    0A.4
16A3:  BCF    03.5
16A4:  CALL   2C7
16A5:  BSF    0A.4
16A6:  MOVF   5D,W
16A7:  MOVWF  04
16A8:  BCF    03.7
16A9:  BTFSC  5E.0
16AA:  BSF    03.7
16AB:  MOVF   77,W
16AC:  MOVWF  59
16AD:  MOVF   78,W
16AE:  MOVWF  5A
16AF:  MOVF   79,W
16B0:  MOVWF  5B
16B1:  MOVF   7A,W
16B2:  MOVWF  5C
16B3:  MOVF   38,W
16B4:  MOVWF  76
16B5:  MOVF   37,W
16B6:  MOVWF  75
16B7:  MOVF   36,W
16B8:  MOVWF  74
16B9:  MOVF   35,W
16BA:  MOVWF  73
16BB:  BCF    0A.4
16BC:  CALL   46F
16BD:  BSF    0A.4
16BE:  MOVF   5C,W
16BF:  BSF    03.5
16C0:  MOVWF  49
16C1:  BCF    03.5
16C2:  MOVF   5B,W
16C3:  BSF    03.5
16C4:  MOVWF  48
16C5:  BCF    03.5
16C6:  MOVF   5A,W
16C7:  BSF    03.5
16C8:  MOVWF  47
16C9:  BCF    03.5
16CA:  MOVF   59,W
16CB:  BSF    03.5
16CC:  MOVWF  46
16CD:  MOVF   7A,W
16CE:  MOVWF  4D
16CF:  MOVF   79,W
16D0:  MOVWF  4C
16D1:  MOVF   78,W
16D2:  MOVWF  4B
16D3:  MOVF   77,W
16D4:  MOVWF  4A
16D5:  BCF    0A.4
16D6:  BCF    03.5
16D7:  CALL   142
16D8:  BSF    0A.4
16D9:  MOVF   77,W
16DA:  MOVWF  59
16DB:  MOVF   78,W
16DC:  MOVWF  5A
16DD:  MOVF   79,W
16DE:  MOVWF  5B
16DF:  MOVF   7A,W
16E0:  MOVWF  5C
16E1:  MOVF   5C,W
16E2:  MOVWF  62
16E3:  MOVF   5B,W
16E4:  MOVWF  61
16E5:  MOVF   5A,W
16E6:  MOVWF  60
16E7:  MOVF   59,W
16E8:  MOVWF  5F
*
1708:  MOVF   7A,W
1709:  MOVWF  3C
170A:  MOVF   79,W
170B:  MOVWF  3B
170C:  MOVF   78,W
170D:  MOVWF  3A
170E:  MOVF   77,W
170F:  MOVWF  39
....................  
.................... //printf("Azimut: %6.3f\r\n", azi); 
.................... //printf("Elevce: %6.3f\r\n", ele); 
.................... ELEVACE=stupne(ele); 
1710:  MOVF   38,W
1711:  MOVWF  5C
1712:  MOVF   37,W
1713:  MOVWF  5B
1714:  MOVF   36,W
1715:  MOVWF  5A
1716:  MOVF   35,W
1717:  MOVWF  59
1718:  BCF    0A.4
1719:  CALL   66F
171A:  BSF    0A.4
171B:  MOVF   78,W
171C:  MOVWF  23
.................... AZIMUT= stupne(azi); 
171D:  MOVF   3C,W
171E:  MOVWF  5C
171F:  MOVF   3B,W
1720:  MOVWF  5B
1721:  MOVF   3A,W
1722:  MOVWF  5A
1723:  MOVF   39,W
1724:  MOVWF  59
1725:  BCF    0A.4
1726:  CALL   66F
1727:  BSF    0A.4
1728:  CLRF   7A
1729:  MOVF   78,W
172A:  MOVWF  21
172B:  MOVF   7A,W
172C:  MOVWF  22
.................... if(hra1>0) 
172D:  BSF    03.5
172E:  CLRF   49
172F:  CLRF   48
1730:  CLRF   47
1731:  CLRF   46
1732:  BCF    03.5
1733:  MOVF   54,W
1734:  BSF    03.5
1735:  MOVWF  4D
1736:  BCF    03.5
1737:  MOVF   53,W
1738:  BSF    03.5
1739:  MOVWF  4C
173A:  BCF    03.5
173B:  MOVF   52,W
173C:  BSF    03.5
173D:  MOVWF  4B
173E:  BCF    03.5
173F:  MOVF   51,W
1740:  BSF    03.5
1741:  MOVWF  4A
1742:  BCF    0A.4
1743:  BCF    03.5
1744:  CALL   40D
1745:  BSF    0A.4
1746:  BTFSS  03.0
1747:  GOTO   753
.................... { 
.................... AZIMUT= 360-AZIMUT; 
1748:  MOVF   21,W
1749:  SUBLW  68
174A:  MOVWF  21
174B:  MOVF   22,W
174C:  BTFSS  03.0
174D:  INCFSZ 22,W
174E:  GOTO   751
174F:  MOVLW  01
1750:  GOTO   752
1751:  SUBLW  01
1752:  MOVWF  22
.................... } 
.................... } 
1753:  BCF    0A.3
1754:  BCF    0A.4
1755:  GOTO   7B0 (RETURN)
....................  
.................... void main() 
.................... { 
*
0733:  CLRF   04
0734:  BCF    03.7
0735:  MOVLW  1F
0736:  ANDWF  03,F
0737:  MOVLW  71
0738:  BSF    03.5
0739:  MOVWF  0F
073A:  MOVF   0F,W
073B:  BCF    03.5
073C:  BCF    20.7
073D:  MOVF   20,W
073E:  BSF    03.5
073F:  MOVWF  07
0740:  BCF    03.5
0741:  BSF    07.7
0742:  BSF    03.5
0743:  BSF    03.6
0744:  MOVF   09,W
0745:  ANDLW  C0
0746:  MOVWF  09
0747:  BCF    03.6
0748:  BCF    1F.4
0749:  BCF    1F.5
074A:  MOVLW  00
074B:  BSF    03.6
074C:  MOVWF  08
074D:  BCF    03.5
074E:  CLRF   07
074F:  CLRF   08
0750:  CLRF   09
....................  
....................    setup_adc_ports(NO_ANALOGS|VSS_VDD); 
*
0754:  BSF    03.5
0755:  BSF    03.6
0756:  MOVF   09,W
0757:  ANDLW  C0
0758:  MOVWF  09
0759:  BCF    03.6
075A:  BCF    1F.4
075B:  BCF    1F.5
075C:  MOVLW  00
075D:  BSF    03.6
075E:  MOVWF  08
....................    setup_adc(ADC_CLOCK_DIV_2); 
075F:  BCF    03.5
0760:  BCF    03.6
0761:  BCF    1F.6
0762:  BCF    1F.7
0763:  BSF    03.5
0764:  BCF    1F.7
0765:  BCF    03.5
0766:  BSF    1F.0
....................    setup_spi(SPI_SS_DISABLED); 
0767:  BCF    14.5
0768:  BCF    20.5
0769:  MOVF   20,W
076A:  BSF    03.5
076B:  MOVWF  07
076C:  BCF    03.5
076D:  BSF    20.4
076E:  MOVF   20,W
076F:  BSF    03.5
0770:  MOVWF  07
0771:  BCF    03.5
0772:  BCF    20.3
0773:  MOVF   20,W
0774:  BSF    03.5
0775:  MOVWF  07
0776:  MOVLW  01
0777:  BCF    03.5
0778:  MOVWF  14
0779:  MOVLW  00
077A:  BSF    03.5
077B:  MOVWF  14
....................    setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); 
077C:  MOVF   01,W
077D:  ANDLW  C7
077E:  IORLW  08
077F:  MOVWF  01
....................    setup_timer_1(T1_DISABLED); 
0780:  BCF    03.5
0781:  CLRF   10
....................    setup_timer_2(T2_DISABLED,0,1); 
0782:  MOVLW  00
0783:  MOVWF  78
0784:  MOVWF  12
0785:  MOVLW  00
0786:  BSF    03.5
0787:  MOVWF  12
....................    setup_ccp1(CCP_OFF); 
0788:  BCF    03.5
0789:  BSF    20.2
078A:  MOVF   20,W
078B:  BSF    03.5
078C:  MOVWF  07
078D:  BCF    03.5
078E:  CLRF   17
078F:  BSF    03.5
0790:  CLRF   1B
0791:  CLRF   1C
0792:  MOVLW  01
0793:  MOVWF  1D
....................    setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard 
0794:  BCF    03.5
0795:  BSF    03.6
0796:  CLRF   07
0797:  CLRF   08
0798:  CLRF   09
....................  
....................    //TODO: User Code 
....................  
.................... while(TRUE) 
.................... { 
.................... //do promenne AZIMUT vlosti azimut a do ELEVACE elevaci slunce 
.................... poziceSL(11, 18, 14, 0, 0, 49, 14); //int mesic, den, hodina, minuta, odchylka èasu od GMT, sirka, delka 
0799:  MOVLW  0B
079A:  BCF    03.6
079B:  MOVWF  24
079C:  MOVLW  12
079D:  MOVWF  25
079E:  MOVLW  0E
079F:  MOVWF  26
07A0:  CLRF   27
07A1:  CLRF   28
07A2:  CLRF   2C
07A3:  CLRF   2B
07A4:  MOVLW  44
07A5:  MOVWF  2A
07A6:  MOVLW  84
07A7:  MOVWF  29
07A8:  CLRF   30
07A9:  CLRF   2F
07AA:  MOVLW  60
07AB:  MOVWF  2E
07AC:  MOVLW  82
07AD:  MOVWF  2D
07AE:  BSF    0A.4
07AF:  GOTO   000
07B0:  BCF    0A.4
....................  
....................  
.................... printf("Azimut: %ld\r\n", AZIMUT); 
07B1:  MOVLW  0D
07B2:  BSF    03.6
07B3:  MOVWF  0D
07B4:  MOVLW  00
07B5:  MOVWF  0F
07B6:  BCF    03.0
07B7:  MOVLW  08
07B8:  BCF    03.6
07B9:  MOVWF  5C
07BA:  CALL   073
07BB:  MOVLW  10
07BC:  MOVWF  04
07BD:  MOVF   22,W
07BE:  MOVWF  5D
07BF:  MOVF   21,W
07C0:  MOVWF  5C
07C1:  CALL   0C2
07C2:  MOVLW  0D
07C3:  MOVWF  65
07C4:  CALL   04F
07C5:  MOVLW  0A
07C6:  MOVWF  65
07C7:  CALL   04F
.................... printf("Elevce: %d\r\n", ELEVACE); 
07C8:  MOVLW  14
07C9:  BSF    03.6
07CA:  MOVWF  0D
07CB:  MOVLW  00
07CC:  MOVWF  0F
07CD:  BCF    03.0
07CE:  MOVLW  08
07CF:  BCF    03.6
07D0:  MOVWF  5C
07D1:  CALL   073
07D2:  MOVF   23,W
07D3:  MOVWF  24
07D4:  MOVLW  1F
07D5:  MOVWF  25
07D6:  GOTO   6B6
07D7:  MOVLW  0D
07D8:  MOVWF  65
07D9:  CALL   04F
07DA:  MOVLW  0A
07DB:  MOVWF  65
07DC:  CALL   04F
.................... delay_ms(2000); 
07DD:  MOVLW  08
07DE:  MOVWF  24
07DF:  MOVLW  FA
07E0:  MOVWF  25
07E1:  GOTO   71D
07E2:  DECFSZ 24,F
07E3:  GOTO   7DF
....................  
.................... } 
07E4:  BSF    03.6
07E5:  GOTO   799
....................  
....................  
....................  
....................  
.................... } 
07E6:  SLEEP

Configuration Fuses:
   Word  1: 2CF5   INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG
   Word  2: 3FFF   NOWRT BORV40