#line 1 "OBJ.C" #line 1 "obj.h" #line 1 "C:\C166\INC\REG167.H" sfr ADCIC = 0xFF98; sfr ADCON = 0xFFA0; sfr ADDAT = 0xFEA0; sfr ADEIC = 0xFF9A; sfr ADDAT2 = 0xF0A0; sbit ADST = ADCON^7; sbit ADBSY = ADCON^8; sbit ADWR = ADCON^9; sbit ADCIN = ADCON^10; sbit ADCRQ = ADCON^11; sbit ADCIE = ADCIC^6; sbit ADCIR = ADCIC^7; sbit ADEIE = ADEIC^6; sbit ADEIR = ADEIC^7; sfr CC0 = 0xFE80; sfr CC0IC = 0xFF78; sfr CC1 = 0xFE82; sfr CC1IC = 0xFF7A; sfr CC2 = 0xFE84; sfr CC2IC = 0xFF7C; sfr CC3 = 0xFE86; sfr CC3IC = 0xFF7E; sfr CC4 = 0xFE88; sfr CC4IC = 0xFF80; sfr CC5 = 0xFE8A; sfr CC5IC = 0xFF82; sfr CC6 = 0xFE8C; sfr CC6IC = 0xFF84; sfr CC7 = 0xFE8E; sfr CC7IC = 0xFF86; sfr CC8 = 0xFE90; sfr CC8IC = 0xFF88; sfr CC9 = 0xFE92; sfr CC9IC = 0xFF8A; sfr CC10 = 0xFE94; sfr CC10IC = 0xFF8C; sfr CC11 = 0xFE96; sfr CC11IC = 0xFF8E; sfr CC12 = 0xFE98; sfr CC12IC = 0xFF90; sfr CC13 = 0xFE9A; sfr CC13IC = 0xFF92; sfr CC14 = 0xFE9C; sfr CC14IC = 0xFF94; sfr CC15 = 0xFE9E; sfr CC15IC = 0xFF96; sfr CC16 = 0xFE60; sfr CC16IC = 0xF160; sfr CC17 = 0xFE62; sfr CC17IC = 0xF162; sfr CC18 = 0xFE64; sfr CC18IC = 0xF164; sfr CC19 = 0xFE66; sfr CC19IC = 0xF166; sfr CC20 = 0xFE68; sfr CC20IC = 0xF168; sfr CC21 = 0xFE6A; sfr CC21IC = 0xF16A; sfr CC22 = 0xFE6C; sfr CC22IC = 0xF16C; sfr CC23 = 0xFE6E; sfr CC23IC = 0xF16E; sfr CC24 = 0xFE70; sfr CC24IC = 0xF170; sfr CC25 = 0xFE72; sfr CC25IC = 0xF172; sfr CC26 = 0xFE74; sfr CC26IC = 0xF174; sfr CC27 = 0xFE76; sfr CC27IC = 0xF176; sfr CC28 = 0xFE78; sfr CC28IC = 0xF178; sfr CC29 = 0xFE7A; sfr CC29IC = 0xF184; sfr CC30 = 0xFE7C; sfr CC30IC = 0xF18C; sfr CC31 = 0xFE7E; sfr CC31IC = 0xF194; sfr CCM0 = 0xFF52; sfr CCM1 = 0xFF54; sfr CCM2 = 0xFF56; sfr CCM3 = 0xFF58; sfr CCM4 = 0xFF22; sfr CCM5 = 0xFF24; sfr CCM6 = 0xFF26; sfr CCM7 = 0xFF28; sfr T0 = 0xFE50; sfr T01CON = 0xFF50; sfr T0IC = 0xFF9C; sfr T0REL = 0xFE54; sfr T1 = 0xFE52; sfr T1IC = 0xFF9E; sfr T1REL = 0xFE56; sfr T7 = 0xF050; sfr T78CON = 0xFF20; sfr T7IC = 0xF17A; sfr T7REL = 0xF054; sfr T8 = 0xF052; sfr T8IC = 0xF17C; sfr T8REL = 0xF056; sbit CC0IR = CC0IC^7; sbit CC0IE = CC0IC^6; sbit CC1IR = CC1IC^7; sbit CC1IE = CC1IC^6; sbit CC2IR = CC2IC^7; sbit CC2IE = CC2IC^6; sbit CC3IR = CC3IC^7; sbit CC3IE = CC3IC^6; sbit CC4IR = CC4IC^7; sbit CC4IE = CC4IC^6; sbit CC5IR = CC5IC^7; sbit CC5IE = CC5IC^6; sbit CC6IR = CC6IC^7; sbit CC6IE = CC6IC^6; sbit CC7IR = CC7IC^7; sbit CC7IE = CC7IC^6; sbit CC8IR = CC8IC^7; sbit CC8IE = CC8IC^6; sbit CC9IR = CC9IC^7; sbit CC9IE = CC9IC^6; sbit CC10IR = CC10IC^7; sbit CC10IE = CC10IC^6; sbit CC11IR = CC11IC^7; sbit CC11IE = CC11IC^6; sbit CC12IR = CC12IC^7; sbit CC12IE = CC12IC^6; sbit CC13IR = CC13IC^7; sbit CC13IE = CC13IC^6; sbit CC14IR = CC14IC^7; sbit CC14IE = CC14IC^6; sbit CC15IR = CC15IC^7; sbit CC15IE = CC15IC^6; sbit CC16IR = CC16IC^7; sbit CC16IE = CC16IC^6; sbit CC17IR = CC17IC^7; sbit CC17IE = CC17IC^6; sbit CC18IR = CC18IC^7; sbit CC18IE = CC18IC^6; sbit CC19IR = CC19IC^7; sbit CC19IE = CC19IC^6; sbit CC20IR = CC20IC^7; sbit CC20IE = CC20IC^6; sbit CC21IR = CC21IC^7; sbit CC21IE = CC21IC^6; sbit CC22IR = CC22IC^7; sbit CC22IE = CC22IC^6; sbit CC23IR = CC23IC^7; sbit CC23IE = CC23IC^6; sbit CC24IR = CC24IC^7; sbit CC24IE = CC24IC^6; sbit CC25IR = CC25IC^7; sbit CC25IE = CC25IC^6; sbit CC26IR = CC26IC^7; sbit CC26IE = CC26IC^6; sbit CC27IR = CC27IC^7; sbit CC27IE = CC27IC^6; sbit CC28IR = CC28IC^7; sbit CC28IE = CC28IC^6; sbit CC29IR = CC29IC^7; sbit CC29IE = CC29IC^6; sbit CC30IR = CC30IC^7; sbit CC30IE = CC30IC^6; sbit CC31IR = CC31IC^7; sbit CC31IE = CC31IC^6; sbit ACC0 = CCM0^3; sbit ACC1 = CCM0^7; sbit ACC2 = CCM0^11; sbit ACC3 = CCM0^15; sbit ACC4 = CCM1^3; sbit ACC5 = CCM1^7; sbit ACC6 = CCM1^11; sbit ACC7 = CCM1^15; sbit ACC8 = CCM2^3; sbit ACC9 = CCM2^7; sbit ACC10 = CCM2^11; sbit ACC11 = CCM2^15; sbit ACC12 = CCM3^3; sbit ACC13 = CCM3^7; sbit ACC14 = CCM3^11; sbit ACC15 = CCM3^15; sbit ACC16 = CCM4^3; sbit ACC17 = CCM4^7; sbit ACC18 = CCM4^11; sbit ACC19 = CCM4^15; sbit ACC20 = CCM5^3; sbit ACC21 = CCM5^7; sbit ACC22 = CCM5^11; sbit ACC23 = CCM5^15; sbit ACC24 = CCM6^3; sbit ACC25 = CCM6^7; sbit ACC26 = CCM6^11; sbit ACC27 = CCM6^15; sbit ACC28 = CCM7^3; sbit ACC29 = CCM7^7; sbit ACC30 = CCM7^11; sbit ACC31 = CCM7^15; sbit T0IE = T0IC^6; sbit T0IR = T0IC^7; sbit T0M = T01CON^3; sbit T0R = T01CON^6; sbit T1IE = T1IC^6; sbit T1IR = T1IC^7; sbit T1M = T01CON^11; sbit T1R = T01CON^14; sbit T7IE = T7IC^6; sbit T7IR = T7IC^7; sbit T7M = T78CON^3; sbit T7R = T78CON^6; sbit T8IE = T8IC^6; sbit T8IR = T8IC^7; sbit T8M = T78CON^11; sbit T8R = T78CON^14; sfr CP = 0xFE10; sfr CSP = 0xFE08; sfr DPP0 = 0xFE00; sfr DPP1 = 0xFE02; sfr DPP2 = 0xFE04; sfr DPP3 = 0xFE06; sfr MDC = 0xFF0E; sfr MDH = 0xFE0C; sfr MDL = 0xFE0E; sfr ONES = 0xFF1E; sfr PSW = 0xFF10; sfr SP = 0xFE12; sfr STKOV = 0xFE14; sfr STKUN = 0xFE16; sfr SYSCON = 0xFF12; sfr TFR = 0xFFAC; sfr ZEROS = 0xFF1C; sfr BUSCON0 = 0xFF0C; sfr BUSCON1 = 0xFF14; sfr BUSCON2 = 0xFF16; sfr BUSCON3 = 0xFF18; sfr BUSCON4 = 0xFF1A; sfr ADDRSEL1 = 0xFE18; sfr ADDRSEL2 = 0xFE1A; sfr ADDRSEL3 = 0xFE1C; sfr ADDRSEL4 = 0xFE1E; sbit WRCFG = SYSCON^7; sbit CLKEN = SYSCON^8; sbit BYTDIS = SYSCON^9; sbit ROMEN = SYSCON^10; sbit SGTEN = SYSCON^11; sbit ROMS1 = SYSCON^12; sbit MDRIU = MDC^4; sbit N = PSW^0; sbit C = PSW^1; sbit V = PSW^2; sbit Z = PSW^3; sbit E = PSW^4; sbit MULIP = PSW^5; sbit USR0 = PSW^6; sbit HLDEN = PSW^10; sbit IEN = PSW^11; sbit RWDC0 = BUSCON0^4; sbit MTTC0 = BUSCON0^5; sbit ALECTL0 = BUSCON0^9; sbit BUSACT0 = BUSCON0^10; sbit RDYEN0 = BUSCON0^12; sbit RWDC1 = BUSCON1^4; sbit MTTC1 = BUSCON1^5; sbit ALECTL1 = BUSCON1^9; sbit BUSACT1 = BUSCON1^10; sbit RDYEN1 = BUSCON1^12; sbit CSREN1 = BUSCON1^14; sbit CSWEN1 = BUSCON1^15; sbit RWDC2 = BUSCON2^4; sbit MTTC2 = BUSCON2^5; sbit ALECTL2 = BUSCON2^9; sbit BUSACT2 = BUSCON2^10; sbit RDYEN2 = BUSCON2^12; sbit CSREN2 = BUSCON2^14; sbit CSWEN2 = BUSCON2^15; sbit RWDC3 = BUSCON3^4; sbit MTTC3 = BUSCON3^5; sbit ALECTL3 = BUSCON3^9; sbit BUSACT3 = BUSCON3^10; sbit RDYEN3 = BUSCON3^12; sbit CSREN3 = BUSCON3^14; sbit CSWEN3 = BUSCON3^15; sbit RWDC4 = BUSCON4^4; sbit MTTC4 = BUSCON4^5; sbit ALECTL4 = BUSCON4^9; sbit BUSACT4 = BUSCON4^10; sbit RDYEN4 = BUSCON4^12; sbit CSREN4 = BUSCON4^14; sbit CSWEN4 = BUSCON4^15; sbit ILLBUS = TFR^0; sbit ILLINA = TFR^1; sbit ILLOPA = TFR^2; sbit PRTFLT = TFR^3; sbit UNDOPC = TFR^7; sbit STKUF = TFR^13; sbit STKOF = TFR^14; sbit NMI = TFR^15; sfr EXICON = 0xF1C0; sfr ISNC = 0xF1DE; sbit RTCIE = ISNC^0; sbit RTCIR = ISNC^1; sbit PLLIE = ISNC^2; sbit PLLIR = ISNC^3; sfr PECC0 = 0xFEC0; sfr PECC1 = 0xFEC2; sfr PECC2 = 0xFEC4; sfr PECC3 = 0xFEC6; sfr PECC4 = 0xFEC8; sfr PECC5 = 0xFECA; sfr PECC6 = 0xFECC; sfr PECC7 = 0xFECE; sfr DP0L = 0xF100; sfr DP0H = 0xF102; sfr DP1L = 0xF104; sfr DP1H = 0xF106; sfr DP2 = 0xFFC2; sfr DP3 = 0xFFC6; sfr DP4 = 0xFFCA; sfr DP6 = 0xFFCE; sfr DP7 = 0xFFD2; sfr DP8 = 0xFFD6; sfr P0L = 0xFF00; sfr P0H = 0xFF02; sfr P1L = 0xFF04; sfr P1H = 0xFF06; sfr P2 = 0xFFC0; sfr P3 = 0xFFC4; sfr P4 = 0xFFC8; sfr P5 = 0xFFA2; sfr P6 = 0xFFCC; sfr P7 = 0xFFD0; sfr P8 = 0xFFD4; sfr ODP2 = 0xF1C2; sfr ODP3 = 0xF1C6; sfr ODP6 = 0xF1CE; sfr ODP7 = 0xF1D2; sfr ODP8 = 0xF1D6; sfr RP0H = 0xF108; sfr S0BG = 0xFEB4; sfr S0CON = 0xFFB0; sfr S0EIC = 0xFF70; sfr S0RBUF = 0xFEB2; sfr S0RIC = 0xFF6E; sfr S0TBUF = 0xFEB0; sfr S0TIC = 0xFF6C; sfr S0TBIC = 0xF19C; sbit S0STP = S0CON^3; sbit S0REN = S0CON^4; sbit S0PEN = S0CON^5; sbit S0FEN = S0CON^6; sbit S0OEN = S0CON^7; sbit S0PE = S0CON^8; sbit S0FE = S0CON^9; sbit S0OE = S0CON^10; sbit S0ODD = S0CON^12; sbit S0BRS = S0CON^13; sbit S0LB = S0CON^14; sbit S0R = S0CON^15; sbit S0TIE = S0TIC^6; sbit S0TIR = S0TIC^7; sbit S0TBIE = S0TBIC^6; sbit S0TBIR = S0TBIC^7; sbit S0RIE = S0RIC^6; sbit S0RIR = S0RIC^7; sbit S0EIE = S0EIC^6; sbit S0EIR = S0EIC^7; sfr SSCTIC = 0xFF72; sfr SSCRIC = 0xFF74; sfr SSCEIC = 0xFF76; sfr SSCTB = 0xF0B0; sfr SSCRB = 0xF0B2; sfr SSCBR = 0xF0B4; sfr SSCCON = 0xFFB2; sbit SSCHB = SSCCON^4; sbit SSCPH = SSCCON^5; sbit SSCPO = SSCCON^6; sbit SSCTE = SSCCON^8; sbit SSCTEN = SSCCON^8; sbit SSCRE = SSCCON^9; sbit SSCREN = SSCCON^9; sbit SSCPE = SSCCON^10; sbit SSCPEN = SSCCON^10; sbit SSCBE = SSCCON^11; sbit SSCBEN = SSCCON^11; sbit SSCBSY = SSCCON^12; sbit SSCMS = SSCCON^14; sbit SSCEN = SSCCON^15; sbit SSCTIR = SSCTIC^7; sbit SSCTIE = SSCTIC^6; sbit SSCRIR = SSCRIC^7; sbit SSCRIE = SSCRIC^6; sbit SSCEIR = SSCEIC^7; sbit SSCEIE = SSCEIC^6; sfr CAPREL = 0xFE4A; sfr CRIC = 0xFF6A; sfr T2 = 0xFE40; sfr T2CON = 0xFF40; sfr T2IC = 0xFF60; sfr T3 = 0xFE42; sfr T3CON = 0xFF42; sfr T3IC = 0xFF62; sfr T4 = 0xFE44; sfr T4CON = 0xFF44; sfr T4IC = 0xFF64; sfr T5 = 0xFE46; sfr T5CON = 0xFF46; sfr T5IC = 0xFF66; sfr T6 = 0xFE48; sfr T6CON = 0xFF48; sfr T6IC = 0xFF68; sfr WDT = 0xFEAE; sfr WDTCON = 0xFFAE; sbit CRIE = CRIC^6; sbit CRIR = CRIC^7; sbit T2R = T2CON^6; sbit T2UD = T2CON^7; sbit T2UDE = T2CON^8; sbit T2IE = T2IC^6; sbit T2IR = T2IC^7; sbit T3R = T3CON^6; sbit T3UD = T3CON^7; sbit T3UDE = T3CON^8; sbit T3OE = T3CON^9; sbit T3OTL = T3CON^10; sbit T3IE = T3IC^6; sbit T3IR = T3IC^7; sbit T4R = T4CON^6; sbit T4UD = T4CON^7; sbit T4UDE = T4CON^8; sbit T4IE = T4IC^6; sbit T4IR = T4IC^7; sbit T5R = T5CON^6; sbit T5UD = T5CON^7; sbit T5UDE = T5CON^8; sbit T5CLR = T5CON^14; sbit T5SC = T5CON^15; sbit T5IE = T5IC^6; sbit T5IR = T5IC^7; sbit T6R = T6CON^6; sbit T6UD = T6CON^7; sbit T6UDE = T6CON^8; sbit T6OE = T6CON^9; sbit T6OTL = T6CON^10; sbit T6SR = T6CON^15; sbit T6IE = T6IC^6; sbit T6IR = T6IC^7; sbit T0IN = P3^0; sbit T2IN = P3^7; sbit T3IN = P3^6; sbit T4IN = P3^5; sbit T5IN = P5^13; sbit T6IN = P5^12; sbit T2EUD = P5^15; sbit T3EUD = P3^4; sbit T4EUD = P5^14; sbit T5EUD = P5^11; sbit T6EUD = P5^10; sbit T3OUT = P3^3; sbit CAPIN = P3^2; sbit T6OUT = P3^1; sbit WDTIN = WDTCON^0; sbit WDTR = WDTCON^1; sfr PWMCON0 = 0xFF30; sfr PWMCON1 = 0xFF32; sfr PW0 = 0xFE30; sfr PW1 = 0xFE32; sfr PW2 = 0xFE34; sfr PW3 = 0xFE36; sfr PWMIC = 0xF17E; sfr PT0 = 0xF030; sfr PT1 = 0xF032; sfr PT2 = 0xF034; sfr PT3 = 0xF036; sfr PP0 = 0xF038; sfr PP1 = 0xF03A; sfr PP2 = 0xF03C; sfr PP3 = 0xF03E; sbit PTR0 = PWMCON0^0; sbit PTR1 = PWMCON0^1; sbit PTR2 = PWMCON0^2; sbit PTR3 = PWMCON0^3; sbit PTI0 = PWMCON0^4; sbit PTI1 = PWMCON0^5; sbit PTI2 = PWMCON0^6; sbit PTI3 = PWMCON0^7; sbit PIE0 = PWMCON0^8; sbit PIE1 = PWMCON0^9; sbit PIE2 = PWMCON0^10; sbit PIE3 = PWMCON0^11; sbit PIR0 = PWMCON0^12; sbit PIR1 = PWMCON0^13; sbit PIR2 = PWMCON0^14; sbit PIR3 = PWMCON0^15; sbit PEN0 = PWMCON1^0; sbit PEN1 = PWMCON1^1; sbit PEN2 = PWMCON1^2; sbit PEN3 = PWMCON1^3; sbit PM0 = PWMCON1^4; sbit PM1 = PWMCON1^5; sbit PM2 = PWMCON1^6; sbit PM3 = PWMCON1^7; sbit PB01 = PWMCON1^12; sbit PS2 = PWMCON1^14; sbit PS3 = PWMCON1^15; sbit PWMIR = PWMIC^7; sbit PWMIE = PWMIC^6; sfr XP0IC = 0xF186; sfr XP1IC = 0xF18E; sfr XP2IC = 0xF196; sfr XP3IC = 0xF19E; sbit XP0IR = XP0IC^7; sbit XP0IE = XP0IC^6; sbit XP1IR = XP1IC^7; sbit XP1IE = XP1IC^6; sbit XP2IR = XP2IC^7; sbit XP2IE = XP2IC^6; sbit XP3IR = XP3IC^7; sbit XP3IE = XP3IC^6; #line 5 "obj.h" #line 1 "C:\C166\INC\STDARG.H" typedef char *va_list; #line 6 "obj.h" #line 1 "C:\C166\INC\STDLIB.H" #line 10 "C:\C166\INC\STDLIB.H" #line 12 "C:\C166\INC\STDLIB.H" typedef unsigned int size_t; typedef char wchar_t; extern int abs (int val); extern long labs (long val); extern double atof (void *s1); extern long atol (void *s1); extern int atoi (void *s1); extern int rand (void); extern void srand (unsigned int); #line 38 "C:\C166\INC\STDLIB.H" #line 44 "C:\C166\INC\STDLIB.H" extern void far *malloc (size_t size); extern void free (void far *p); extern void init_mempool (void far *p, size_t size); extern void far *realloc (void far *p, size_t size); extern void far *calloc (size_t size, size_t len); extern void xhuge *xmalloc (unsigned long size); extern void xhuge *xcalloc (unsigned long size, unsigned long len); extern void xhuge *xrealloc (void xhuge *p, unsigned long size); extern void xinit_mempool (void xhuge *p, unsigned long size); extern void xfree (void xhuge *p); #line 7 "obj.h" #line 1 "C:\C166\INC\STDIO.H" #line 18 "C:\C166\INC\STDIO.H" #line 20 "C:\C166\INC\STDIO.H" extern char _getkey (void); extern char getchar (void); extern char ungetchar (char); extern char putchar (char); extern int printf (const char *, ...); extern int sprintf (char *, const char *, ...); extern int vprintf (const char *, char *); extern int vsprintf (char *, const char *, char *); extern char *gets (char *, unsigned int n); extern int scanf (const char *, ...); extern int sscanf (char *, const char *, ...); extern int puts (const char *); #line 8 "obj.h" #line 1 "C:\C166\INC\STRING.H" #line 10 "C:\C166\INC\STRING.H" #line 13 "C:\C166\INC\STRING.H" #line 15 "C:\C166\INC\STRING.H" #line 17 "C:\C166\INC\STRING.H" extern char *strcat (char *s1, char *s2); extern char *strncat (char *s1, char *s2, unsigned int n); extern int strcmp (char *s1, char *s2); extern int strncmp (char *s1, char *s2, unsigned int n); extern char *strcpy (char *s1, char *s2); extern char *strncpy (char *s1, char *s2, unsigned int n); extern size_t strlen (char *); extern char *strchr (char *s, char c); extern int strpos (char *s, char c); extern char *strrchr (char *s, char c); extern int strrpos (char *s, char c); extern int strspn (char *s, char *set); extern int strcspn (char *s, char *set); extern char *strpbrk (char *s, char *set); extern char *strrpbrk(char *s, char *set); extern int memcmp (void *s1, void *s2, unsigned int n); extern void *memcpy (void *s1, void *s2, unsigned int n); extern void *memchr (void *s, char val, unsigned int n); extern void *memccpy (void *s1, void *s2, char val, unsigned int n); extern void *memmove (void *s1, void *s2, unsigned int n); extern void *memset (void *s, char val, unsigned int n); extern char far *fstrcat (char far *s1, char far *s2); extern char far *fstrncat (char far *s1, char far *s2, unsigned int n); extern int fstrcmp (char far *s1, char far *s2); extern int fstrncmp (char far *s1, char far *s2, unsigned int n); extern char *fstrcpy (char far *s1, char far *s2); extern char *fstrncpy (char far *s1, char far *s2, unsigned int n); extern size_t fstrlen (char far *); extern char far *fstrchr (const char far *s, char c); extern char far *fstrrchr (const char far *s, char c); extern int fstrpos (const char far *s, char c); extern int fstrrpos (const char far *s, char c); extern int fstrspn (char far *s, char far *set); extern int fstrcspn (char far *s, char far *set); extern char *fstrpbrk (char far *s, char far *set); extern char *fstrrpbrk (char far *s, char far *set); extern int fmemcmp (void far *s1, void far *s2, unsigned int n); extern void far *fmemcpy (void far *s1, void far *s2, unsigned int n); extern void far *fmemchr (void far *s, char val, unsigned int n); extern void far *fmemccpy (void far *s1, void far *s2, char val, unsigned int n); extern void far *fmemmove (void far *s1, void far *s2, unsigned int n); extern void far *fmemset (void far *s, char val, unsigned int n); extern int xmemcmp (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemcpy (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemchr (void xhuge *s, char val, unsigned long n); extern void xhuge *xmemccpy (void xhuge *s1, void xhuge *s2, char val, unsigned long n); extern void xhuge *xmemmove (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemset (void xhuge *s, char val, unsigned long n); #line 9 "obj.h" #line 1 "C:\C166\INC\MATH.H" extern int abs (int val); extern long labs (long val); extern double fabs (double val); extern double sqrt (double val); extern double exp (double val); extern double log (double val); extern double log10 (double val); extern double sin (double val); extern double cos (double val); extern double tan (double val); extern double asin (double val); extern double acos (double val); extern double atan (double val); extern double sinh (double val); extern double cosh (double val); extern double tanh (double val); extern double atan2 (double y, double x); extern double ceil (double val); extern double floor (double val); extern double modf (double val, double *n); extern double pow (double x, double y); extern unsigned int _chkfloat_ (float x); extern unsigned int _chkdouble_ (double x); #line 10 "obj.h" #line 1 "C:\C166\INC\ABSACC.H" #line 10 "C:\C166\INC\ABSACC.H" #line 13 "C:\C166\INC\ABSACC.H" #line 11 "obj.h" #line 1 "C:\C166\INC\INTRINS.H" void _nop_ (void); void _idle_ (void); void _srvwdt_ (void); void _pwrdn_ (void); void _diswdt_ (void); void _einit_ (void); void _bfld_ (unsigned int sfr_, unsigned mask1, unsigned mask2); void _trap_ (int intno); void _atomic_ (int n_instr); void _endatomic_ (void); unsigned int _sof_ (void huge *); #line 22 "C:\C166\INC\INTRINS.H" #line 24 "C:\C166\INC\INTRINS.H" bit _testclear_ (bit); bit _testset_ (bit); extern unsigned char _crol_ (unsigned char, int); extern unsigned int _irol_ (unsigned int, int); extern unsigned long _lrol_ (unsigned long, int); extern unsigned char _cror_ (unsigned char, int); extern unsigned int _iror_ (unsigned int, int); extern unsigned long _lror_ (unsigned long, int); #line 12 "obj.h" #line 1 "global.h" sbit DP2_8 = DP2^8; sbit DP2_9 = DP2^9; sbit DP2_10 = DP2^10; sbit DP2_11 = DP2^11; sbit DP7_0 = DP7^0; sbit DP7_1 = DP7^1; sbit DP7_2 = DP7^2; sbit DP7_3 = DP7^3; sbit DP7_4 = DP7^4; sbit DP7_5 = DP7^5; sbit DP7_6 = DP7^6; sbit DP7_7 = DP7^7; sbit DP8_0 = DP8^0; sbit DP8_1 = DP8^1; sbit DP8_2 = DP8^2; sbit DP8_3 = DP8^3; sbit DP8_4 = DP8^4; sbit P2_8 = P2^8; sbit P2_9 = P2^9; sbit P2_10 = P2^10; sbit P2_11 = P2^11; sbit MOTORSWITCH = P8^4; #line 14 "obj.h" #line 1 "util.h" #line 1 "C:\C166\INC\STDIO.H" #line 10 "C:\C166\INC\STDIO.H" #line 5 "util.h" #line 5 "util.h" #line 1 "C:\C166\INC\ABSACC.H" #line 10 "C:\C166\INC\ABSACC.H" #line 13 "C:\C166\INC\ABSACC.H" #line 6 "util.h" #line 1 "C:\C166\INC\INTRINS.H" void _nop_ (void); void _idle_ (void); void _srvwdt_ (void); void _pwrdn_ (void); void _diswdt_ (void); void _einit_ (void); void _bfld_ (unsigned int sfr_, unsigned mask1, unsigned mask2); void _trap_ (int intno); void _atomic_ (int n_instr); void _endatomic_ (void); unsigned int _sof_ (void huge *); #line 22 "C:\C166\INC\INTRINS.H" #line 24 "C:\C166\INC\INTRINS.H" bit _testclear_ (bit); bit _testset_ (bit); extern unsigned char _crol_ (unsigned char, int); extern unsigned int _irol_ (unsigned int, int); extern unsigned long _lrol_ (unsigned long, int); extern unsigned char _cror_ (unsigned char, int); extern unsigned int _iror_ (unsigned int, int); extern unsigned long _lror_ (unsigned long, int); #line 7 "util.h" #line 1 "C:\C166\INC\REG167.H" sfr ADCIC = 0xFF98; sfr ADCON = 0xFFA0; sfr ADDAT = 0xFEA0; sfr ADEIC = 0xFF9A; sfr ADDAT2 = 0xF0A0; sbit ADST = ADCON^7; sbit ADBSY = ADCON^8; sbit ADWR = ADCON^9; sbit ADCIN = ADCON^10; sbit ADCRQ = ADCON^11; sbit ADCIE = ADCIC^6; sbit ADCIR = ADCIC^7; sbit ADEIE = ADEIC^6; sbit ADEIR = ADEIC^7; sfr CC0 = 0xFE80; sfr CC0IC = 0xFF78; sfr CC1 = 0xFE82; sfr CC1IC = 0xFF7A; sfr CC2 = 0xFE84; sfr CC2IC = 0xFF7C; sfr CC3 = 0xFE86; sfr CC3IC = 0xFF7E; sfr CC4 = 0xFE88; sfr CC4IC = 0xFF80; sfr CC5 = 0xFE8A; sfr CC5IC = 0xFF82; sfr CC6 = 0xFE8C; sfr CC6IC = 0xFF84; sfr CC7 = 0xFE8E; sfr CC7IC = 0xFF86; sfr CC8 = 0xFE90; sfr CC8IC = 0xFF88; sfr CC9 = 0xFE92; sfr CC9IC = 0xFF8A; sfr CC10 = 0xFE94; sfr CC10IC = 0xFF8C; sfr CC11 = 0xFE96; sfr CC11IC = 0xFF8E; sfr CC12 = 0xFE98; sfr CC12IC = 0xFF90; sfr CC13 = 0xFE9A; sfr CC13IC = 0xFF92; sfr CC14 = 0xFE9C; sfr CC14IC = 0xFF94; sfr CC15 = 0xFE9E; sfr CC15IC = 0xFF96; sfr CC16 = 0xFE60; sfr CC16IC = 0xF160; sfr CC17 = 0xFE62; sfr CC17IC = 0xF162; sfr CC18 = 0xFE64; sfr CC18IC = 0xF164; sfr CC19 = 0xFE66; sfr CC19IC = 0xF166; sfr CC20 = 0xFE68; sfr CC20IC = 0xF168; sfr CC21 = 0xFE6A; sfr CC21IC = 0xF16A; sfr CC22 = 0xFE6C; sfr CC22IC = 0xF16C; sfr CC23 = 0xFE6E; sfr CC23IC = 0xF16E; sfr CC24 = 0xFE70; sfr CC24IC = 0xF170; sfr CC25 = 0xFE72; sfr CC25IC = 0xF172; sfr CC26 = 0xFE74; sfr CC26IC = 0xF174; sfr CC27 = 0xFE76; sfr CC27IC = 0xF176; sfr CC28 = 0xFE78; sfr CC28IC = 0xF178; sfr CC29 = 0xFE7A; sfr CC29IC = 0xF184; sfr CC30 = 0xFE7C; sfr CC30IC = 0xF18C; sfr CC31 = 0xFE7E; sfr CC31IC = 0xF194; sfr CCM0 = 0xFF52; sfr CCM1 = 0xFF54; sfr CCM2 = 0xFF56; sfr CCM3 = 0xFF58; sfr CCM4 = 0xFF22; sfr CCM5 = 0xFF24; sfr CCM6 = 0xFF26; sfr CCM7 = 0xFF28; sfr T0 = 0xFE50; sfr T01CON = 0xFF50; sfr T0IC = 0xFF9C; sfr T0REL = 0xFE54; sfr T1 = 0xFE52; sfr T1IC = 0xFF9E; sfr T1REL = 0xFE56; sfr T7 = 0xF050; sfr T78CON = 0xFF20; sfr T7IC = 0xF17A; sfr T7REL = 0xF054; sfr T8 = 0xF052; sfr T8IC = 0xF17C; sfr T8REL = 0xF056; sbit CC0IR = CC0IC^7; sbit CC0IE = CC0IC^6; sbit CC1IR = CC1IC^7; sbit CC1IE = CC1IC^6; sbit CC2IR = CC2IC^7; sbit CC2IE = CC2IC^6; sbit CC3IR = CC3IC^7; sbit CC3IE = CC3IC^6; sbit CC4IR = CC4IC^7; sbit CC4IE = CC4IC^6; sbit CC5IR = CC5IC^7; sbit CC5IE = CC5IC^6; sbit CC6IR = CC6IC^7; sbit CC6IE = CC6IC^6; sbit CC7IR = CC7IC^7; sbit CC7IE = CC7IC^6; sbit CC8IR = CC8IC^7; sbit CC8IE = CC8IC^6; sbit CC9IR = CC9IC^7; sbit CC9IE = CC9IC^6; sbit CC10IR = CC10IC^7; sbit CC10IE = CC10IC^6; sbit CC11IR = CC11IC^7; sbit CC11IE = CC11IC^6; sbit CC12IR = CC12IC^7; sbit CC12IE = CC12IC^6; sbit CC13IR = CC13IC^7; sbit CC13IE = CC13IC^6; sbit CC14IR = CC14IC^7; sbit CC14IE = CC14IC^6; sbit CC15IR = CC15IC^7; sbit CC15IE = CC15IC^6; sbit CC16IR = CC16IC^7; sbit CC16IE = CC16IC^6; sbit CC17IR = CC17IC^7; sbit CC17IE = CC17IC^6; sbit CC18IR = CC18IC^7; sbit CC18IE = CC18IC^6; sbit CC19IR = CC19IC^7; sbit CC19IE = CC19IC^6; sbit CC20IR = CC20IC^7; sbit CC20IE = CC20IC^6; sbit CC21IR = CC21IC^7; sbit CC21IE = CC21IC^6; sbit CC22IR = CC22IC^7; sbit CC22IE = CC22IC^6; sbit CC23IR = CC23IC^7; sbit CC23IE = CC23IC^6; sbit CC24IR = CC24IC^7; sbit CC24IE = CC24IC^6; sbit CC25IR = CC25IC^7; sbit CC25IE = CC25IC^6; sbit CC26IR = CC26IC^7; sbit CC26IE = CC26IC^6; sbit CC27IR = CC27IC^7; sbit CC27IE = CC27IC^6; sbit CC28IR = CC28IC^7; sbit CC28IE = CC28IC^6; sbit CC29IR = CC29IC^7; sbit CC29IE = CC29IC^6; sbit CC30IR = CC30IC^7; sbit CC30IE = CC30IC^6; sbit CC31IR = CC31IC^7; sbit CC31IE = CC31IC^6; sbit ACC0 = CCM0^3; sbit ACC1 = CCM0^7; sbit ACC2 = CCM0^11; sbit ACC3 = CCM0^15; sbit ACC4 = CCM1^3; sbit ACC5 = CCM1^7; sbit ACC6 = CCM1^11; sbit ACC7 = CCM1^15; sbit ACC8 = CCM2^3; sbit ACC9 = CCM2^7; sbit ACC10 = CCM2^11; sbit ACC11 = CCM2^15; sbit ACC12 = CCM3^3; sbit ACC13 = CCM3^7; sbit ACC14 = CCM3^11; sbit ACC15 = CCM3^15; sbit ACC16 = CCM4^3; sbit ACC17 = CCM4^7; sbit ACC18 = CCM4^11; sbit ACC19 = CCM4^15; sbit ACC20 = CCM5^3; sbit ACC21 = CCM5^7; sbit ACC22 = CCM5^11; sbit ACC23 = CCM5^15; sbit ACC24 = CCM6^3; sbit ACC25 = CCM6^7; sbit ACC26 = CCM6^11; sbit ACC27 = CCM6^15; sbit ACC28 = CCM7^3; sbit ACC29 = CCM7^7; sbit ACC30 = CCM7^11; sbit ACC31 = CCM7^15; sbit T0IE = T0IC^6; sbit T0IR = T0IC^7; sbit T0M = T01CON^3; sbit T0R = T01CON^6; sbit T1IE = T1IC^6; sbit T1IR = T1IC^7; sbit T1M = T01CON^11; sbit T1R = T01CON^14; sbit T7IE = T7IC^6; sbit T7IR = T7IC^7; sbit T7M = T78CON^3; sbit T7R = T78CON^6; sbit T8IE = T8IC^6; sbit T8IR = T8IC^7; sbit T8M = T78CON^11; sbit T8R = T78CON^14; sfr CP = 0xFE10; sfr CSP = 0xFE08; sfr DPP0 = 0xFE00; sfr DPP1 = 0xFE02; sfr DPP2 = 0xFE04; sfr DPP3 = 0xFE06; sfr MDC = 0xFF0E; sfr MDH = 0xFE0C; sfr MDL = 0xFE0E; sfr ONES = 0xFF1E; sfr PSW = 0xFF10; sfr SP = 0xFE12; sfr STKOV = 0xFE14; sfr STKUN = 0xFE16; sfr SYSCON = 0xFF12; sfr TFR = 0xFFAC; sfr ZEROS = 0xFF1C; sfr BUSCON0 = 0xFF0C; sfr BUSCON1 = 0xFF14; sfr BUSCON2 = 0xFF16; sfr BUSCON3 = 0xFF18; sfr BUSCON4 = 0xFF1A; sfr ADDRSEL1 = 0xFE18; sfr ADDRSEL2 = 0xFE1A; sfr ADDRSEL3 = 0xFE1C; sfr ADDRSEL4 = 0xFE1E; sbit WRCFG = SYSCON^7; sbit CLKEN = SYSCON^8; sbit BYTDIS = SYSCON^9; sbit ROMEN = SYSCON^10; sbit SGTEN = SYSCON^11; sbit ROMS1 = SYSCON^12; sbit MDRIU = MDC^4; sbit N = PSW^0; sbit C = PSW^1; sbit V = PSW^2; sbit Z = PSW^3; sbit E = PSW^4; sbit MULIP = PSW^5; sbit USR0 = PSW^6; sbit HLDEN = PSW^10; sbit IEN = PSW^11; sbit RWDC0 = BUSCON0^4; sbit MTTC0 = BUSCON0^5; sbit ALECTL0 = BUSCON0^9; sbit BUSACT0 = BUSCON0^10; sbit RDYEN0 = BUSCON0^12; sbit RWDC1 = BUSCON1^4; sbit MTTC1 = BUSCON1^5; sbit ALECTL1 = BUSCON1^9; sbit BUSACT1 = BUSCON1^10; sbit RDYEN1 = BUSCON1^12; sbit CSREN1 = BUSCON1^14; sbit CSWEN1 = BUSCON1^15; sbit RWDC2 = BUSCON2^4; sbit MTTC2 = BUSCON2^5; sbit ALECTL2 = BUSCON2^9; sbit BUSACT2 = BUSCON2^10; sbit RDYEN2 = BUSCON2^12; sbit CSREN2 = BUSCON2^14; sbit CSWEN2 = BUSCON2^15; sbit RWDC3 = BUSCON3^4; sbit MTTC3 = BUSCON3^5; sbit ALECTL3 = BUSCON3^9; sbit BUSACT3 = BUSCON3^10; sbit RDYEN3 = BUSCON3^12; sbit CSREN3 = BUSCON3^14; sbit CSWEN3 = BUSCON3^15; sbit RWDC4 = BUSCON4^4; sbit MTTC4 = BUSCON4^5; sbit ALECTL4 = BUSCON4^9; sbit BUSACT4 = BUSCON4^10; sbit RDYEN4 = BUSCON4^12; sbit CSREN4 = BUSCON4^14; sbit CSWEN4 = BUSCON4^15; sbit ILLBUS = TFR^0; sbit ILLINA = TFR^1; sbit ILLOPA = TFR^2; sbit PRTFLT = TFR^3; sbit UNDOPC = TFR^7; sbit STKUF = TFR^13; sbit STKOF = TFR^14; sbit NMI = TFR^15; sfr EXICON = 0xF1C0; sfr ISNC = 0xF1DE; sbit RTCIE = ISNC^0; sbit RTCIR = ISNC^1; sbit PLLIE = ISNC^2; sbit PLLIR = ISNC^3; sfr PECC0 = 0xFEC0; sfr PECC1 = 0xFEC2; sfr PECC2 = 0xFEC4; sfr PECC3 = 0xFEC6; sfr PECC4 = 0xFEC8; sfr PECC5 = 0xFECA; sfr PECC6 = 0xFECC; sfr PECC7 = 0xFECE; sfr DP0L = 0xF100; sfr DP0H = 0xF102; sfr DP1L = 0xF104; sfr DP1H = 0xF106; sfr DP2 = 0xFFC2; sfr DP3 = 0xFFC6; sfr DP4 = 0xFFCA; sfr DP6 = 0xFFCE; sfr DP7 = 0xFFD2; sfr DP8 = 0xFFD6; sfr P0L = 0xFF00; sfr P0H = 0xFF02; sfr P1L = 0xFF04; sfr P1H = 0xFF06; sfr P2 = 0xFFC0; sfr P3 = 0xFFC4; sfr P4 = 0xFFC8; sfr P5 = 0xFFA2; sfr P6 = 0xFFCC; sfr P7 = 0xFFD0; sfr P8 = 0xFFD4; sfr ODP2 = 0xF1C2; sfr ODP3 = 0xF1C6; sfr ODP6 = 0xF1CE; sfr ODP7 = 0xF1D2; sfr ODP8 = 0xF1D6; sfr RP0H = 0xF108; sfr S0BG = 0xFEB4; sfr S0CON = 0xFFB0; sfr S0EIC = 0xFF70; sfr S0RBUF = 0xFEB2; sfr S0RIC = 0xFF6E; sfr S0TBUF = 0xFEB0; sfr S0TIC = 0xFF6C; sfr S0TBIC = 0xF19C; sbit S0STP = S0CON^3; sbit S0REN = S0CON^4; sbit S0PEN = S0CON^5; sbit S0FEN = S0CON^6; sbit S0OEN = S0CON^7; sbit S0PE = S0CON^8; sbit S0FE = S0CON^9; sbit S0OE = S0CON^10; sbit S0ODD = S0CON^12; sbit S0BRS = S0CON^13; sbit S0LB = S0CON^14; sbit S0R = S0CON^15; sbit S0TIE = S0TIC^6; sbit S0TIR = S0TIC^7; sbit S0TBIE = S0TBIC^6; sbit S0TBIR = S0TBIC^7; sbit S0RIE = S0RIC^6; sbit S0RIR = S0RIC^7; sbit S0EIE = S0EIC^6; sbit S0EIR = S0EIC^7; sfr SSCTIC = 0xFF72; sfr SSCRIC = 0xFF74; sfr SSCEIC = 0xFF76; sfr SSCTB = 0xF0B0; sfr SSCRB = 0xF0B2; sfr SSCBR = 0xF0B4; sfr SSCCON = 0xFFB2; sbit SSCHB = SSCCON^4; sbit SSCPH = SSCCON^5; sbit SSCPO = SSCCON^6; sbit SSCTE = SSCCON^8; sbit SSCTEN = SSCCON^8; sbit SSCRE = SSCCON^9; sbit SSCREN = SSCCON^9; sbit SSCPE = SSCCON^10; sbit SSCPEN = SSCCON^10; sbit SSCBE = SSCCON^11; sbit SSCBEN = SSCCON^11; sbit SSCBSY = SSCCON^12; sbit SSCMS = SSCCON^14; sbit SSCEN = SSCCON^15; sbit SSCTIR = SSCTIC^7; sbit SSCTIE = SSCTIC^6; sbit SSCRIR = SSCRIC^7; sbit SSCRIE = SSCRIC^6; sbit SSCEIR = SSCEIC^7; sbit SSCEIE = SSCEIC^6; sfr CAPREL = 0xFE4A; sfr CRIC = 0xFF6A; sfr T2 = 0xFE40; sfr T2CON = 0xFF40; sfr T2IC = 0xFF60; sfr T3 = 0xFE42; sfr T3CON = 0xFF42; sfr T3IC = 0xFF62; sfr T4 = 0xFE44; sfr T4CON = 0xFF44; sfr T4IC = 0xFF64; sfr T5 = 0xFE46; sfr T5CON = 0xFF46; sfr T5IC = 0xFF66; sfr T6 = 0xFE48; sfr T6CON = 0xFF48; sfr T6IC = 0xFF68; sfr WDT = 0xFEAE; sfr WDTCON = 0xFFAE; sbit CRIE = CRIC^6; sbit CRIR = CRIC^7; sbit T2R = T2CON^6; sbit T2UD = T2CON^7; sbit T2UDE = T2CON^8; sbit T2IE = T2IC^6; sbit T2IR = T2IC^7; sbit T3R = T3CON^6; sbit T3UD = T3CON^7; sbit T3UDE = T3CON^8; sbit T3OE = T3CON^9; sbit T3OTL = T3CON^10; sbit T3IE = T3IC^6; sbit T3IR = T3IC^7; sbit T4R = T4CON^6; sbit T4UD = T4CON^7; sbit T4UDE = T4CON^8; sbit T4IE = T4IC^6; sbit T4IR = T4IC^7; sbit T5R = T5CON^6; sbit T5UD = T5CON^7; sbit T5UDE = T5CON^8; sbit T5CLR = T5CON^14; sbit T5SC = T5CON^15; sbit T5IE = T5IC^6; sbit T5IR = T5IC^7; sbit T6R = T6CON^6; sbit T6UD = T6CON^7; sbit T6UDE = T6CON^8; sbit T6OE = T6CON^9; sbit T6OTL = T6CON^10; sbit T6SR = T6CON^15; sbit T6IE = T6IC^6; sbit T6IR = T6IC^7; sbit T0IN = P3^0; sbit T2IN = P3^7; sbit T3IN = P3^6; sbit T4IN = P3^5; sbit T5IN = P5^13; sbit T6IN = P5^12; sbit T2EUD = P5^15; sbit T3EUD = P3^4; sbit T4EUD = P5^14; sbit T5EUD = P5^11; sbit T6EUD = P5^10; sbit T3OUT = P3^3; sbit CAPIN = P3^2; sbit T6OUT = P3^1; sbit WDTIN = WDTCON^0; sbit WDTR = WDTCON^1; sfr PWMCON0 = 0xFF30; sfr PWMCON1 = 0xFF32; sfr PW0 = 0xFE30; sfr PW1 = 0xFE32; sfr PW2 = 0xFE34; sfr PW3 = 0xFE36; sfr PWMIC = 0xF17E; sfr PT0 = 0xF030; sfr PT1 = 0xF032; sfr PT2 = 0xF034; sfr PT3 = 0xF036; sfr PP0 = 0xF038; sfr PP1 = 0xF03A; sfr PP2 = 0xF03C; sfr PP3 = 0xF03E; sbit PTR0 = PWMCON0^0; sbit PTR1 = PWMCON0^1; sbit PTR2 = PWMCON0^2; sbit PTR3 = PWMCON0^3; sbit PTI0 = PWMCON0^4; sbit PTI1 = PWMCON0^5; sbit PTI2 = PWMCON0^6; sbit PTI3 = PWMCON0^7; sbit PIE0 = PWMCON0^8; sbit PIE1 = PWMCON0^9; sbit PIE2 = PWMCON0^10; sbit PIE3 = PWMCON0^11; sbit PIR0 = PWMCON0^12; sbit PIR1 = PWMCON0^13; sbit PIR2 = PWMCON0^14; sbit PIR3 = PWMCON0^15; sbit PEN0 = PWMCON1^0; sbit PEN1 = PWMCON1^1; sbit PEN2 = PWMCON1^2; sbit PEN3 = PWMCON1^3; sbit PM0 = PWMCON1^4; sbit PM1 = PWMCON1^5; sbit PM2 = PWMCON1^6; sbit PM3 = PWMCON1^7; sbit PB01 = PWMCON1^12; sbit PS2 = PWMCON1^14; sbit PS3 = PWMCON1^15; sbit PWMIR = PWMIC^7; sbit PWMIE = PWMIC^6; sfr XP0IC = 0xF186; sfr XP1IC = 0xF18E; sfr XP2IC = 0xF196; sfr XP3IC = 0xF19E; sbit XP0IR = XP0IC^7; sbit XP0IE = XP0IC^6; sbit XP1IR = XP1IC^7; sbit XP1IE = XP1IC^6; sbit XP2IR = XP2IC^7; sbit XP2IE = XP2IC^6; sbit XP3IR = XP3IC^7; sbit XP3IE = XP3IC^6; #line 8 "util.h" sbit TxD = P3^10; sbit DTxD = DP3^10; sbit DRxD = DP3^11; extern void init_serial( unsigned int baud ); extern void wait_100mues(unsigned char Multiplikator); extern void wait_10ms(unsigned char Multiplikator); extern void init_lcd(void); extern void lcd_off(void); extern void lcd_on(unsigned char n); extern void lcd_clear(void); extern void lcd_setcursor(unsigned char z, unsigned char s); extern void lcd_putchar(unsigned char zeichen); extern void lcd_puts(unsigned char z, unsigned char s, char *a); extern unsigned char testkey( void ); extern unsigned char readkey( void ); extern void setDaysOfMonth( int month, int year ); #line 17 "obj.h" #line 1 "astro.h" #line 1 "C:\C166\INC\REG167.H" sfr ADCIC = 0xFF98; sfr ADCON = 0xFFA0; sfr ADDAT = 0xFEA0; sfr ADEIC = 0xFF9A; sfr ADDAT2 = 0xF0A0; sbit ADST = ADCON^7; sbit ADBSY = ADCON^8; sbit ADWR = ADCON^9; sbit ADCIN = ADCON^10; sbit ADCRQ = ADCON^11; sbit ADCIE = ADCIC^6; sbit ADCIR = ADCIC^7; sbit ADEIE = ADEIC^6; sbit ADEIR = ADEIC^7; sfr CC0 = 0xFE80; sfr CC0IC = 0xFF78; sfr CC1 = 0xFE82; sfr CC1IC = 0xFF7A; sfr CC2 = 0xFE84; sfr CC2IC = 0xFF7C; sfr CC3 = 0xFE86; sfr CC3IC = 0xFF7E; sfr CC4 = 0xFE88; sfr CC4IC = 0xFF80; sfr CC5 = 0xFE8A; sfr CC5IC = 0xFF82; sfr CC6 = 0xFE8C; sfr CC6IC = 0xFF84; sfr CC7 = 0xFE8E; sfr CC7IC = 0xFF86; sfr CC8 = 0xFE90; sfr CC8IC = 0xFF88; sfr CC9 = 0xFE92; sfr CC9IC = 0xFF8A; sfr CC10 = 0xFE94; sfr CC10IC = 0xFF8C; sfr CC11 = 0xFE96; sfr CC11IC = 0xFF8E; sfr CC12 = 0xFE98; sfr CC12IC = 0xFF90; sfr CC13 = 0xFE9A; sfr CC13IC = 0xFF92; sfr CC14 = 0xFE9C; sfr CC14IC = 0xFF94; sfr CC15 = 0xFE9E; sfr CC15IC = 0xFF96; sfr CC16 = 0xFE60; sfr CC16IC = 0xF160; sfr CC17 = 0xFE62; sfr CC17IC = 0xF162; sfr CC18 = 0xFE64; sfr CC18IC = 0xF164; sfr CC19 = 0xFE66; sfr CC19IC = 0xF166; sfr CC20 = 0xFE68; sfr CC20IC = 0xF168; sfr CC21 = 0xFE6A; sfr CC21IC = 0xF16A; sfr CC22 = 0xFE6C; sfr CC22IC = 0xF16C; sfr CC23 = 0xFE6E; sfr CC23IC = 0xF16E; sfr CC24 = 0xFE70; sfr CC24IC = 0xF170; sfr CC25 = 0xFE72; sfr CC25IC = 0xF172; sfr CC26 = 0xFE74; sfr CC26IC = 0xF174; sfr CC27 = 0xFE76; sfr CC27IC = 0xF176; sfr CC28 = 0xFE78; sfr CC28IC = 0xF178; sfr CC29 = 0xFE7A; sfr CC29IC = 0xF184; sfr CC30 = 0xFE7C; sfr CC30IC = 0xF18C; sfr CC31 = 0xFE7E; sfr CC31IC = 0xF194; sfr CCM0 = 0xFF52; sfr CCM1 = 0xFF54; sfr CCM2 = 0xFF56; sfr CCM3 = 0xFF58; sfr CCM4 = 0xFF22; sfr CCM5 = 0xFF24; sfr CCM6 = 0xFF26; sfr CCM7 = 0xFF28; sfr T0 = 0xFE50; sfr T01CON = 0xFF50; sfr T0IC = 0xFF9C; sfr T0REL = 0xFE54; sfr T1 = 0xFE52; sfr T1IC = 0xFF9E; sfr T1REL = 0xFE56; sfr T7 = 0xF050; sfr T78CON = 0xFF20; sfr T7IC = 0xF17A; sfr T7REL = 0xF054; sfr T8 = 0xF052; sfr T8IC = 0xF17C; sfr T8REL = 0xF056; sbit CC0IR = CC0IC^7; sbit CC0IE = CC0IC^6; sbit CC1IR = CC1IC^7; sbit CC1IE = CC1IC^6; sbit CC2IR = CC2IC^7; sbit CC2IE = CC2IC^6; sbit CC3IR = CC3IC^7; sbit CC3IE = CC3IC^6; sbit CC4IR = CC4IC^7; sbit CC4IE = CC4IC^6; sbit CC5IR = CC5IC^7; sbit CC5IE = CC5IC^6; sbit CC6IR = CC6IC^7; sbit CC6IE = CC6IC^6; sbit CC7IR = CC7IC^7; sbit CC7IE = CC7IC^6; sbit CC8IR = CC8IC^7; sbit CC8IE = CC8IC^6; sbit CC9IR = CC9IC^7; sbit CC9IE = CC9IC^6; sbit CC10IR = CC10IC^7; sbit CC10IE = CC10IC^6; sbit CC11IR = CC11IC^7; sbit CC11IE = CC11IC^6; sbit CC12IR = CC12IC^7; sbit CC12IE = CC12IC^6; sbit CC13IR = CC13IC^7; sbit CC13IE = CC13IC^6; sbit CC14IR = CC14IC^7; sbit CC14IE = CC14IC^6; sbit CC15IR = CC15IC^7; sbit CC15IE = CC15IC^6; sbit CC16IR = CC16IC^7; sbit CC16IE = CC16IC^6; sbit CC17IR = CC17IC^7; sbit CC17IE = CC17IC^6; sbit CC18IR = CC18IC^7; sbit CC18IE = CC18IC^6; sbit CC19IR = CC19IC^7; sbit CC19IE = CC19IC^6; sbit CC20IR = CC20IC^7; sbit CC20IE = CC20IC^6; sbit CC21IR = CC21IC^7; sbit CC21IE = CC21IC^6; sbit CC22IR = CC22IC^7; sbit CC22IE = CC22IC^6; sbit CC23IR = CC23IC^7; sbit CC23IE = CC23IC^6; sbit CC24IR = CC24IC^7; sbit CC24IE = CC24IC^6; sbit CC25IR = CC25IC^7; sbit CC25IE = CC25IC^6; sbit CC26IR = CC26IC^7; sbit CC26IE = CC26IC^6; sbit CC27IR = CC27IC^7; sbit CC27IE = CC27IC^6; sbit CC28IR = CC28IC^7; sbit CC28IE = CC28IC^6; sbit CC29IR = CC29IC^7; sbit CC29IE = CC29IC^6; sbit CC30IR = CC30IC^7; sbit CC30IE = CC30IC^6; sbit CC31IR = CC31IC^7; sbit CC31IE = CC31IC^6; sbit ACC0 = CCM0^3; sbit ACC1 = CCM0^7; sbit ACC2 = CCM0^11; sbit ACC3 = CCM0^15; sbit ACC4 = CCM1^3; sbit ACC5 = CCM1^7; sbit ACC6 = CCM1^11; sbit ACC7 = CCM1^15; sbit ACC8 = CCM2^3; sbit ACC9 = CCM2^7; sbit ACC10 = CCM2^11; sbit ACC11 = CCM2^15; sbit ACC12 = CCM3^3; sbit ACC13 = CCM3^7; sbit ACC14 = CCM3^11; sbit ACC15 = CCM3^15; sbit ACC16 = CCM4^3; sbit ACC17 = CCM4^7; sbit ACC18 = CCM4^11; sbit ACC19 = CCM4^15; sbit ACC20 = CCM5^3; sbit ACC21 = CCM5^7; sbit ACC22 = CCM5^11; sbit ACC23 = CCM5^15; sbit ACC24 = CCM6^3; sbit ACC25 = CCM6^7; sbit ACC26 = CCM6^11; sbit ACC27 = CCM6^15; sbit ACC28 = CCM7^3; sbit ACC29 = CCM7^7; sbit ACC30 = CCM7^11; sbit ACC31 = CCM7^15; sbit T0IE = T0IC^6; sbit T0IR = T0IC^7; sbit T0M = T01CON^3; sbit T0R = T01CON^6; sbit T1IE = T1IC^6; sbit T1IR = T1IC^7; sbit T1M = T01CON^11; sbit T1R = T01CON^14; sbit T7IE = T7IC^6; sbit T7IR = T7IC^7; sbit T7M = T78CON^3; sbit T7R = T78CON^6; sbit T8IE = T8IC^6; sbit T8IR = T8IC^7; sbit T8M = T78CON^11; sbit T8R = T78CON^14; sfr CP = 0xFE10; sfr CSP = 0xFE08; sfr DPP0 = 0xFE00; sfr DPP1 = 0xFE02; sfr DPP2 = 0xFE04; sfr DPP3 = 0xFE06; sfr MDC = 0xFF0E; sfr MDH = 0xFE0C; sfr MDL = 0xFE0E; sfr ONES = 0xFF1E; sfr PSW = 0xFF10; sfr SP = 0xFE12; sfr STKOV = 0xFE14; sfr STKUN = 0xFE16; sfr SYSCON = 0xFF12; sfr TFR = 0xFFAC; sfr ZEROS = 0xFF1C; sfr BUSCON0 = 0xFF0C; sfr BUSCON1 = 0xFF14; sfr BUSCON2 = 0xFF16; sfr BUSCON3 = 0xFF18; sfr BUSCON4 = 0xFF1A; sfr ADDRSEL1 = 0xFE18; sfr ADDRSEL2 = 0xFE1A; sfr ADDRSEL3 = 0xFE1C; sfr ADDRSEL4 = 0xFE1E; sbit WRCFG = SYSCON^7; sbit CLKEN = SYSCON^8; sbit BYTDIS = SYSCON^9; sbit ROMEN = SYSCON^10; sbit SGTEN = SYSCON^11; sbit ROMS1 = SYSCON^12; sbit MDRIU = MDC^4; sbit N = PSW^0; sbit C = PSW^1; sbit V = PSW^2; sbit Z = PSW^3; sbit E = PSW^4; sbit MULIP = PSW^5; sbit USR0 = PSW^6; sbit HLDEN = PSW^10; sbit IEN = PSW^11; sbit RWDC0 = BUSCON0^4; sbit MTTC0 = BUSCON0^5; sbit ALECTL0 = BUSCON0^9; sbit BUSACT0 = BUSCON0^10; sbit RDYEN0 = BUSCON0^12; sbit RWDC1 = BUSCON1^4; sbit MTTC1 = BUSCON1^5; sbit ALECTL1 = BUSCON1^9; sbit BUSACT1 = BUSCON1^10; sbit RDYEN1 = BUSCON1^12; sbit CSREN1 = BUSCON1^14; sbit CSWEN1 = BUSCON1^15; sbit RWDC2 = BUSCON2^4; sbit MTTC2 = BUSCON2^5; sbit ALECTL2 = BUSCON2^9; sbit BUSACT2 = BUSCON2^10; sbit RDYEN2 = BUSCON2^12; sbit CSREN2 = BUSCON2^14; sbit CSWEN2 = BUSCON2^15; sbit RWDC3 = BUSCON3^4; sbit MTTC3 = BUSCON3^5; sbit ALECTL3 = BUSCON3^9; sbit BUSACT3 = BUSCON3^10; sbit RDYEN3 = BUSCON3^12; sbit CSREN3 = BUSCON3^14; sbit CSWEN3 = BUSCON3^15; sbit RWDC4 = BUSCON4^4; sbit MTTC4 = BUSCON4^5; sbit ALECTL4 = BUSCON4^9; sbit BUSACT4 = BUSCON4^10; sbit RDYEN4 = BUSCON4^12; sbit CSREN4 = BUSCON4^14; sbit CSWEN4 = BUSCON4^15; sbit ILLBUS = TFR^0; sbit ILLINA = TFR^1; sbit ILLOPA = TFR^2; sbit PRTFLT = TFR^3; sbit UNDOPC = TFR^7; sbit STKUF = TFR^13; sbit STKOF = TFR^14; sbit NMI = TFR^15; sfr EXICON = 0xF1C0; sfr ISNC = 0xF1DE; sbit RTCIE = ISNC^0; sbit RTCIR = ISNC^1; sbit PLLIE = ISNC^2; sbit PLLIR = ISNC^3; sfr PECC0 = 0xFEC0; sfr PECC1 = 0xFEC2; sfr PECC2 = 0xFEC4; sfr PECC3 = 0xFEC6; sfr PECC4 = 0xFEC8; sfr PECC5 = 0xFECA; sfr PECC6 = 0xFECC; sfr PECC7 = 0xFECE; sfr DP0L = 0xF100; sfr DP0H = 0xF102; sfr DP1L = 0xF104; sfr DP1H = 0xF106; sfr DP2 = 0xFFC2; sfr DP3 = 0xFFC6; sfr DP4 = 0xFFCA; sfr DP6 = 0xFFCE; sfr DP7 = 0xFFD2; sfr DP8 = 0xFFD6; sfr P0L = 0xFF00; sfr P0H = 0xFF02; sfr P1L = 0xFF04; sfr P1H = 0xFF06; sfr P2 = 0xFFC0; sfr P3 = 0xFFC4; sfr P4 = 0xFFC8; sfr P5 = 0xFFA2; sfr P6 = 0xFFCC; sfr P7 = 0xFFD0; sfr P8 = 0xFFD4; sfr ODP2 = 0xF1C2; sfr ODP3 = 0xF1C6; sfr ODP6 = 0xF1CE; sfr ODP7 = 0xF1D2; sfr ODP8 = 0xF1D6; sfr RP0H = 0xF108; sfr S0BG = 0xFEB4; sfr S0CON = 0xFFB0; sfr S0EIC = 0xFF70; sfr S0RBUF = 0xFEB2; sfr S0RIC = 0xFF6E; sfr S0TBUF = 0xFEB0; sfr S0TIC = 0xFF6C; sfr S0TBIC = 0xF19C; sbit S0STP = S0CON^3; sbit S0REN = S0CON^4; sbit S0PEN = S0CON^5; sbit S0FEN = S0CON^6; sbit S0OEN = S0CON^7; sbit S0PE = S0CON^8; sbit S0FE = S0CON^9; sbit S0OE = S0CON^10; sbit S0ODD = S0CON^12; sbit S0BRS = S0CON^13; sbit S0LB = S0CON^14; sbit S0R = S0CON^15; sbit S0TIE = S0TIC^6; sbit S0TIR = S0TIC^7; sbit S0TBIE = S0TBIC^6; sbit S0TBIR = S0TBIC^7; sbit S0RIE = S0RIC^6; sbit S0RIR = S0RIC^7; sbit S0EIE = S0EIC^6; sbit S0EIR = S0EIC^7; sfr SSCTIC = 0xFF72; sfr SSCRIC = 0xFF74; sfr SSCEIC = 0xFF76; sfr SSCTB = 0xF0B0; sfr SSCRB = 0xF0B2; sfr SSCBR = 0xF0B4; sfr SSCCON = 0xFFB2; sbit SSCHB = SSCCON^4; sbit SSCPH = SSCCON^5; sbit SSCPO = SSCCON^6; sbit SSCTE = SSCCON^8; sbit SSCTEN = SSCCON^8; sbit SSCRE = SSCCON^9; sbit SSCREN = SSCCON^9; sbit SSCPE = SSCCON^10; sbit SSCPEN = SSCCON^10; sbit SSCBE = SSCCON^11; sbit SSCBEN = SSCCON^11; sbit SSCBSY = SSCCON^12; sbit SSCMS = SSCCON^14; sbit SSCEN = SSCCON^15; sbit SSCTIR = SSCTIC^7; sbit SSCTIE = SSCTIC^6; sbit SSCRIR = SSCRIC^7; sbit SSCRIE = SSCRIC^6; sbit SSCEIR = SSCEIC^7; sbit SSCEIE = SSCEIC^6; sfr CAPREL = 0xFE4A; sfr CRIC = 0xFF6A; sfr T2 = 0xFE40; sfr T2CON = 0xFF40; sfr T2IC = 0xFF60; sfr T3 = 0xFE42; sfr T3CON = 0xFF42; sfr T3IC = 0xFF62; sfr T4 = 0xFE44; sfr T4CON = 0xFF44; sfr T4IC = 0xFF64; sfr T5 = 0xFE46; sfr T5CON = 0xFF46; sfr T5IC = 0xFF66; sfr T6 = 0xFE48; sfr T6CON = 0xFF48; sfr T6IC = 0xFF68; sfr WDT = 0xFEAE; sfr WDTCON = 0xFFAE; sbit CRIE = CRIC^6; sbit CRIR = CRIC^7; sbit T2R = T2CON^6; sbit T2UD = T2CON^7; sbit T2UDE = T2CON^8; sbit T2IE = T2IC^6; sbit T2IR = T2IC^7; sbit T3R = T3CON^6; sbit T3UD = T3CON^7; sbit T3UDE = T3CON^8; sbit T3OE = T3CON^9; sbit T3OTL = T3CON^10; sbit T3IE = T3IC^6; sbit T3IR = T3IC^7; sbit T4R = T4CON^6; sbit T4UD = T4CON^7; sbit T4UDE = T4CON^8; sbit T4IE = T4IC^6; sbit T4IR = T4IC^7; sbit T5R = T5CON^6; sbit T5UD = T5CON^7; sbit T5UDE = T5CON^8; sbit T5CLR = T5CON^14; sbit T5SC = T5CON^15; sbit T5IE = T5IC^6; sbit T5IR = T5IC^7; sbit T6R = T6CON^6; sbit T6UD = T6CON^7; sbit T6UDE = T6CON^8; sbit T6OE = T6CON^9; sbit T6OTL = T6CON^10; sbit T6SR = T6CON^15; sbit T6IE = T6IC^6; sbit T6IR = T6IC^7; sbit T0IN = P3^0; sbit T2IN = P3^7; sbit T3IN = P3^6; sbit T4IN = P3^5; sbit T5IN = P5^13; sbit T6IN = P5^12; sbit T2EUD = P5^15; sbit T3EUD = P3^4; sbit T4EUD = P5^14; sbit T5EUD = P5^11; sbit T6EUD = P5^10; sbit T3OUT = P3^3; sbit CAPIN = P3^2; sbit T6OUT = P3^1; sbit WDTIN = WDTCON^0; sbit WDTR = WDTCON^1; sfr PWMCON0 = 0xFF30; sfr PWMCON1 = 0xFF32; sfr PW0 = 0xFE30; sfr PW1 = 0xFE32; sfr PW2 = 0xFE34; sfr PW3 = 0xFE36; sfr PWMIC = 0xF17E; sfr PT0 = 0xF030; sfr PT1 = 0xF032; sfr PT2 = 0xF034; sfr PT3 = 0xF036; sfr PP0 = 0xF038; sfr PP1 = 0xF03A; sfr PP2 = 0xF03C; sfr PP3 = 0xF03E; sbit PTR0 = PWMCON0^0; sbit PTR1 = PWMCON0^1; sbit PTR2 = PWMCON0^2; sbit PTR3 = PWMCON0^3; sbit PTI0 = PWMCON0^4; sbit PTI1 = PWMCON0^5; sbit PTI2 = PWMCON0^6; sbit PTI3 = PWMCON0^7; sbit PIE0 = PWMCON0^8; sbit PIE1 = PWMCON0^9; sbit PIE2 = PWMCON0^10; sbit PIE3 = PWMCON0^11; sbit PIR0 = PWMCON0^12; sbit PIR1 = PWMCON0^13; sbit PIR2 = PWMCON0^14; sbit PIR3 = PWMCON0^15; sbit PEN0 = PWMCON1^0; sbit PEN1 = PWMCON1^1; sbit PEN2 = PWMCON1^2; sbit PEN3 = PWMCON1^3; sbit PM0 = PWMCON1^4; sbit PM1 = PWMCON1^5; sbit PM2 = PWMCON1^6; sbit PM3 = PWMCON1^7; sbit PB01 = PWMCON1^12; sbit PS2 = PWMCON1^14; sbit PS3 = PWMCON1^15; sbit PWMIR = PWMIC^7; sbit PWMIE = PWMIC^6; sfr XP0IC = 0xF186; sfr XP1IC = 0xF18E; sfr XP2IC = 0xF196; sfr XP3IC = 0xF19E; sbit XP0IR = XP0IC^7; sbit XP0IE = XP0IC^6; sbit XP1IR = XP1IC^7; sbit XP1IE = XP1IC^6; sbit XP2IR = XP2IC^7; sbit XP2IE = XP2IC^6; sbit XP3IR = XP3IC^7; sbit XP3IE = XP3IC^6; #line 5 "astro.h" #line 1 "C:\C166\INC\STDARG.H" #line 10 "C:\C166\INC\STDARG.H" #line 6 "astro.h" #line 6 "astro.h" #line 1 "C:\C166\INC\STDLIB.H" #line 10 "C:\C166\INC\STDLIB.H" #line 12 "C:\C166\INC\STDLIB.H" #line 14 "C:\C166\INC\STDLIB.H" #line 17 "C:\C166\INC\STDLIB.H" #line 19 "C:\C166\INC\STDLIB.H" #line 22 "C:\C166\INC\STDLIB.H" #line 24 "C:\C166\INC\STDLIB.H" #line 26 "C:\C166\INC\STDLIB.H" extern int abs (int val); extern long labs (long val); extern double atof (void *s1); extern long atol (void *s1); extern int atoi (void *s1); extern int rand (void); extern void srand (unsigned int); #line 38 "C:\C166\INC\STDLIB.H" #line 44 "C:\C166\INC\STDLIB.H" extern void far *malloc (size_t size); extern void free (void far *p); extern void init_mempool (void far *p, size_t size); extern void far *realloc (void far *p, size_t size); extern void far *calloc (size_t size, size_t len); extern void xhuge *xmalloc (unsigned long size); extern void xhuge *xcalloc (unsigned long size, unsigned long len); extern void xhuge *xrealloc (void xhuge *p, unsigned long size); extern void xinit_mempool (void xhuge *p, unsigned long size); extern void xfree (void xhuge *p); #line 7 "astro.h" #line 1 "C:\C166\INC\STDIO.H" #line 10 "C:\C166\INC\STDIO.H" #line 8 "astro.h" #line 8 "astro.h" #line 1 "C:\C166\INC\STRING.H" #line 10 "C:\C166\INC\STRING.H" #line 13 "C:\C166\INC\STRING.H" #line 15 "C:\C166\INC\STRING.H" #line 17 "C:\C166\INC\STRING.H" extern char *strcat (char *s1, char *s2); extern char *strncat (char *s1, char *s2, unsigned int n); extern int strcmp (char *s1, char *s2); extern int strncmp (char *s1, char *s2, unsigned int n); extern char *strcpy (char *s1, char *s2); extern char *strncpy (char *s1, char *s2, unsigned int n); extern size_t strlen (char *); extern char *strchr (char *s, char c); extern int strpos (char *s, char c); extern char *strrchr (char *s, char c); extern int strrpos (char *s, char c); extern int strspn (char *s, char *set); extern int strcspn (char *s, char *set); extern char *strpbrk (char *s, char *set); extern char *strrpbrk(char *s, char *set); extern int memcmp (void *s1, void *s2, unsigned int n); extern void *memcpy (void *s1, void *s2, unsigned int n); extern void *memchr (void *s, char val, unsigned int n); extern void *memccpy (void *s1, void *s2, char val, unsigned int n); extern void *memmove (void *s1, void *s2, unsigned int n); extern void *memset (void *s, char val, unsigned int n); extern char far *fstrcat (char far *s1, char far *s2); extern char far *fstrncat (char far *s1, char far *s2, unsigned int n); extern int fstrcmp (char far *s1, char far *s2); extern int fstrncmp (char far *s1, char far *s2, unsigned int n); extern char *fstrcpy (char far *s1, char far *s2); extern char *fstrncpy (char far *s1, char far *s2, unsigned int n); extern size_t fstrlen (char far *); extern char far *fstrchr (const char far *s, char c); extern char far *fstrrchr (const char far *s, char c); extern int fstrpos (const char far *s, char c); extern int fstrrpos (const char far *s, char c); extern int fstrspn (char far *s, char far *set); extern int fstrcspn (char far *s, char far *set); extern char *fstrpbrk (char far *s, char far *set); extern char *fstrrpbrk (char far *s, char far *set); extern int fmemcmp (void far *s1, void far *s2, unsigned int n); extern void far *fmemcpy (void far *s1, void far *s2, unsigned int n); extern void far *fmemchr (void far *s, char val, unsigned int n); extern void far *fmemccpy (void far *s1, void far *s2, char val, unsigned int n); extern void far *fmemmove (void far *s1, void far *s2, unsigned int n); extern void far *fmemset (void far *s, char val, unsigned int n); extern int xmemcmp (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemcpy (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemchr (void xhuge *s, char val, unsigned long n); extern void xhuge *xmemccpy (void xhuge *s1, void xhuge *s2, char val, unsigned long n); extern void xhuge *xmemmove (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemset (void xhuge *s, char val, unsigned long n); #line 9 "astro.h" #line 1 "C:\C166\INC\MATH.H" extern int abs (int val); extern long labs (long val); extern double fabs (double val); extern double sqrt (double val); extern double exp (double val); extern double log (double val); extern double log10 (double val); extern double sin (double val); extern double cos (double val); extern double tan (double val); extern double asin (double val); extern double acos (double val); extern double atan (double val); extern double sinh (double val); extern double cosh (double val); extern double tanh (double val); extern double atan2 (double y, double x); extern double ceil (double val); extern double floor (double val); extern double modf (double val, double *n); extern double pow (double x, double y); extern unsigned int _chkfloat_ (float x); extern unsigned int _chkdouble_ (double x); #line 10 "astro.h" #line 1 "global.h" #line 5 "global.h" #line 204 "global.h" #line 11 "astro.h" extern void cCurrentStarTime( void ); extern void cAzAlt( void ); extern void cRaDec( void ); extern long dHourslArc10( double val ); extern long dDegreeslArc10( double val ); extern double lArc10dHours( long val ); extern double lArc10dDegrees( long val ); extern int arc10Sector( long val ); extern int degreesSector( double val ); #line 18 "obj.h" #line 1 "usr.h" #line 1 "C:\C166\INC\REG167.H" sfr ADCIC = 0xFF98; sfr ADCON = 0xFFA0; sfr ADDAT = 0xFEA0; sfr ADEIC = 0xFF9A; sfr ADDAT2 = 0xF0A0; sbit ADST = ADCON^7; sbit ADBSY = ADCON^8; sbit ADWR = ADCON^9; sbit ADCIN = ADCON^10; sbit ADCRQ = ADCON^11; sbit ADCIE = ADCIC^6; sbit ADCIR = ADCIC^7; sbit ADEIE = ADEIC^6; sbit ADEIR = ADEIC^7; sfr CC0 = 0xFE80; sfr CC0IC = 0xFF78; sfr CC1 = 0xFE82; sfr CC1IC = 0xFF7A; sfr CC2 = 0xFE84; sfr CC2IC = 0xFF7C; sfr CC3 = 0xFE86; sfr CC3IC = 0xFF7E; sfr CC4 = 0xFE88; sfr CC4IC = 0xFF80; sfr CC5 = 0xFE8A; sfr CC5IC = 0xFF82; sfr CC6 = 0xFE8C; sfr CC6IC = 0xFF84; sfr CC7 = 0xFE8E; sfr CC7IC = 0xFF86; sfr CC8 = 0xFE90; sfr CC8IC = 0xFF88; sfr CC9 = 0xFE92; sfr CC9IC = 0xFF8A; sfr CC10 = 0xFE94; sfr CC10IC = 0xFF8C; sfr CC11 = 0xFE96; sfr CC11IC = 0xFF8E; sfr CC12 = 0xFE98; sfr CC12IC = 0xFF90; sfr CC13 = 0xFE9A; sfr CC13IC = 0xFF92; sfr CC14 = 0xFE9C; sfr CC14IC = 0xFF94; sfr CC15 = 0xFE9E; sfr CC15IC = 0xFF96; sfr CC16 = 0xFE60; sfr CC16IC = 0xF160; sfr CC17 = 0xFE62; sfr CC17IC = 0xF162; sfr CC18 = 0xFE64; sfr CC18IC = 0xF164; sfr CC19 = 0xFE66; sfr CC19IC = 0xF166; sfr CC20 = 0xFE68; sfr CC20IC = 0xF168; sfr CC21 = 0xFE6A; sfr CC21IC = 0xF16A; sfr CC22 = 0xFE6C; sfr CC22IC = 0xF16C; sfr CC23 = 0xFE6E; sfr CC23IC = 0xF16E; sfr CC24 = 0xFE70; sfr CC24IC = 0xF170; sfr CC25 = 0xFE72; sfr CC25IC = 0xF172; sfr CC26 = 0xFE74; sfr CC26IC = 0xF174; sfr CC27 = 0xFE76; sfr CC27IC = 0xF176; sfr CC28 = 0xFE78; sfr CC28IC = 0xF178; sfr CC29 = 0xFE7A; sfr CC29IC = 0xF184; sfr CC30 = 0xFE7C; sfr CC30IC = 0xF18C; sfr CC31 = 0xFE7E; sfr CC31IC = 0xF194; sfr CCM0 = 0xFF52; sfr CCM1 = 0xFF54; sfr CCM2 = 0xFF56; sfr CCM3 = 0xFF58; sfr CCM4 = 0xFF22; sfr CCM5 = 0xFF24; sfr CCM6 = 0xFF26; sfr CCM7 = 0xFF28; sfr T0 = 0xFE50; sfr T01CON = 0xFF50; sfr T0IC = 0xFF9C; sfr T0REL = 0xFE54; sfr T1 = 0xFE52; sfr T1IC = 0xFF9E; sfr T1REL = 0xFE56; sfr T7 = 0xF050; sfr T78CON = 0xFF20; sfr T7IC = 0xF17A; sfr T7REL = 0xF054; sfr T8 = 0xF052; sfr T8IC = 0xF17C; sfr T8REL = 0xF056; sbit CC0IR = CC0IC^7; sbit CC0IE = CC0IC^6; sbit CC1IR = CC1IC^7; sbit CC1IE = CC1IC^6; sbit CC2IR = CC2IC^7; sbit CC2IE = CC2IC^6; sbit CC3IR = CC3IC^7; sbit CC3IE = CC3IC^6; sbit CC4IR = CC4IC^7; sbit CC4IE = CC4IC^6; sbit CC5IR = CC5IC^7; sbit CC5IE = CC5IC^6; sbit CC6IR = CC6IC^7; sbit CC6IE = CC6IC^6; sbit CC7IR = CC7IC^7; sbit CC7IE = CC7IC^6; sbit CC8IR = CC8IC^7; sbit CC8IE = CC8IC^6; sbit CC9IR = CC9IC^7; sbit CC9IE = CC9IC^6; sbit CC10IR = CC10IC^7; sbit CC10IE = CC10IC^6; sbit CC11IR = CC11IC^7; sbit CC11IE = CC11IC^6; sbit CC12IR = CC12IC^7; sbit CC12IE = CC12IC^6; sbit CC13IR = CC13IC^7; sbit CC13IE = CC13IC^6; sbit CC14IR = CC14IC^7; sbit CC14IE = CC14IC^6; sbit CC15IR = CC15IC^7; sbit CC15IE = CC15IC^6; sbit CC16IR = CC16IC^7; sbit CC16IE = CC16IC^6; sbit CC17IR = CC17IC^7; sbit CC17IE = CC17IC^6; sbit CC18IR = CC18IC^7; sbit CC18IE = CC18IC^6; sbit CC19IR = CC19IC^7; sbit CC19IE = CC19IC^6; sbit CC20IR = CC20IC^7; sbit CC20IE = CC20IC^6; sbit CC21IR = CC21IC^7; sbit CC21IE = CC21IC^6; sbit CC22IR = CC22IC^7; sbit CC22IE = CC22IC^6; sbit CC23IR = CC23IC^7; sbit CC23IE = CC23IC^6; sbit CC24IR = CC24IC^7; sbit CC24IE = CC24IC^6; sbit CC25IR = CC25IC^7; sbit CC25IE = CC25IC^6; sbit CC26IR = CC26IC^7; sbit CC26IE = CC26IC^6; sbit CC27IR = CC27IC^7; sbit CC27IE = CC27IC^6; sbit CC28IR = CC28IC^7; sbit CC28IE = CC28IC^6; sbit CC29IR = CC29IC^7; sbit CC29IE = CC29IC^6; sbit CC30IR = CC30IC^7; sbit CC30IE = CC30IC^6; sbit CC31IR = CC31IC^7; sbit CC31IE = CC31IC^6; sbit ACC0 = CCM0^3; sbit ACC1 = CCM0^7; sbit ACC2 = CCM0^11; sbit ACC3 = CCM0^15; sbit ACC4 = CCM1^3; sbit ACC5 = CCM1^7; sbit ACC6 = CCM1^11; sbit ACC7 = CCM1^15; sbit ACC8 = CCM2^3; sbit ACC9 = CCM2^7; sbit ACC10 = CCM2^11; sbit ACC11 = CCM2^15; sbit ACC12 = CCM3^3; sbit ACC13 = CCM3^7; sbit ACC14 = CCM3^11; sbit ACC15 = CCM3^15; sbit ACC16 = CCM4^3; sbit ACC17 = CCM4^7; sbit ACC18 = CCM4^11; sbit ACC19 = CCM4^15; sbit ACC20 = CCM5^3; sbit ACC21 = CCM5^7; sbit ACC22 = CCM5^11; sbit ACC23 = CCM5^15; sbit ACC24 = CCM6^3; sbit ACC25 = CCM6^7; sbit ACC26 = CCM6^11; sbit ACC27 = CCM6^15; sbit ACC28 = CCM7^3; sbit ACC29 = CCM7^7; sbit ACC30 = CCM7^11; sbit ACC31 = CCM7^15; sbit T0IE = T0IC^6; sbit T0IR = T0IC^7; sbit T0M = T01CON^3; sbit T0R = T01CON^6; sbit T1IE = T1IC^6; sbit T1IR = T1IC^7; sbit T1M = T01CON^11; sbit T1R = T01CON^14; sbit T7IE = T7IC^6; sbit T7IR = T7IC^7; sbit T7M = T78CON^3; sbit T7R = T78CON^6; sbit T8IE = T8IC^6; sbit T8IR = T8IC^7; sbit T8M = T78CON^11; sbit T8R = T78CON^14; sfr CP = 0xFE10; sfr CSP = 0xFE08; sfr DPP0 = 0xFE00; sfr DPP1 = 0xFE02; sfr DPP2 = 0xFE04; sfr DPP3 = 0xFE06; sfr MDC = 0xFF0E; sfr MDH = 0xFE0C; sfr MDL = 0xFE0E; sfr ONES = 0xFF1E; sfr PSW = 0xFF10; sfr SP = 0xFE12; sfr STKOV = 0xFE14; sfr STKUN = 0xFE16; sfr SYSCON = 0xFF12; sfr TFR = 0xFFAC; sfr ZEROS = 0xFF1C; sfr BUSCON0 = 0xFF0C; sfr BUSCON1 = 0xFF14; sfr BUSCON2 = 0xFF16; sfr BUSCON3 = 0xFF18; sfr BUSCON4 = 0xFF1A; sfr ADDRSEL1 = 0xFE18; sfr ADDRSEL2 = 0xFE1A; sfr ADDRSEL3 = 0xFE1C; sfr ADDRSEL4 = 0xFE1E; sbit WRCFG = SYSCON^7; sbit CLKEN = SYSCON^8; sbit BYTDIS = SYSCON^9; sbit ROMEN = SYSCON^10; sbit SGTEN = SYSCON^11; sbit ROMS1 = SYSCON^12; sbit MDRIU = MDC^4; sbit N = PSW^0; sbit C = PSW^1; sbit V = PSW^2; sbit Z = PSW^3; sbit E = PSW^4; sbit MULIP = PSW^5; sbit USR0 = PSW^6; sbit HLDEN = PSW^10; sbit IEN = PSW^11; sbit RWDC0 = BUSCON0^4; sbit MTTC0 = BUSCON0^5; sbit ALECTL0 = BUSCON0^9; sbit BUSACT0 = BUSCON0^10; sbit RDYEN0 = BUSCON0^12; sbit RWDC1 = BUSCON1^4; sbit MTTC1 = BUSCON1^5; sbit ALECTL1 = BUSCON1^9; sbit BUSACT1 = BUSCON1^10; sbit RDYEN1 = BUSCON1^12; sbit CSREN1 = BUSCON1^14; sbit CSWEN1 = BUSCON1^15; sbit RWDC2 = BUSCON2^4; sbit MTTC2 = BUSCON2^5; sbit ALECTL2 = BUSCON2^9; sbit BUSACT2 = BUSCON2^10; sbit RDYEN2 = BUSCON2^12; sbit CSREN2 = BUSCON2^14; sbit CSWEN2 = BUSCON2^15; sbit RWDC3 = BUSCON3^4; sbit MTTC3 = BUSCON3^5; sbit ALECTL3 = BUSCON3^9; sbit BUSACT3 = BUSCON3^10; sbit RDYEN3 = BUSCON3^12; sbit CSREN3 = BUSCON3^14; sbit CSWEN3 = BUSCON3^15; sbit RWDC4 = BUSCON4^4; sbit MTTC4 = BUSCON4^5; sbit ALECTL4 = BUSCON4^9; sbit BUSACT4 = BUSCON4^10; sbit RDYEN4 = BUSCON4^12; sbit CSREN4 = BUSCON4^14; sbit CSWEN4 = BUSCON4^15; sbit ILLBUS = TFR^0; sbit ILLINA = TFR^1; sbit ILLOPA = TFR^2; sbit PRTFLT = TFR^3; sbit UNDOPC = TFR^7; sbit STKUF = TFR^13; sbit STKOF = TFR^14; sbit NMI = TFR^15; sfr EXICON = 0xF1C0; sfr ISNC = 0xF1DE; sbit RTCIE = ISNC^0; sbit RTCIR = ISNC^1; sbit PLLIE = ISNC^2; sbit PLLIR = ISNC^3; sfr PECC0 = 0xFEC0; sfr PECC1 = 0xFEC2; sfr PECC2 = 0xFEC4; sfr PECC3 = 0xFEC6; sfr PECC4 = 0xFEC8; sfr PECC5 = 0xFECA; sfr PECC6 = 0xFECC; sfr PECC7 = 0xFECE; sfr DP0L = 0xF100; sfr DP0H = 0xF102; sfr DP1L = 0xF104; sfr DP1H = 0xF106; sfr DP2 = 0xFFC2; sfr DP3 = 0xFFC6; sfr DP4 = 0xFFCA; sfr DP6 = 0xFFCE; sfr DP7 = 0xFFD2; sfr DP8 = 0xFFD6; sfr P0L = 0xFF00; sfr P0H = 0xFF02; sfr P1L = 0xFF04; sfr P1H = 0xFF06; sfr P2 = 0xFFC0; sfr P3 = 0xFFC4; sfr P4 = 0xFFC8; sfr P5 = 0xFFA2; sfr P6 = 0xFFCC; sfr P7 = 0xFFD0; sfr P8 = 0xFFD4; sfr ODP2 = 0xF1C2; sfr ODP3 = 0xF1C6; sfr ODP6 = 0xF1CE; sfr ODP7 = 0xF1D2; sfr ODP8 = 0xF1D6; sfr RP0H = 0xF108; sfr S0BG = 0xFEB4; sfr S0CON = 0xFFB0; sfr S0EIC = 0xFF70; sfr S0RBUF = 0xFEB2; sfr S0RIC = 0xFF6E; sfr S0TBUF = 0xFEB0; sfr S0TIC = 0xFF6C; sfr S0TBIC = 0xF19C; sbit S0STP = S0CON^3; sbit S0REN = S0CON^4; sbit S0PEN = S0CON^5; sbit S0FEN = S0CON^6; sbit S0OEN = S0CON^7; sbit S0PE = S0CON^8; sbit S0FE = S0CON^9; sbit S0OE = S0CON^10; sbit S0ODD = S0CON^12; sbit S0BRS = S0CON^13; sbit S0LB = S0CON^14; sbit S0R = S0CON^15; sbit S0TIE = S0TIC^6; sbit S0TIR = S0TIC^7; sbit S0TBIE = S0TBIC^6; sbit S0TBIR = S0TBIC^7; sbit S0RIE = S0RIC^6; sbit S0RIR = S0RIC^7; sbit S0EIE = S0EIC^6; sbit S0EIR = S0EIC^7; sfr SSCTIC = 0xFF72; sfr SSCRIC = 0xFF74; sfr SSCEIC = 0xFF76; sfr SSCTB = 0xF0B0; sfr SSCRB = 0xF0B2; sfr SSCBR = 0xF0B4; sfr SSCCON = 0xFFB2; sbit SSCHB = SSCCON^4; sbit SSCPH = SSCCON^5; sbit SSCPO = SSCCON^6; sbit SSCTE = SSCCON^8; sbit SSCTEN = SSCCON^8; sbit SSCRE = SSCCON^9; sbit SSCREN = SSCCON^9; sbit SSCPE = SSCCON^10; sbit SSCPEN = SSCCON^10; sbit SSCBE = SSCCON^11; sbit SSCBEN = SSCCON^11; sbit SSCBSY = SSCCON^12; sbit SSCMS = SSCCON^14; sbit SSCEN = SSCCON^15; sbit SSCTIR = SSCTIC^7; sbit SSCTIE = SSCTIC^6; sbit SSCRIR = SSCRIC^7; sbit SSCRIE = SSCRIC^6; sbit SSCEIR = SSCEIC^7; sbit SSCEIE = SSCEIC^6; sfr CAPREL = 0xFE4A; sfr CRIC = 0xFF6A; sfr T2 = 0xFE40; sfr T2CON = 0xFF40; sfr T2IC = 0xFF60; sfr T3 = 0xFE42; sfr T3CON = 0xFF42; sfr T3IC = 0xFF62; sfr T4 = 0xFE44; sfr T4CON = 0xFF44; sfr T4IC = 0xFF64; sfr T5 = 0xFE46; sfr T5CON = 0xFF46; sfr T5IC = 0xFF66; sfr T6 = 0xFE48; sfr T6CON = 0xFF48; sfr T6IC = 0xFF68; sfr WDT = 0xFEAE; sfr WDTCON = 0xFFAE; sbit CRIE = CRIC^6; sbit CRIR = CRIC^7; sbit T2R = T2CON^6; sbit T2UD = T2CON^7; sbit T2UDE = T2CON^8; sbit T2IE = T2IC^6; sbit T2IR = T2IC^7; sbit T3R = T3CON^6; sbit T3UD = T3CON^7; sbit T3UDE = T3CON^8; sbit T3OE = T3CON^9; sbit T3OTL = T3CON^10; sbit T3IE = T3IC^6; sbit T3IR = T3IC^7; sbit T4R = T4CON^6; sbit T4UD = T4CON^7; sbit T4UDE = T4CON^8; sbit T4IE = T4IC^6; sbit T4IR = T4IC^7; sbit T5R = T5CON^6; sbit T5UD = T5CON^7; sbit T5UDE = T5CON^8; sbit T5CLR = T5CON^14; sbit T5SC = T5CON^15; sbit T5IE = T5IC^6; sbit T5IR = T5IC^7; sbit T6R = T6CON^6; sbit T6UD = T6CON^7; sbit T6UDE = T6CON^8; sbit T6OE = T6CON^9; sbit T6OTL = T6CON^10; sbit T6SR = T6CON^15; sbit T6IE = T6IC^6; sbit T6IR = T6IC^7; sbit T0IN = P3^0; sbit T2IN = P3^7; sbit T3IN = P3^6; sbit T4IN = P3^5; sbit T5IN = P5^13; sbit T6IN = P5^12; sbit T2EUD = P5^15; sbit T3EUD = P3^4; sbit T4EUD = P5^14; sbit T5EUD = P5^11; sbit T6EUD = P5^10; sbit T3OUT = P3^3; sbit CAPIN = P3^2; sbit T6OUT = P3^1; sbit WDTIN = WDTCON^0; sbit WDTR = WDTCON^1; sfr PWMCON0 = 0xFF30; sfr PWMCON1 = 0xFF32; sfr PW0 = 0xFE30; sfr PW1 = 0xFE32; sfr PW2 = 0xFE34; sfr PW3 = 0xFE36; sfr PWMIC = 0xF17E; sfr PT0 = 0xF030; sfr PT1 = 0xF032; sfr PT2 = 0xF034; sfr PT3 = 0xF036; sfr PP0 = 0xF038; sfr PP1 = 0xF03A; sfr PP2 = 0xF03C; sfr PP3 = 0xF03E; sbit PTR0 = PWMCON0^0; sbit PTR1 = PWMCON0^1; sbit PTR2 = PWMCON0^2; sbit PTR3 = PWMCON0^3; sbit PTI0 = PWMCON0^4; sbit PTI1 = PWMCON0^5; sbit PTI2 = PWMCON0^6; sbit PTI3 = PWMCON0^7; sbit PIE0 = PWMCON0^8; sbit PIE1 = PWMCON0^9; sbit PIE2 = PWMCON0^10; sbit PIE3 = PWMCON0^11; sbit PIR0 = PWMCON0^12; sbit PIR1 = PWMCON0^13; sbit PIR2 = PWMCON0^14; sbit PIR3 = PWMCON0^15; sbit PEN0 = PWMCON1^0; sbit PEN1 = PWMCON1^1; sbit PEN2 = PWMCON1^2; sbit PEN3 = PWMCON1^3; sbit PM0 = PWMCON1^4; sbit PM1 = PWMCON1^5; sbit PM2 = PWMCON1^6; sbit PM3 = PWMCON1^7; sbit PB01 = PWMCON1^12; sbit PS2 = PWMCON1^14; sbit PS3 = PWMCON1^15; sbit PWMIR = PWMIC^7; sbit PWMIE = PWMIC^6; sfr XP0IC = 0xF186; sfr XP1IC = 0xF18E; sfr XP2IC = 0xF196; sfr XP3IC = 0xF19E; sbit XP0IR = XP0IC^7; sbit XP0IE = XP0IC^6; sbit XP1IR = XP1IC^7; sbit XP1IE = XP1IC^6; sbit XP2IR = XP2IC^7; sbit XP2IE = XP2IC^6; sbit XP3IR = XP3IC^7; sbit XP3IE = XP3IC^6; #line 6 "usr.h" #line 1 "C:\C166\INC\ABSACC.H" #line 10 "C:\C166\INC\ABSACC.H" #line 13 "C:\C166\INC\ABSACC.H" #line 7 "usr.h" #line 1 "C:\C166\INC\STDARG.H" #line 10 "C:\C166\INC\STDARG.H" #line 8 "usr.h" #line 8 "usr.h" #line 1 "C:\C166\INC\STDLIB.H" #line 10 "C:\C166\INC\STDLIB.H" #line 12 "C:\C166\INC\STDLIB.H" #line 14 "C:\C166\INC\STDLIB.H" #line 17 "C:\C166\INC\STDLIB.H" #line 19 "C:\C166\INC\STDLIB.H" #line 22 "C:\C166\INC\STDLIB.H" #line 24 "C:\C166\INC\STDLIB.H" #line 26 "C:\C166\INC\STDLIB.H" extern int abs (int val); extern long labs (long val); extern double atof (void *s1); extern long atol (void *s1); extern int atoi (void *s1); extern int rand (void); extern void srand (unsigned int); #line 38 "C:\C166\INC\STDLIB.H" #line 44 "C:\C166\INC\STDLIB.H" extern void far *malloc (size_t size); extern void free (void far *p); extern void init_mempool (void far *p, size_t size); extern void far *realloc (void far *p, size_t size); extern void far *calloc (size_t size, size_t len); extern void xhuge *xmalloc (unsigned long size); extern void xhuge *xcalloc (unsigned long size, unsigned long len); extern void xhuge *xrealloc (void xhuge *p, unsigned long size); extern void xinit_mempool (void xhuge *p, unsigned long size); extern void xfree (void xhuge *p); #line 9 "usr.h" #line 1 "C:\C166\INC\STDIO.H" #line 10 "C:\C166\INC\STDIO.H" #line 10 "usr.h" #line 10 "usr.h" #line 1 "C:\C166\INC\STRING.H" #line 10 "C:\C166\INC\STRING.H" #line 13 "C:\C166\INC\STRING.H" #line 15 "C:\C166\INC\STRING.H" #line 17 "C:\C166\INC\STRING.H" extern char *strcat (char *s1, char *s2); extern char *strncat (char *s1, char *s2, unsigned int n); extern int strcmp (char *s1, char *s2); extern int strncmp (char *s1, char *s2, unsigned int n); extern char *strcpy (char *s1, char *s2); extern char *strncpy (char *s1, char *s2, unsigned int n); extern size_t strlen (char *); extern char *strchr (char *s, char c); extern int strpos (char *s, char c); extern char *strrchr (char *s, char c); extern int strrpos (char *s, char c); extern int strspn (char *s, char *set); extern int strcspn (char *s, char *set); extern char *strpbrk (char *s, char *set); extern char *strrpbrk(char *s, char *set); extern int memcmp (void *s1, void *s2, unsigned int n); extern void *memcpy (void *s1, void *s2, unsigned int n); extern void *memchr (void *s, char val, unsigned int n); extern void *memccpy (void *s1, void *s2, char val, unsigned int n); extern void *memmove (void *s1, void *s2, unsigned int n); extern void *memset (void *s, char val, unsigned int n); extern char far *fstrcat (char far *s1, char far *s2); extern char far *fstrncat (char far *s1, char far *s2, unsigned int n); extern int fstrcmp (char far *s1, char far *s2); extern int fstrncmp (char far *s1, char far *s2, unsigned int n); extern char *fstrcpy (char far *s1, char far *s2); extern char *fstrncpy (char far *s1, char far *s2, unsigned int n); extern size_t fstrlen (char far *); extern char far *fstrchr (const char far *s, char c); extern char far *fstrrchr (const char far *s, char c); extern int fstrpos (const char far *s, char c); extern int fstrrpos (const char far *s, char c); extern int fstrspn (char far *s, char far *set); extern int fstrcspn (char far *s, char far *set); extern char *fstrpbrk (char far *s, char far *set); extern char *fstrrpbrk (char far *s, char far *set); extern int fmemcmp (void far *s1, void far *s2, unsigned int n); extern void far *fmemcpy (void far *s1, void far *s2, unsigned int n); extern void far *fmemchr (void far *s, char val, unsigned int n); extern void far *fmemccpy (void far *s1, void far *s2, char val, unsigned int n); extern void far *fmemmove (void far *s1, void far *s2, unsigned int n); extern void far *fmemset (void far *s, char val, unsigned int n); extern int xmemcmp (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemcpy (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemchr (void xhuge *s, char val, unsigned long n); extern void xhuge *xmemccpy (void xhuge *s1, void xhuge *s2, char val, unsigned long n); extern void xhuge *xmemmove (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemset (void xhuge *s, char val, unsigned long n); #line 11 "usr.h" #line 1 "C:\C166\INC\MATH.H" extern int abs (int val); extern long labs (long val); extern double fabs (double val); extern double sqrt (double val); extern double exp (double val); extern double log (double val); extern double log10 (double val); extern double sin (double val); extern double cos (double val); extern double tan (double val); extern double asin (double val); extern double acos (double val); extern double atan (double val); extern double sinh (double val); extern double cosh (double val); extern double tanh (double val); extern double atan2 (double y, double x); extern double ceil (double val); extern double floor (double val); extern double modf (double val, double *n); extern double pow (double x, double y); extern unsigned int _chkfloat_ (float x); extern unsigned int _chkdouble_ (double x); #line 12 "usr.h" #line 1 "global.h" #line 5 "global.h" #line 204 "global.h" #line 13 "usr.h" #line 1 "int.h" #line 1 "C:\C166\INC\REG167.H" sfr ADCIC = 0xFF98; sfr ADCON = 0xFFA0; sfr ADDAT = 0xFEA0; sfr ADEIC = 0xFF9A; sfr ADDAT2 = 0xF0A0; sbit ADST = ADCON^7; sbit ADBSY = ADCON^8; sbit ADWR = ADCON^9; sbit ADCIN = ADCON^10; sbit ADCRQ = ADCON^11; sbit ADCIE = ADCIC^6; sbit ADCIR = ADCIC^7; sbit ADEIE = ADEIC^6; sbit ADEIR = ADEIC^7; sfr CC0 = 0xFE80; sfr CC0IC = 0xFF78; sfr CC1 = 0xFE82; sfr CC1IC = 0xFF7A; sfr CC2 = 0xFE84; sfr CC2IC = 0xFF7C; sfr CC3 = 0xFE86; sfr CC3IC = 0xFF7E; sfr CC4 = 0xFE88; sfr CC4IC = 0xFF80; sfr CC5 = 0xFE8A; sfr CC5IC = 0xFF82; sfr CC6 = 0xFE8C; sfr CC6IC = 0xFF84; sfr CC7 = 0xFE8E; sfr CC7IC = 0xFF86; sfr CC8 = 0xFE90; sfr CC8IC = 0xFF88; sfr CC9 = 0xFE92; sfr CC9IC = 0xFF8A; sfr CC10 = 0xFE94; sfr CC10IC = 0xFF8C; sfr CC11 = 0xFE96; sfr CC11IC = 0xFF8E; sfr CC12 = 0xFE98; sfr CC12IC = 0xFF90; sfr CC13 = 0xFE9A; sfr CC13IC = 0xFF92; sfr CC14 = 0xFE9C; sfr CC14IC = 0xFF94; sfr CC15 = 0xFE9E; sfr CC15IC = 0xFF96; sfr CC16 = 0xFE60; sfr CC16IC = 0xF160; sfr CC17 = 0xFE62; sfr CC17IC = 0xF162; sfr CC18 = 0xFE64; sfr CC18IC = 0xF164; sfr CC19 = 0xFE66; sfr CC19IC = 0xF166; sfr CC20 = 0xFE68; sfr CC20IC = 0xF168; sfr CC21 = 0xFE6A; sfr CC21IC = 0xF16A; sfr CC22 = 0xFE6C; sfr CC22IC = 0xF16C; sfr CC23 = 0xFE6E; sfr CC23IC = 0xF16E; sfr CC24 = 0xFE70; sfr CC24IC = 0xF170; sfr CC25 = 0xFE72; sfr CC25IC = 0xF172; sfr CC26 = 0xFE74; sfr CC26IC = 0xF174; sfr CC27 = 0xFE76; sfr CC27IC = 0xF176; sfr CC28 = 0xFE78; sfr CC28IC = 0xF178; sfr CC29 = 0xFE7A; sfr CC29IC = 0xF184; sfr CC30 = 0xFE7C; sfr CC30IC = 0xF18C; sfr CC31 = 0xFE7E; sfr CC31IC = 0xF194; sfr CCM0 = 0xFF52; sfr CCM1 = 0xFF54; sfr CCM2 = 0xFF56; sfr CCM3 = 0xFF58; sfr CCM4 = 0xFF22; sfr CCM5 = 0xFF24; sfr CCM6 = 0xFF26; sfr CCM7 = 0xFF28; sfr T0 = 0xFE50; sfr T01CON = 0xFF50; sfr T0IC = 0xFF9C; sfr T0REL = 0xFE54; sfr T1 = 0xFE52; sfr T1IC = 0xFF9E; sfr T1REL = 0xFE56; sfr T7 = 0xF050; sfr T78CON = 0xFF20; sfr T7IC = 0xF17A; sfr T7REL = 0xF054; sfr T8 = 0xF052; sfr T8IC = 0xF17C; sfr T8REL = 0xF056; sbit CC0IR = CC0IC^7; sbit CC0IE = CC0IC^6; sbit CC1IR = CC1IC^7; sbit CC1IE = CC1IC^6; sbit CC2IR = CC2IC^7; sbit CC2IE = CC2IC^6; sbit CC3IR = CC3IC^7; sbit CC3IE = CC3IC^6; sbit CC4IR = CC4IC^7; sbit CC4IE = CC4IC^6; sbit CC5IR = CC5IC^7; sbit CC5IE = CC5IC^6; sbit CC6IR = CC6IC^7; sbit CC6IE = CC6IC^6; sbit CC7IR = CC7IC^7; sbit CC7IE = CC7IC^6; sbit CC8IR = CC8IC^7; sbit CC8IE = CC8IC^6; sbit CC9IR = CC9IC^7; sbit CC9IE = CC9IC^6; sbit CC10IR = CC10IC^7; sbit CC10IE = CC10IC^6; sbit CC11IR = CC11IC^7; sbit CC11IE = CC11IC^6; sbit CC12IR = CC12IC^7; sbit CC12IE = CC12IC^6; sbit CC13IR = CC13IC^7; sbit CC13IE = CC13IC^6; sbit CC14IR = CC14IC^7; sbit CC14IE = CC14IC^6; sbit CC15IR = CC15IC^7; sbit CC15IE = CC15IC^6; sbit CC16IR = CC16IC^7; sbit CC16IE = CC16IC^6; sbit CC17IR = CC17IC^7; sbit CC17IE = CC17IC^6; sbit CC18IR = CC18IC^7; sbit CC18IE = CC18IC^6; sbit CC19IR = CC19IC^7; sbit CC19IE = CC19IC^6; sbit CC20IR = CC20IC^7; sbit CC20IE = CC20IC^6; sbit CC21IR = CC21IC^7; sbit CC21IE = CC21IC^6; sbit CC22IR = CC22IC^7; sbit CC22IE = CC22IC^6; sbit CC23IR = CC23IC^7; sbit CC23IE = CC23IC^6; sbit CC24IR = CC24IC^7; sbit CC24IE = CC24IC^6; sbit CC25IR = CC25IC^7; sbit CC25IE = CC25IC^6; sbit CC26IR = CC26IC^7; sbit CC26IE = CC26IC^6; sbit CC27IR = CC27IC^7; sbit CC27IE = CC27IC^6; sbit CC28IR = CC28IC^7; sbit CC28IE = CC28IC^6; sbit CC29IR = CC29IC^7; sbit CC29IE = CC29IC^6; sbit CC30IR = CC30IC^7; sbit CC30IE = CC30IC^6; sbit CC31IR = CC31IC^7; sbit CC31IE = CC31IC^6; sbit ACC0 = CCM0^3; sbit ACC1 = CCM0^7; sbit ACC2 = CCM0^11; sbit ACC3 = CCM0^15; sbit ACC4 = CCM1^3; sbit ACC5 = CCM1^7; sbit ACC6 = CCM1^11; sbit ACC7 = CCM1^15; sbit ACC8 = CCM2^3; sbit ACC9 = CCM2^7; sbit ACC10 = CCM2^11; sbit ACC11 = CCM2^15; sbit ACC12 = CCM3^3; sbit ACC13 = CCM3^7; sbit ACC14 = CCM3^11; sbit ACC15 = CCM3^15; sbit ACC16 = CCM4^3; sbit ACC17 = CCM4^7; sbit ACC18 = CCM4^11; sbit ACC19 = CCM4^15; sbit ACC20 = CCM5^3; sbit ACC21 = CCM5^7; sbit ACC22 = CCM5^11; sbit ACC23 = CCM5^15; sbit ACC24 = CCM6^3; sbit ACC25 = CCM6^7; sbit ACC26 = CCM6^11; sbit ACC27 = CCM6^15; sbit ACC28 = CCM7^3; sbit ACC29 = CCM7^7; sbit ACC30 = CCM7^11; sbit ACC31 = CCM7^15; sbit T0IE = T0IC^6; sbit T0IR = T0IC^7; sbit T0M = T01CON^3; sbit T0R = T01CON^6; sbit T1IE = T1IC^6; sbit T1IR = T1IC^7; sbit T1M = T01CON^11; sbit T1R = T01CON^14; sbit T7IE = T7IC^6; sbit T7IR = T7IC^7; sbit T7M = T78CON^3; sbit T7R = T78CON^6; sbit T8IE = T8IC^6; sbit T8IR = T8IC^7; sbit T8M = T78CON^11; sbit T8R = T78CON^14; sfr CP = 0xFE10; sfr CSP = 0xFE08; sfr DPP0 = 0xFE00; sfr DPP1 = 0xFE02; sfr DPP2 = 0xFE04; sfr DPP3 = 0xFE06; sfr MDC = 0xFF0E; sfr MDH = 0xFE0C; sfr MDL = 0xFE0E; sfr ONES = 0xFF1E; sfr PSW = 0xFF10; sfr SP = 0xFE12; sfr STKOV = 0xFE14; sfr STKUN = 0xFE16; sfr SYSCON = 0xFF12; sfr TFR = 0xFFAC; sfr ZEROS = 0xFF1C; sfr BUSCON0 = 0xFF0C; sfr BUSCON1 = 0xFF14; sfr BUSCON2 = 0xFF16; sfr BUSCON3 = 0xFF18; sfr BUSCON4 = 0xFF1A; sfr ADDRSEL1 = 0xFE18; sfr ADDRSEL2 = 0xFE1A; sfr ADDRSEL3 = 0xFE1C; sfr ADDRSEL4 = 0xFE1E; sbit WRCFG = SYSCON^7; sbit CLKEN = SYSCON^8; sbit BYTDIS = SYSCON^9; sbit ROMEN = SYSCON^10; sbit SGTEN = SYSCON^11; sbit ROMS1 = SYSCON^12; sbit MDRIU = MDC^4; sbit N = PSW^0; sbit C = PSW^1; sbit V = PSW^2; sbit Z = PSW^3; sbit E = PSW^4; sbit MULIP = PSW^5; sbit USR0 = PSW^6; sbit HLDEN = PSW^10; sbit IEN = PSW^11; sbit RWDC0 = BUSCON0^4; sbit MTTC0 = BUSCON0^5; sbit ALECTL0 = BUSCON0^9; sbit BUSACT0 = BUSCON0^10; sbit RDYEN0 = BUSCON0^12; sbit RWDC1 = BUSCON1^4; sbit MTTC1 = BUSCON1^5; sbit ALECTL1 = BUSCON1^9; sbit BUSACT1 = BUSCON1^10; sbit RDYEN1 = BUSCON1^12; sbit CSREN1 = BUSCON1^14; sbit CSWEN1 = BUSCON1^15; sbit RWDC2 = BUSCON2^4; sbit MTTC2 = BUSCON2^5; sbit ALECTL2 = BUSCON2^9; sbit BUSACT2 = BUSCON2^10; sbit RDYEN2 = BUSCON2^12; sbit CSREN2 = BUSCON2^14; sbit CSWEN2 = BUSCON2^15; sbit RWDC3 = BUSCON3^4; sbit MTTC3 = BUSCON3^5; sbit ALECTL3 = BUSCON3^9; sbit BUSACT3 = BUSCON3^10; sbit RDYEN3 = BUSCON3^12; sbit CSREN3 = BUSCON3^14; sbit CSWEN3 = BUSCON3^15; sbit RWDC4 = BUSCON4^4; sbit MTTC4 = BUSCON4^5; sbit ALECTL4 = BUSCON4^9; sbit BUSACT4 = BUSCON4^10; sbit RDYEN4 = BUSCON4^12; sbit CSREN4 = BUSCON4^14; sbit CSWEN4 = BUSCON4^15; sbit ILLBUS = TFR^0; sbit ILLINA = TFR^1; sbit ILLOPA = TFR^2; sbit PRTFLT = TFR^3; sbit UNDOPC = TFR^7; sbit STKUF = TFR^13; sbit STKOF = TFR^14; sbit NMI = TFR^15; sfr EXICON = 0xF1C0; sfr ISNC = 0xF1DE; sbit RTCIE = ISNC^0; sbit RTCIR = ISNC^1; sbit PLLIE = ISNC^2; sbit PLLIR = ISNC^3; sfr PECC0 = 0xFEC0; sfr PECC1 = 0xFEC2; sfr PECC2 = 0xFEC4; sfr PECC3 = 0xFEC6; sfr PECC4 = 0xFEC8; sfr PECC5 = 0xFECA; sfr PECC6 = 0xFECC; sfr PECC7 = 0xFECE; sfr DP0L = 0xF100; sfr DP0H = 0xF102; sfr DP1L = 0xF104; sfr DP1H = 0xF106; sfr DP2 = 0xFFC2; sfr DP3 = 0xFFC6; sfr DP4 = 0xFFCA; sfr DP6 = 0xFFCE; sfr DP7 = 0xFFD2; sfr DP8 = 0xFFD6; sfr P0L = 0xFF00; sfr P0H = 0xFF02; sfr P1L = 0xFF04; sfr P1H = 0xFF06; sfr P2 = 0xFFC0; sfr P3 = 0xFFC4; sfr P4 = 0xFFC8; sfr P5 = 0xFFA2; sfr P6 = 0xFFCC; sfr P7 = 0xFFD0; sfr P8 = 0xFFD4; sfr ODP2 = 0xF1C2; sfr ODP3 = 0xF1C6; sfr ODP6 = 0xF1CE; sfr ODP7 = 0xF1D2; sfr ODP8 = 0xF1D6; sfr RP0H = 0xF108; sfr S0BG = 0xFEB4; sfr S0CON = 0xFFB0; sfr S0EIC = 0xFF70; sfr S0RBUF = 0xFEB2; sfr S0RIC = 0xFF6E; sfr S0TBUF = 0xFEB0; sfr S0TIC = 0xFF6C; sfr S0TBIC = 0xF19C; sbit S0STP = S0CON^3; sbit S0REN = S0CON^4; sbit S0PEN = S0CON^5; sbit S0FEN = S0CON^6; sbit S0OEN = S0CON^7; sbit S0PE = S0CON^8; sbit S0FE = S0CON^9; sbit S0OE = S0CON^10; sbit S0ODD = S0CON^12; sbit S0BRS = S0CON^13; sbit S0LB = S0CON^14; sbit S0R = S0CON^15; sbit S0TIE = S0TIC^6; sbit S0TIR = S0TIC^7; sbit S0TBIE = S0TBIC^6; sbit S0TBIR = S0TBIC^7; sbit S0RIE = S0RIC^6; sbit S0RIR = S0RIC^7; sbit S0EIE = S0EIC^6; sbit S0EIR = S0EIC^7; sfr SSCTIC = 0xFF72; sfr SSCRIC = 0xFF74; sfr SSCEIC = 0xFF76; sfr SSCTB = 0xF0B0; sfr SSCRB = 0xF0B2; sfr SSCBR = 0xF0B4; sfr SSCCON = 0xFFB2; sbit SSCHB = SSCCON^4; sbit SSCPH = SSCCON^5; sbit SSCPO = SSCCON^6; sbit SSCTE = SSCCON^8; sbit SSCTEN = SSCCON^8; sbit SSCRE = SSCCON^9; sbit SSCREN = SSCCON^9; sbit SSCPE = SSCCON^10; sbit SSCPEN = SSCCON^10; sbit SSCBE = SSCCON^11; sbit SSCBEN = SSCCON^11; sbit SSCBSY = SSCCON^12; sbit SSCMS = SSCCON^14; sbit SSCEN = SSCCON^15; sbit SSCTIR = SSCTIC^7; sbit SSCTIE = SSCTIC^6; sbit SSCRIR = SSCRIC^7; sbit SSCRIE = SSCRIC^6; sbit SSCEIR = SSCEIC^7; sbit SSCEIE = SSCEIC^6; sfr CAPREL = 0xFE4A; sfr CRIC = 0xFF6A; sfr T2 = 0xFE40; sfr T2CON = 0xFF40; sfr T2IC = 0xFF60; sfr T3 = 0xFE42; sfr T3CON = 0xFF42; sfr T3IC = 0xFF62; sfr T4 = 0xFE44; sfr T4CON = 0xFF44; sfr T4IC = 0xFF64; sfr T5 = 0xFE46; sfr T5CON = 0xFF46; sfr T5IC = 0xFF66; sfr T6 = 0xFE48; sfr T6CON = 0xFF48; sfr T6IC = 0xFF68; sfr WDT = 0xFEAE; sfr WDTCON = 0xFFAE; sbit CRIE = CRIC^6; sbit CRIR = CRIC^7; sbit T2R = T2CON^6; sbit T2UD = T2CON^7; sbit T2UDE = T2CON^8; sbit T2IE = T2IC^6; sbit T2IR = T2IC^7; sbit T3R = T3CON^6; sbit T3UD = T3CON^7; sbit T3UDE = T3CON^8; sbit T3OE = T3CON^9; sbit T3OTL = T3CON^10; sbit T3IE = T3IC^6; sbit T3IR = T3IC^7; sbit T4R = T4CON^6; sbit T4UD = T4CON^7; sbit T4UDE = T4CON^8; sbit T4IE = T4IC^6; sbit T4IR = T4IC^7; sbit T5R = T5CON^6; sbit T5UD = T5CON^7; sbit T5UDE = T5CON^8; sbit T5CLR = T5CON^14; sbit T5SC = T5CON^15; sbit T5IE = T5IC^6; sbit T5IR = T5IC^7; sbit T6R = T6CON^6; sbit T6UD = T6CON^7; sbit T6UDE = T6CON^8; sbit T6OE = T6CON^9; sbit T6OTL = T6CON^10; sbit T6SR = T6CON^15; sbit T6IE = T6IC^6; sbit T6IR = T6IC^7; sbit T0IN = P3^0; sbit T2IN = P3^7; sbit T3IN = P3^6; sbit T4IN = P3^5; sbit T5IN = P5^13; sbit T6IN = P5^12; sbit T2EUD = P5^15; sbit T3EUD = P3^4; sbit T4EUD = P5^14; sbit T5EUD = P5^11; sbit T6EUD = P5^10; sbit T3OUT = P3^3; sbit CAPIN = P3^2; sbit T6OUT = P3^1; sbit WDTIN = WDTCON^0; sbit WDTR = WDTCON^1; sfr PWMCON0 = 0xFF30; sfr PWMCON1 = 0xFF32; sfr PW0 = 0xFE30; sfr PW1 = 0xFE32; sfr PW2 = 0xFE34; sfr PW3 = 0xFE36; sfr PWMIC = 0xF17E; sfr PT0 = 0xF030; sfr PT1 = 0xF032; sfr PT2 = 0xF034; sfr PT3 = 0xF036; sfr PP0 = 0xF038; sfr PP1 = 0xF03A; sfr PP2 = 0xF03C; sfr PP3 = 0xF03E; sbit PTR0 = PWMCON0^0; sbit PTR1 = PWMCON0^1; sbit PTR2 = PWMCON0^2; sbit PTR3 = PWMCON0^3; sbit PTI0 = PWMCON0^4; sbit PTI1 = PWMCON0^5; sbit PTI2 = PWMCON0^6; sbit PTI3 = PWMCON0^7; sbit PIE0 = PWMCON0^8; sbit PIE1 = PWMCON0^9; sbit PIE2 = PWMCON0^10; sbit PIE3 = PWMCON0^11; sbit PIR0 = PWMCON0^12; sbit PIR1 = PWMCON0^13; sbit PIR2 = PWMCON0^14; sbit PIR3 = PWMCON0^15; sbit PEN0 = PWMCON1^0; sbit PEN1 = PWMCON1^1; sbit PEN2 = PWMCON1^2; sbit PEN3 = PWMCON1^3; sbit PM0 = PWMCON1^4; sbit PM1 = PWMCON1^5; sbit PM2 = PWMCON1^6; sbit PM3 = PWMCON1^7; sbit PB01 = PWMCON1^12; sbit PS2 = PWMCON1^14; sbit PS3 = PWMCON1^15; sbit PWMIR = PWMIC^7; sbit PWMIE = PWMIC^6; sfr XP0IC = 0xF186; sfr XP1IC = 0xF18E; sfr XP2IC = 0xF196; sfr XP3IC = 0xF19E; sbit XP0IR = XP0IC^7; sbit XP0IE = XP0IC^6; sbit XP1IR = XP1IC^7; sbit XP1IE = XP1IC^6; sbit XP2IR = XP2IC^7; sbit XP2IE = XP2IC^6; sbit XP3IR = XP3IC^7; sbit XP3IE = XP3IC^6; #line 6 "int.h" #line 1 "C:\C166\INC\ABSACC.H" #line 10 "C:\C166\INC\ABSACC.H" #line 13 "C:\C166\INC\ABSACC.H" #line 7 "int.h" #line 1 "C:\C166\INC\STDARG.H" #line 10 "C:\C166\INC\STDARG.H" #line 8 "int.h" #line 8 "int.h" #line 1 "C:\C166\INC\STDLIB.H" #line 10 "C:\C166\INC\STDLIB.H" #line 12 "C:\C166\INC\STDLIB.H" #line 14 "C:\C166\INC\STDLIB.H" #line 17 "C:\C166\INC\STDLIB.H" #line 19 "C:\C166\INC\STDLIB.H" #line 22 "C:\C166\INC\STDLIB.H" #line 24 "C:\C166\INC\STDLIB.H" #line 26 "C:\C166\INC\STDLIB.H" extern int abs (int val); extern long labs (long val); extern double atof (void *s1); extern long atol (void *s1); extern int atoi (void *s1); extern int rand (void); extern void srand (unsigned int); #line 38 "C:\C166\INC\STDLIB.H" #line 44 "C:\C166\INC\STDLIB.H" extern void far *malloc (size_t size); extern void free (void far *p); extern void init_mempool (void far *p, size_t size); extern void far *realloc (void far *p, size_t size); extern void far *calloc (size_t size, size_t len); extern void xhuge *xmalloc (unsigned long size); extern void xhuge *xcalloc (unsigned long size, unsigned long len); extern void xhuge *xrealloc (void xhuge *p, unsigned long size); extern void xinit_mempool (void xhuge *p, unsigned long size); extern void xfree (void xhuge *p); #line 9 "int.h" #line 1 "C:\C166\INC\STDIO.H" #line 10 "C:\C166\INC\STDIO.H" #line 10 "int.h" #line 10 "int.h" #line 1 "C:\C166\INC\STRING.H" #line 10 "C:\C166\INC\STRING.H" #line 13 "C:\C166\INC\STRING.H" #line 15 "C:\C166\INC\STRING.H" #line 17 "C:\C166\INC\STRING.H" extern char *strcat (char *s1, char *s2); extern char *strncat (char *s1, char *s2, unsigned int n); extern int strcmp (char *s1, char *s2); extern int strncmp (char *s1, char *s2, unsigned int n); extern char *strcpy (char *s1, char *s2); extern char *strncpy (char *s1, char *s2, unsigned int n); extern size_t strlen (char *); extern char *strchr (char *s, char c); extern int strpos (char *s, char c); extern char *strrchr (char *s, char c); extern int strrpos (char *s, char c); extern int strspn (char *s, char *set); extern int strcspn (char *s, char *set); extern char *strpbrk (char *s, char *set); extern char *strrpbrk(char *s, char *set); extern int memcmp (void *s1, void *s2, unsigned int n); extern void *memcpy (void *s1, void *s2, unsigned int n); extern void *memchr (void *s, char val, unsigned int n); extern void *memccpy (void *s1, void *s2, char val, unsigned int n); extern void *memmove (void *s1, void *s2, unsigned int n); extern void *memset (void *s, char val, unsigned int n); extern char far *fstrcat (char far *s1, char far *s2); extern char far *fstrncat (char far *s1, char far *s2, unsigned int n); extern int fstrcmp (char far *s1, char far *s2); extern int fstrncmp (char far *s1, char far *s2, unsigned int n); extern char *fstrcpy (char far *s1, char far *s2); extern char *fstrncpy (char far *s1, char far *s2, unsigned int n); extern size_t fstrlen (char far *); extern char far *fstrchr (const char far *s, char c); extern char far *fstrrchr (const char far *s, char c); extern int fstrpos (const char far *s, char c); extern int fstrrpos (const char far *s, char c); extern int fstrspn (char far *s, char far *set); extern int fstrcspn (char far *s, char far *set); extern char *fstrpbrk (char far *s, char far *set); extern char *fstrrpbrk (char far *s, char far *set); extern int fmemcmp (void far *s1, void far *s2, unsigned int n); extern void far *fmemcpy (void far *s1, void far *s2, unsigned int n); extern void far *fmemchr (void far *s, char val, unsigned int n); extern void far *fmemccpy (void far *s1, void far *s2, char val, unsigned int n); extern void far *fmemmove (void far *s1, void far *s2, unsigned int n); extern void far *fmemset (void far *s, char val, unsigned int n); extern int xmemcmp (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemcpy (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemchr (void xhuge *s, char val, unsigned long n); extern void xhuge *xmemccpy (void xhuge *s1, void xhuge *s2, char val, unsigned long n); extern void xhuge *xmemmove (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemset (void xhuge *s, char val, unsigned long n); #line 11 "int.h" #line 1 "C:\C166\INC\MATH.H" extern int abs (int val); extern long labs (long val); extern double fabs (double val); extern double sqrt (double val); extern double exp (double val); extern double log (double val); extern double log10 (double val); extern double sin (double val); extern double cos (double val); extern double tan (double val); extern double asin (double val); extern double acos (double val); extern double atan (double val); extern double sinh (double val); extern double cosh (double val); extern double tanh (double val); extern double atan2 (double y, double x); extern double ceil (double val); extern double floor (double val); extern double modf (double val, double *n); extern double pow (double x, double y); extern unsigned int _chkfloat_ (float x); extern unsigned int _chkdouble_ (double x); #line 12 "int.h" #line 1 "global.h" #line 5 "global.h" #line 204 "global.h" #line 13 "int.h" #line 1 "util.h" #line 3 "util.h" #line 120 "util.h" #line 14 "int.h" #line 1 "astro.h" #line 3 "astro.h" #line 171 "astro.h" #line 15 "int.h" extern void initTimerInt( void ); extern void startTimerInt( void ); extern void stopTimerInt( void ); extern void initEncoderInts( void ); extern void startEncoderIntsHo( void ); extern void startEncoderIntsVe( void ); extern void stopEncoderInts( void ); extern unsigned char bdata ENC_FLAGS; extern bit ENCHO_USE; extern bit ENCVE_USE; extern bit ENCHO_COR; extern bit ENCVE_COR; extern bit ENCHO_DIR; extern bit ENCVE_DIR; extern bit ENCHO_CORUSE; extern bit ENCVE_CORUSE; extern unsigned char bdata MOT_FLAGS; extern bit MOTHO_RUN; extern bit MOTVE_RUN; extern bit MOTFR_USE; extern bit MOTHO_DIR; extern bit MOTVE_DIR; extern bit MOTFR_DIR; extern bit MOT_GOTO; extern bit MOT_CORRECTION; extern volatile int idata YEAR; extern volatile int idata MONTH; extern volatile int idata DAY; extern volatile int idata HOUR; extern volatile int idata MINUTE; extern volatile int idata SECOND; extern volatile int idata MSECOND; extern volatile int idata TIMER10; extern volatile int idata THISMDAYS; extern volatile int idata CFG_ENC_HO; extern volatile int idata CFG_ENC_VE; extern volatile int idata ARC10PERENCHO; extern volatile int idata ARC10PERENCVE; extern volatile long idata ENC_ARC10_HO; extern volatile long idata ENC_ARC10_VE; extern volatile long idata HSTEPSHO090; extern volatile long idata HSTEPSHO180; extern volatile long idata HSTEPSHO270; extern volatile long idata HSTEPSHO359; extern volatile long idata CUR_HSTEPS_HO; extern volatile long idata CUR_HSTEPS_VE; extern volatile long idata TRG_HSTEPS_HO; extern volatile long idata TRG_HSTEPS_VE; extern volatile long idata CUR_ARC10_HO; extern volatile long idata CUR_ARC10_VE; extern volatile int idata SPEED_HO; extern volatile int idata SPEED_VE; extern volatile int idata SPEED_FR; extern volatile int idata SPEED_HO_CT; extern volatile int idata SPEED_VE_CT; extern volatile int idata SPEED_FR_CT; extern volatile unsigned char idata hsteps[8]; extern volatile int idata HSTEP_HO; extern volatile int idata HSTEP_VE; extern volatile int idata HSTEP_FR; extern volatile double idata CFG_HSTS_HO; extern volatile double idata CFG_HSTS_VE; extern volatile double idata CFG_HSTS_FR; #line 14 "usr.h" #line 1 "util.h" #line 3 "util.h" #line 120 "util.h" #line 15 "usr.h" #line 1 "astro.h" #line 3 "astro.h" #line 171 "astro.h" #line 16 "usr.h" extern int usrGetOnOff( char *txt, int current ); extern int usrGetDateTime( void ); extern int usrGetKoor( int azalt, double defho, double defve ); extern double usrGetDouble( unsigned char row, double defdouble ); extern long usrGetLong( unsigned char row, long deflong ); extern int usrGetInt( unsigned char row, int defint ); extern void printArc10Degrees(unsigned char row, long val ); extern void printDegrees(unsigned char row, double val ); extern void sprintArc10Degrees( char *ptr, long val ); extern void sprintDegrees( char *ptr, double val ); extern void printDouble( unsigned char row, double val ); extern void printLong( unsigned char row, long val ); extern void printDateTime( unsigned char row ); extern int usrGetAck( char *txt ); #line 19 "obj.h" #line 1 "int.h" #line 3 "int.h" #line 400 "int.h" #line 20 "obj.h" #line 1 "scope.h" #line 1 "C:\C166\INC\REG167.H" sfr ADCIC = 0xFF98; sfr ADCON = 0xFFA0; sfr ADDAT = 0xFEA0; sfr ADEIC = 0xFF9A; sfr ADDAT2 = 0xF0A0; sbit ADST = ADCON^7; sbit ADBSY = ADCON^8; sbit ADWR = ADCON^9; sbit ADCIN = ADCON^10; sbit ADCRQ = ADCON^11; sbit ADCIE = ADCIC^6; sbit ADCIR = ADCIC^7; sbit ADEIE = ADEIC^6; sbit ADEIR = ADEIC^7; sfr CC0 = 0xFE80; sfr CC0IC = 0xFF78; sfr CC1 = 0xFE82; sfr CC1IC = 0xFF7A; sfr CC2 = 0xFE84; sfr CC2IC = 0xFF7C; sfr CC3 = 0xFE86; sfr CC3IC = 0xFF7E; sfr CC4 = 0xFE88; sfr CC4IC = 0xFF80; sfr CC5 = 0xFE8A; sfr CC5IC = 0xFF82; sfr CC6 = 0xFE8C; sfr CC6IC = 0xFF84; sfr CC7 = 0xFE8E; sfr CC7IC = 0xFF86; sfr CC8 = 0xFE90; sfr CC8IC = 0xFF88; sfr CC9 = 0xFE92; sfr CC9IC = 0xFF8A; sfr CC10 = 0xFE94; sfr CC10IC = 0xFF8C; sfr CC11 = 0xFE96; sfr CC11IC = 0xFF8E; sfr CC12 = 0xFE98; sfr CC12IC = 0xFF90; sfr CC13 = 0xFE9A; sfr CC13IC = 0xFF92; sfr CC14 = 0xFE9C; sfr CC14IC = 0xFF94; sfr CC15 = 0xFE9E; sfr CC15IC = 0xFF96; sfr CC16 = 0xFE60; sfr CC16IC = 0xF160; sfr CC17 = 0xFE62; sfr CC17IC = 0xF162; sfr CC18 = 0xFE64; sfr CC18IC = 0xF164; sfr CC19 = 0xFE66; sfr CC19IC = 0xF166; sfr CC20 = 0xFE68; sfr CC20IC = 0xF168; sfr CC21 = 0xFE6A; sfr CC21IC = 0xF16A; sfr CC22 = 0xFE6C; sfr CC22IC = 0xF16C; sfr CC23 = 0xFE6E; sfr CC23IC = 0xF16E; sfr CC24 = 0xFE70; sfr CC24IC = 0xF170; sfr CC25 = 0xFE72; sfr CC25IC = 0xF172; sfr CC26 = 0xFE74; sfr CC26IC = 0xF174; sfr CC27 = 0xFE76; sfr CC27IC = 0xF176; sfr CC28 = 0xFE78; sfr CC28IC = 0xF178; sfr CC29 = 0xFE7A; sfr CC29IC = 0xF184; sfr CC30 = 0xFE7C; sfr CC30IC = 0xF18C; sfr CC31 = 0xFE7E; sfr CC31IC = 0xF194; sfr CCM0 = 0xFF52; sfr CCM1 = 0xFF54; sfr CCM2 = 0xFF56; sfr CCM3 = 0xFF58; sfr CCM4 = 0xFF22; sfr CCM5 = 0xFF24; sfr CCM6 = 0xFF26; sfr CCM7 = 0xFF28; sfr T0 = 0xFE50; sfr T01CON = 0xFF50; sfr T0IC = 0xFF9C; sfr T0REL = 0xFE54; sfr T1 = 0xFE52; sfr T1IC = 0xFF9E; sfr T1REL = 0xFE56; sfr T7 = 0xF050; sfr T78CON = 0xFF20; sfr T7IC = 0xF17A; sfr T7REL = 0xF054; sfr T8 = 0xF052; sfr T8IC = 0xF17C; sfr T8REL = 0xF056; sbit CC0IR = CC0IC^7; sbit CC0IE = CC0IC^6; sbit CC1IR = CC1IC^7; sbit CC1IE = CC1IC^6; sbit CC2IR = CC2IC^7; sbit CC2IE = CC2IC^6; sbit CC3IR = CC3IC^7; sbit CC3IE = CC3IC^6; sbit CC4IR = CC4IC^7; sbit CC4IE = CC4IC^6; sbit CC5IR = CC5IC^7; sbit CC5IE = CC5IC^6; sbit CC6IR = CC6IC^7; sbit CC6IE = CC6IC^6; sbit CC7IR = CC7IC^7; sbit CC7IE = CC7IC^6; sbit CC8IR = CC8IC^7; sbit CC8IE = CC8IC^6; sbit CC9IR = CC9IC^7; sbit CC9IE = CC9IC^6; sbit CC10IR = CC10IC^7; sbit CC10IE = CC10IC^6; sbit CC11IR = CC11IC^7; sbit CC11IE = CC11IC^6; sbit CC12IR = CC12IC^7; sbit CC12IE = CC12IC^6; sbit CC13IR = CC13IC^7; sbit CC13IE = CC13IC^6; sbit CC14IR = CC14IC^7; sbit CC14IE = CC14IC^6; sbit CC15IR = CC15IC^7; sbit CC15IE = CC15IC^6; sbit CC16IR = CC16IC^7; sbit CC16IE = CC16IC^6; sbit CC17IR = CC17IC^7; sbit CC17IE = CC17IC^6; sbit CC18IR = CC18IC^7; sbit CC18IE = CC18IC^6; sbit CC19IR = CC19IC^7; sbit CC19IE = CC19IC^6; sbit CC20IR = CC20IC^7; sbit CC20IE = CC20IC^6; sbit CC21IR = CC21IC^7; sbit CC21IE = CC21IC^6; sbit CC22IR = CC22IC^7; sbit CC22IE = CC22IC^6; sbit CC23IR = CC23IC^7; sbit CC23IE = CC23IC^6; sbit CC24IR = CC24IC^7; sbit CC24IE = CC24IC^6; sbit CC25IR = CC25IC^7; sbit CC25IE = CC25IC^6; sbit CC26IR = CC26IC^7; sbit CC26IE = CC26IC^6; sbit CC27IR = CC27IC^7; sbit CC27IE = CC27IC^6; sbit CC28IR = CC28IC^7; sbit CC28IE = CC28IC^6; sbit CC29IR = CC29IC^7; sbit CC29IE = CC29IC^6; sbit CC30IR = CC30IC^7; sbit CC30IE = CC30IC^6; sbit CC31IR = CC31IC^7; sbit CC31IE = CC31IC^6; sbit ACC0 = CCM0^3; sbit ACC1 = CCM0^7; sbit ACC2 = CCM0^11; sbit ACC3 = CCM0^15; sbit ACC4 = CCM1^3; sbit ACC5 = CCM1^7; sbit ACC6 = CCM1^11; sbit ACC7 = CCM1^15; sbit ACC8 = CCM2^3; sbit ACC9 = CCM2^7; sbit ACC10 = CCM2^11; sbit ACC11 = CCM2^15; sbit ACC12 = CCM3^3; sbit ACC13 = CCM3^7; sbit ACC14 = CCM3^11; sbit ACC15 = CCM3^15; sbit ACC16 = CCM4^3; sbit ACC17 = CCM4^7; sbit ACC18 = CCM4^11; sbit ACC19 = CCM4^15; sbit ACC20 = CCM5^3; sbit ACC21 = CCM5^7; sbit ACC22 = CCM5^11; sbit ACC23 = CCM5^15; sbit ACC24 = CCM6^3; sbit ACC25 = CCM6^7; sbit ACC26 = CCM6^11; sbit ACC27 = CCM6^15; sbit ACC28 = CCM7^3; sbit ACC29 = CCM7^7; sbit ACC30 = CCM7^11; sbit ACC31 = CCM7^15; sbit T0IE = T0IC^6; sbit T0IR = T0IC^7; sbit T0M = T01CON^3; sbit T0R = T01CON^6; sbit T1IE = T1IC^6; sbit T1IR = T1IC^7; sbit T1M = T01CON^11; sbit T1R = T01CON^14; sbit T7IE = T7IC^6; sbit T7IR = T7IC^7; sbit T7M = T78CON^3; sbit T7R = T78CON^6; sbit T8IE = T8IC^6; sbit T8IR = T8IC^7; sbit T8M = T78CON^11; sbit T8R = T78CON^14; sfr CP = 0xFE10; sfr CSP = 0xFE08; sfr DPP0 = 0xFE00; sfr DPP1 = 0xFE02; sfr DPP2 = 0xFE04; sfr DPP3 = 0xFE06; sfr MDC = 0xFF0E; sfr MDH = 0xFE0C; sfr MDL = 0xFE0E; sfr ONES = 0xFF1E; sfr PSW = 0xFF10; sfr SP = 0xFE12; sfr STKOV = 0xFE14; sfr STKUN = 0xFE16; sfr SYSCON = 0xFF12; sfr TFR = 0xFFAC; sfr ZEROS = 0xFF1C; sfr BUSCON0 = 0xFF0C; sfr BUSCON1 = 0xFF14; sfr BUSCON2 = 0xFF16; sfr BUSCON3 = 0xFF18; sfr BUSCON4 = 0xFF1A; sfr ADDRSEL1 = 0xFE18; sfr ADDRSEL2 = 0xFE1A; sfr ADDRSEL3 = 0xFE1C; sfr ADDRSEL4 = 0xFE1E; sbit WRCFG = SYSCON^7; sbit CLKEN = SYSCON^8; sbit BYTDIS = SYSCON^9; sbit ROMEN = SYSCON^10; sbit SGTEN = SYSCON^11; sbit ROMS1 = SYSCON^12; sbit MDRIU = MDC^4; sbit N = PSW^0; sbit C = PSW^1; sbit V = PSW^2; sbit Z = PSW^3; sbit E = PSW^4; sbit MULIP = PSW^5; sbit USR0 = PSW^6; sbit HLDEN = PSW^10; sbit IEN = PSW^11; sbit RWDC0 = BUSCON0^4; sbit MTTC0 = BUSCON0^5; sbit ALECTL0 = BUSCON0^9; sbit BUSACT0 = BUSCON0^10; sbit RDYEN0 = BUSCON0^12; sbit RWDC1 = BUSCON1^4; sbit MTTC1 = BUSCON1^5; sbit ALECTL1 = BUSCON1^9; sbit BUSACT1 = BUSCON1^10; sbit RDYEN1 = BUSCON1^12; sbit CSREN1 = BUSCON1^14; sbit CSWEN1 = BUSCON1^15; sbit RWDC2 = BUSCON2^4; sbit MTTC2 = BUSCON2^5; sbit ALECTL2 = BUSCON2^9; sbit BUSACT2 = BUSCON2^10; sbit RDYEN2 = BUSCON2^12; sbit CSREN2 = BUSCON2^14; sbit CSWEN2 = BUSCON2^15; sbit RWDC3 = BUSCON3^4; sbit MTTC3 = BUSCON3^5; sbit ALECTL3 = BUSCON3^9; sbit BUSACT3 = BUSCON3^10; sbit RDYEN3 = BUSCON3^12; sbit CSREN3 = BUSCON3^14; sbit CSWEN3 = BUSCON3^15; sbit RWDC4 = BUSCON4^4; sbit MTTC4 = BUSCON4^5; sbit ALECTL4 = BUSCON4^9; sbit BUSACT4 = BUSCON4^10; sbit RDYEN4 = BUSCON4^12; sbit CSREN4 = BUSCON4^14; sbit CSWEN4 = BUSCON4^15; sbit ILLBUS = TFR^0; sbit ILLINA = TFR^1; sbit ILLOPA = TFR^2; sbit PRTFLT = TFR^3; sbit UNDOPC = TFR^7; sbit STKUF = TFR^13; sbit STKOF = TFR^14; sbit NMI = TFR^15; sfr EXICON = 0xF1C0; sfr ISNC = 0xF1DE; sbit RTCIE = ISNC^0; sbit RTCIR = ISNC^1; sbit PLLIE = ISNC^2; sbit PLLIR = ISNC^3; sfr PECC0 = 0xFEC0; sfr PECC1 = 0xFEC2; sfr PECC2 = 0xFEC4; sfr PECC3 = 0xFEC6; sfr PECC4 = 0xFEC8; sfr PECC5 = 0xFECA; sfr PECC6 = 0xFECC; sfr PECC7 = 0xFECE; sfr DP0L = 0xF100; sfr DP0H = 0xF102; sfr DP1L = 0xF104; sfr DP1H = 0xF106; sfr DP2 = 0xFFC2; sfr DP3 = 0xFFC6; sfr DP4 = 0xFFCA; sfr DP6 = 0xFFCE; sfr DP7 = 0xFFD2; sfr DP8 = 0xFFD6; sfr P0L = 0xFF00; sfr P0H = 0xFF02; sfr P1L = 0xFF04; sfr P1H = 0xFF06; sfr P2 = 0xFFC0; sfr P3 = 0xFFC4; sfr P4 = 0xFFC8; sfr P5 = 0xFFA2; sfr P6 = 0xFFCC; sfr P7 = 0xFFD0; sfr P8 = 0xFFD4; sfr ODP2 = 0xF1C2; sfr ODP3 = 0xF1C6; sfr ODP6 = 0xF1CE; sfr ODP7 = 0xF1D2; sfr ODP8 = 0xF1D6; sfr RP0H = 0xF108; sfr S0BG = 0xFEB4; sfr S0CON = 0xFFB0; sfr S0EIC = 0xFF70; sfr S0RBUF = 0xFEB2; sfr S0RIC = 0xFF6E; sfr S0TBUF = 0xFEB0; sfr S0TIC = 0xFF6C; sfr S0TBIC = 0xF19C; sbit S0STP = S0CON^3; sbit S0REN = S0CON^4; sbit S0PEN = S0CON^5; sbit S0FEN = S0CON^6; sbit S0OEN = S0CON^7; sbit S0PE = S0CON^8; sbit S0FE = S0CON^9; sbit S0OE = S0CON^10; sbit S0ODD = S0CON^12; sbit S0BRS = S0CON^13; sbit S0LB = S0CON^14; sbit S0R = S0CON^15; sbit S0TIE = S0TIC^6; sbit S0TIR = S0TIC^7; sbit S0TBIE = S0TBIC^6; sbit S0TBIR = S0TBIC^7; sbit S0RIE = S0RIC^6; sbit S0RIR = S0RIC^7; sbit S0EIE = S0EIC^6; sbit S0EIR = S0EIC^7; sfr SSCTIC = 0xFF72; sfr SSCRIC = 0xFF74; sfr SSCEIC = 0xFF76; sfr SSCTB = 0xF0B0; sfr SSCRB = 0xF0B2; sfr SSCBR = 0xF0B4; sfr SSCCON = 0xFFB2; sbit SSCHB = SSCCON^4; sbit SSCPH = SSCCON^5; sbit SSCPO = SSCCON^6; sbit SSCTE = SSCCON^8; sbit SSCTEN = SSCCON^8; sbit SSCRE = SSCCON^9; sbit SSCREN = SSCCON^9; sbit SSCPE = SSCCON^10; sbit SSCPEN = SSCCON^10; sbit SSCBE = SSCCON^11; sbit SSCBEN = SSCCON^11; sbit SSCBSY = SSCCON^12; sbit SSCMS = SSCCON^14; sbit SSCEN = SSCCON^15; sbit SSCTIR = SSCTIC^7; sbit SSCTIE = SSCTIC^6; sbit SSCRIR = SSCRIC^7; sbit SSCRIE = SSCRIC^6; sbit SSCEIR = SSCEIC^7; sbit SSCEIE = SSCEIC^6; sfr CAPREL = 0xFE4A; sfr CRIC = 0xFF6A; sfr T2 = 0xFE40; sfr T2CON = 0xFF40; sfr T2IC = 0xFF60; sfr T3 = 0xFE42; sfr T3CON = 0xFF42; sfr T3IC = 0xFF62; sfr T4 = 0xFE44; sfr T4CON = 0xFF44; sfr T4IC = 0xFF64; sfr T5 = 0xFE46; sfr T5CON = 0xFF46; sfr T5IC = 0xFF66; sfr T6 = 0xFE48; sfr T6CON = 0xFF48; sfr T6IC = 0xFF68; sfr WDT = 0xFEAE; sfr WDTCON = 0xFFAE; sbit CRIE = CRIC^6; sbit CRIR = CRIC^7; sbit T2R = T2CON^6; sbit T2UD = T2CON^7; sbit T2UDE = T2CON^8; sbit T2IE = T2IC^6; sbit T2IR = T2IC^7; sbit T3R = T3CON^6; sbit T3UD = T3CON^7; sbit T3UDE = T3CON^8; sbit T3OE = T3CON^9; sbit T3OTL = T3CON^10; sbit T3IE = T3IC^6; sbit T3IR = T3IC^7; sbit T4R = T4CON^6; sbit T4UD = T4CON^7; sbit T4UDE = T4CON^8; sbit T4IE = T4IC^6; sbit T4IR = T4IC^7; sbit T5R = T5CON^6; sbit T5UD = T5CON^7; sbit T5UDE = T5CON^8; sbit T5CLR = T5CON^14; sbit T5SC = T5CON^15; sbit T5IE = T5IC^6; sbit T5IR = T5IC^7; sbit T6R = T6CON^6; sbit T6UD = T6CON^7; sbit T6UDE = T6CON^8; sbit T6OE = T6CON^9; sbit T6OTL = T6CON^10; sbit T6SR = T6CON^15; sbit T6IE = T6IC^6; sbit T6IR = T6IC^7; sbit T0IN = P3^0; sbit T2IN = P3^7; sbit T3IN = P3^6; sbit T4IN = P3^5; sbit T5IN = P5^13; sbit T6IN = P5^12; sbit T2EUD = P5^15; sbit T3EUD = P3^4; sbit T4EUD = P5^14; sbit T5EUD = P5^11; sbit T6EUD = P5^10; sbit T3OUT = P3^3; sbit CAPIN = P3^2; sbit T6OUT = P3^1; sbit WDTIN = WDTCON^0; sbit WDTR = WDTCON^1; sfr PWMCON0 = 0xFF30; sfr PWMCON1 = 0xFF32; sfr PW0 = 0xFE30; sfr PW1 = 0xFE32; sfr PW2 = 0xFE34; sfr PW3 = 0xFE36; sfr PWMIC = 0xF17E; sfr PT0 = 0xF030; sfr PT1 = 0xF032; sfr PT2 = 0xF034; sfr PT3 = 0xF036; sfr PP0 = 0xF038; sfr PP1 = 0xF03A; sfr PP2 = 0xF03C; sfr PP3 = 0xF03E; sbit PTR0 = PWMCON0^0; sbit PTR1 = PWMCON0^1; sbit PTR2 = PWMCON0^2; sbit PTR3 = PWMCON0^3; sbit PTI0 = PWMCON0^4; sbit PTI1 = PWMCON0^5; sbit PTI2 = PWMCON0^6; sbit PTI3 = PWMCON0^7; sbit PIE0 = PWMCON0^8; sbit PIE1 = PWMCON0^9; sbit PIE2 = PWMCON0^10; sbit PIE3 = PWMCON0^11; sbit PIR0 = PWMCON0^12; sbit PIR1 = PWMCON0^13; sbit PIR2 = PWMCON0^14; sbit PIR3 = PWMCON0^15; sbit PEN0 = PWMCON1^0; sbit PEN1 = PWMCON1^1; sbit PEN2 = PWMCON1^2; sbit PEN3 = PWMCON1^3; sbit PM0 = PWMCON1^4; sbit PM1 = PWMCON1^5; sbit PM2 = PWMCON1^6; sbit PM3 = PWMCON1^7; sbit PB01 = PWMCON1^12; sbit PS2 = PWMCON1^14; sbit PS3 = PWMCON1^15; sbit PWMIR = PWMIC^7; sbit PWMIE = PWMIC^6; sfr XP0IC = 0xF186; sfr XP1IC = 0xF18E; sfr XP2IC = 0xF196; sfr XP3IC = 0xF19E; sbit XP0IR = XP0IC^7; sbit XP0IE = XP0IC^6; sbit XP1IR = XP1IC^7; sbit XP1IE = XP1IC^6; sbit XP2IR = XP2IC^7; sbit XP2IE = XP2IC^6; sbit XP3IR = XP3IC^7; sbit XP3IE = XP3IC^6; #line 5 "scope.h" #line 1 "C:\C166\INC\STDARG.H" #line 10 "C:\C166\INC\STDARG.H" #line 6 "scope.h" #line 6 "scope.h" #line 1 "C:\C166\INC\STDLIB.H" #line 10 "C:\C166\INC\STDLIB.H" #line 12 "C:\C166\INC\STDLIB.H" #line 14 "C:\C166\INC\STDLIB.H" #line 17 "C:\C166\INC\STDLIB.H" #line 19 "C:\C166\INC\STDLIB.H" #line 22 "C:\C166\INC\STDLIB.H" #line 24 "C:\C166\INC\STDLIB.H" #line 26 "C:\C166\INC\STDLIB.H" extern int abs (int val); extern long labs (long val); extern double atof (void *s1); extern long atol (void *s1); extern int atoi (void *s1); extern int rand (void); extern void srand (unsigned int); #line 38 "C:\C166\INC\STDLIB.H" #line 44 "C:\C166\INC\STDLIB.H" extern void far *malloc (size_t size); extern void free (void far *p); extern void init_mempool (void far *p, size_t size); extern void far *realloc (void far *p, size_t size); extern void far *calloc (size_t size, size_t len); extern void xhuge *xmalloc (unsigned long size); extern void xhuge *xcalloc (unsigned long size, unsigned long len); extern void xhuge *xrealloc (void xhuge *p, unsigned long size); extern void xinit_mempool (void xhuge *p, unsigned long size); extern void xfree (void xhuge *p); #line 7 "scope.h" #line 1 "C:\C166\INC\STDIO.H" #line 10 "C:\C166\INC\STDIO.H" #line 8 "scope.h" #line 8 "scope.h" #line 1 "C:\C166\INC\STRING.H" #line 10 "C:\C166\INC\STRING.H" #line 13 "C:\C166\INC\STRING.H" #line 15 "C:\C166\INC\STRING.H" #line 17 "C:\C166\INC\STRING.H" extern char *strcat (char *s1, char *s2); extern char *strncat (char *s1, char *s2, unsigned int n); extern int strcmp (char *s1, char *s2); extern int strncmp (char *s1, char *s2, unsigned int n); extern char *strcpy (char *s1, char *s2); extern char *strncpy (char *s1, char *s2, unsigned int n); extern size_t strlen (char *); extern char *strchr (char *s, char c); extern int strpos (char *s, char c); extern char *strrchr (char *s, char c); extern int strrpos (char *s, char c); extern int strspn (char *s, char *set); extern int strcspn (char *s, char *set); extern char *strpbrk (char *s, char *set); extern char *strrpbrk(char *s, char *set); extern int memcmp (void *s1, void *s2, unsigned int n); extern void *memcpy (void *s1, void *s2, unsigned int n); extern void *memchr (void *s, char val, unsigned int n); extern void *memccpy (void *s1, void *s2, char val, unsigned int n); extern void *memmove (void *s1, void *s2, unsigned int n); extern void *memset (void *s, char val, unsigned int n); extern char far *fstrcat (char far *s1, char far *s2); extern char far *fstrncat (char far *s1, char far *s2, unsigned int n); extern int fstrcmp (char far *s1, char far *s2); extern int fstrncmp (char far *s1, char far *s2, unsigned int n); extern char *fstrcpy (char far *s1, char far *s2); extern char *fstrncpy (char far *s1, char far *s2, unsigned int n); extern size_t fstrlen (char far *); extern char far *fstrchr (const char far *s, char c); extern char far *fstrrchr (const char far *s, char c); extern int fstrpos (const char far *s, char c); extern int fstrrpos (const char far *s, char c); extern int fstrspn (char far *s, char far *set); extern int fstrcspn (char far *s, char far *set); extern char *fstrpbrk (char far *s, char far *set); extern char *fstrrpbrk (char far *s, char far *set); extern int fmemcmp (void far *s1, void far *s2, unsigned int n); extern void far *fmemcpy (void far *s1, void far *s2, unsigned int n); extern void far *fmemchr (void far *s, char val, unsigned int n); extern void far *fmemccpy (void far *s1, void far *s2, char val, unsigned int n); extern void far *fmemmove (void far *s1, void far *s2, unsigned int n); extern void far *fmemset (void far *s, char val, unsigned int n); extern int xmemcmp (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemcpy (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemchr (void xhuge *s, char val, unsigned long n); extern void xhuge *xmemccpy (void xhuge *s1, void xhuge *s2, char val, unsigned long n); extern void xhuge *xmemmove (void xhuge *s1, void xhuge *s2, unsigned long n); extern void xhuge *xmemset (void xhuge *s, char val, unsigned long n); #line 9 "scope.h" #line 1 "C:\C166\INC\MATH.H" extern int abs (int val); extern long labs (long val); extern double fabs (double val); extern double sqrt (double val); extern double exp (double val); extern double log (double val); extern double log10 (double val); extern double sin (double val); extern double cos (double val); extern double tan (double val); extern double asin (double val); extern double acos (double val); extern double atan (double val); extern double sinh (double val); extern double cosh (double val); extern double tanh (double val); extern double atan2 (double y, double x); extern double ceil (double val); extern double floor (double val); extern double modf (double val, double *n); extern double pow (double x, double y); extern unsigned int _chkfloat_ (float x); extern unsigned int _chkdouble_ (double x); #line 10 "scope.h" #line 1 "C:\C166\INC\ABSACC.H" #line 10 "C:\C166\INC\ABSACC.H" #line 13 "C:\C166\INC\ABSACC.H" #line 11 "scope.h" #line 1 "C:\C166\INC\INTRINS.H" void _nop_ (void); void _idle_ (void); void _srvwdt_ (void); void _pwrdn_ (void); void _diswdt_ (void); void _einit_ (void); void _bfld_ (unsigned int sfr_, unsigned mask1, unsigned mask2); void _trap_ (int intno); void _atomic_ (int n_instr); void _endatomic_ (void); unsigned int _sof_ (void huge *); #line 22 "C:\C166\INC\INTRINS.H" #line 24 "C:\C166\INC\INTRINS.H" bit _testclear_ (bit); bit _testset_ (bit); extern unsigned char _crol_ (unsigned char, int); extern unsigned int _irol_ (unsigned int, int); extern unsigned long _lrol_ (unsigned long, int); extern unsigned char _cror_ (unsigned char, int); extern unsigned int _iror_ (unsigned int, int); extern unsigned long _lror_ (unsigned long, int); #line 12 "scope.h" #line 1 "global.h" #line 5 "global.h" #line 204 "global.h" #line 14 "scope.h" #line 1 "util.h" #line 3 "util.h" #line 120 "util.h" #line 17 "scope.h" #line 1 "astro.h" #line 3 "astro.h" #line 171 "astro.h" #line 18 "scope.h" #line 1 "usr.h" #line 3 "usr.h" #line 52 "usr.h" #line 19 "scope.h" #line 1 "int.h" #line 3 "int.h" #line 400 "int.h" #line 20 "scope.h" #line 1 "scope.h" #line 3 "scope.h" #line 48 "scope.h" #line 21 "scope.h" #line 1 "obj.h" #line 3 "obj.h" #line 48 "obj.h" #line 22 "scope.h" extern void scope(void); extern void encode(void); extern void showEncoders(int mode); extern void encAutoTestHo( void ); extern void encAutoTestVe( void ); #line 21 "obj.h" typedef struct objectstruct { char name[18]; char ra[12]; char dec[12]; } objectstruct; extern objectstruct objlist[ 100 + 1]; extern void getListObj( void ); extern void setListObj( void ); extern void clearObjList( void ); extern void serialObjListDownload( void ); #line 3 "OBJ.C" objectstruct objlist[ 100 + 1]; void clearObjList( void ) { unsigned int ct; ct = 0; while( ct < 100 ) { sprintf( objlist[ct].name , " %03u \0", ct ); sprintf( objlist[ct].ra , "+000:00:00\0"); sprintf( objlist[ct].dec , "+000:00:00\0"); ct++; } } void serialObjListDownload( void ) { char tmp[20]; clearObjList(); lcd_clear(); sprintf(tmp, "READY TO RECEIVE" ); lcd_puts(1,0,tmp); lcd_clear(); sprintf(tmp, "DOWNLOAD RUNNING" ); lcd_puts(1,0,tmp); lcd_clear(); sprintf(tmp, "DOWNLOAD READY" ); lcd_puts(1,0,tmp); wait_10ms(100); wait_10ms(100); } int chooseListObject( void ) { unsigned char KEY; int y,_y,upd; KEY = 0; y = 0; _y = 0; upd = 1; while( KEY != 'C' ) { if( upd ) { lcd_clear(); lcd_puts(0,0,objlist[ y + 0 ].name); lcd_puts(1,0,objlist[ y + 1 ].name); lcd_puts(2,0,objlist[ y + 2 ].name); lcd_puts(3,0,objlist[ y + 3 ].name); upd = 0; } lcd_setcursor(_y,0); lcd_putchar( 'X' ); KEY = 0; while( KEY == 0 ){ KEY = readkey(); } if(KEY == 'D' ){ lcd_setcursor(_y,0); lcd_putchar(' '); _y++; if(_y > 3 ){ if( y < ( 100 - 4 ) ) { y++; upd = 1; } _y = 3; } continue; } if(KEY == 'U' ){ lcd_setcursor(_y,0); lcd_putchar(' '); if(_y > 0 ){ _y--; } else { if( y > 0 ){ y--; upd = 1; } _y = 0; } continue; } if( KEY == 'E' ) { y = y + _y; return(y); } } return(-1); } void setObjListDegrees( int azalt, char * ho, char *ve) { char tmp1[20]; char tmp2[20]; long l1,l2,l3,l4,l5,l6; strcpy(tmp1,ho); strcpy(tmp2,ve); tmp1[4] = 0; tmp1[7] = 0; tmp2[4] = 0; tmp2[7] = 0; l1 = atol(&tmp1[1]); l2 = atol(&tmp1[5]); l3 = atol(&tmp1[8]); l4 = atol(&tmp2[1]); l5 = atol(&tmp2[5]); l6 = atol(&tmp2[8]); l1 = l1 * 3600; if(! azalt){ l1 = l1 * 15; } l2 = l2 * 60; l1 = l1 + l2 + l3; l1 = l1 * 10; if(tmp1[0] == '-'){ l1 = l1 * -1; } l4 = l4 * 3600; l5 = l5 * 60; l4 = l4 + l5 + l6; l4 = l4 * 10; if(tmp2[0] == '-'){ l4 = l4 * -1; } (*(long volatile sdata *)0x0e040) = l1; (*(long volatile sdata *)0x0e044) = l4; if(azalt){ (*(double volatile sdata *)0x0e048) = lArc10dDegrees( l1 ); (*(double volatile sdata *)0x0e050) = lArc10dDegrees( l4 ); } else { (*(double volatile sdata *)0x0e058) = lArc10dHours( l1 ); (*(double volatile sdata *)0x0e060) = lArc10dDegrees( l4 ); } } unsigned char alphconvert( unsigned char KEY, unsigned char mode ) { unsigned char k; k = KEY; switch( mode ) { case 0: break; case 1: switch( KEY ) { case '1': k = 'A'; break; case '2': k = 'B'; break; case '3': k = 'C'; break; case '4': k = 'D'; break; case '5': k = 'E'; break; case '6': k = 'F'; break; case '7': k = 'G'; break; case '8': k = 'H'; break; case '9': k = 'I'; break; case '0': k = 'J'; break; } break; case 2: switch( KEY ) { case '1': k = 'K'; break; case '2': k = 'L'; break; case '3': k = 'M'; break; case '4': k = 'N'; break; case '5': k = 'O'; break; case '6': k = 'P'; break; case '7': k = 'Q'; break; case '8': k = 'R'; break; case '9': k = 'S'; break; case '0': k = 'T'; break; } break; case 3: switch( KEY ) { case '1': k = 'U'; break; case '2': k = 'V'; break; case '3': k = 'W'; break; case '4': k = 'X'; break; case '5': k = 'Y'; break; case '6': k = 'Z'; break; case '7': k = '-'; break; case '8': k = '+'; break; case '9': k = '.'; break; case '0': k = ' '; break; } break; } return( k ); } void editListObj( char *name, char *ra, char *dec ) { char tmp1[20]; char tmp2[20]; char tmp3[20]; unsigned char KEY,x,y,txt; strcpy( tmp1, name); strcpy( tmp2, ra); strcpy( tmp3, dec); lcd_on(2); lcd_clear(); KEY = 0; x = 1; y = 0; txt = 0; while(KEY != 'E' ){ KEY = 0; lcd_puts(0,0,tmp1); lcd_puts(1,0,tmp2); lcd_puts(2,0,tmp3); lcd_setcursor(y,x); KEY = 0; while(! KEY ) { KEY = readkey(); } if( ( y == 0 ) && ( KEY == 'C' ) ){ txt++; if(txt > 3 ){ txt = 0; } continue; } if(KEY == 'U' ){ if( y > 0 ){ y--; } x = 1; continue; } if(KEY == 'D' ){ if(y < 2 ){ y++; } x = 1; continue; } if(KEY == 'L'){ if(x > 0 ){ x--; } if( y > 0 ){ if(x == 4 ){ x--; } if(x == 7){ x--; } } else { if( x < 1){ x = 1; } } continue; } if( ( y > 0 ) && ( x == 0 )){ if( ( KEY >= '0' ) || ( KEY <= '9' ) ){ if( y == 1 ) { if(tmp2[x] == '+'){ tmp2[x] = '-'; } else { tmp2[x] = '+'; } } else { if(tmp3[x] == '+'){ tmp3[x] = '-'; } else { tmp3[x] = '+'; } } KEY = 'R'; } } else { if( ( KEY >= '0' ) && ( KEY <= '9') ){ if( y == 0 ){ if( x > 0 ){ KEY = alphconvert( KEY, txt ); tmp1[x] = ( unsigned char )KEY; } else { x = 1; } } else { if( y == 1 ) { tmp2[x] = ( unsigned char )KEY; } if( y == 2 ) { tmp3[x] = ( unsigned char )KEY; } } KEY = 'R'; } } if(KEY == 'R');{ x++; if( y > 0 ){ if(x == 4 ){ x++; } if(x == 7){ x++; } if(x > 9){ x--; } } else { if( x > 15){ x--; } } continue; } } strcpy( name, tmp1); strcpy( ra, tmp2); strcpy( dec, tmp3); } void getListObj( void ) { int res; res = chooseListObject(); if( res < 0 ){ return; } setObjListDegrees( 0 , (char *)&objlist[res].ra[0] , (char *)&objlist[res].dec[0]); } void setListObj( void ) { int res; res = chooseListObject(); if( res < 0 ){ return; } editListObj( (char *)&objlist[res].name[0], (char *)&objlist[res].ra[0], (char *)&objlist[res].dec[0] ); }