V@ B25CE1-3@ B @ D 6 > 9 j9|P^1.2.0 :1E  F0 I/5,N' , 1 6 ; @ E J O T Y ^ c h m r w |      ! & + 0 5 : ? D I 2am e <getw.cgar;licbtosclib 6jedjFOKm  /* Module getw.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include getw(fp) FILE *fp; { int c; int res; c = getc(fp); if (c == EOF) return(EOF); res = getc(fp); if (res == EOF) return(EOF); c += res << 8; return(c); }   closea.cgar;licbtosclib  نjeKdjFOKmr$ /* Module closea.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include extern int errno; extern char *_openfd[]; _close(fd) int fd; { int res; if (fd < 0 || fd >= 16 || _openfd[fd] == 0){ errno = 1; return(-1); } res = CloseByteStre0 am(_openfd[fd]); if (res){ errno = res; return(-1); } free(_openfd[fd]); _openfd[fd] = 0; return(0); } < ,W setvbuf.cgar;licbtosclibW je_djGOKmH /* Module setvbuf.c V010EM01 === 12/08/87 * 12/08/87 010E00 rma check for zero size * 09/14/87 010A00 rma initial submittal * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include int setvbuf(fp, buf, type, size) FILE *fp; char *buf; int type; unsigned size; { void *mT alloc(); switch (type){ case _IOFBF: if (size == 0) return(1); if (buf){ if (fp->_f_flags & _F_BUF) free(fp->_f_buffer); fp->_f_flags &= ~_F_BUF; } else { buf = malloc(size); if (buf == 0) return(1); if (fp->_f_flags & _F_BUF) free(fp->_f_buffer); fp->_f_flags |= _F_BUF; } fp->_f_curp = fp->_f_endp = fp->_f_buffer = buf; fp->_f_bsize = size; return(0); case _IOLBF: case _IONBF: if (fp->_f_flags & _F_BUF) free(fp->_f_buffer); fp->_f_curp = fp->_` f_endp = fp->_f_buffer = &fp->_f_hold; fp->_f_bsize = 1; fp->_f_flags &= ~_F_BUF; return(0); default: return(1); } } l z brk.cgar;licbtosclib  ŇjedjGOKm(x /* Module brk.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #define MARGIN 256 #if defined(__SMALL__) || defined(__MEDIUM__) extern int _brklvl; coreleft() { asm mov ax,sp asm sub ax,dgroup:_brklvl asm sub ax,MARGIN } coreminleft() { int *bottom  = &_brklvl; while (!*bottom++) ; return(bottom - &_brklvl); } brk(addr) char *addr; { asm mov ax,addr asm mov dx,sp asm sub dx,MARGIN asm cmp ax,dx asm jb brksuc return(-1); brksuc: asm mov dgroup:_brklvl,ax return(0); } char *sbrk(incr) unsigned incr; { asm mov cx,incr asm add cx,dgroup:_brklvl asm jc sbrkerr asm mov dx,cx asm add dx,MARGIN asm jc sbrkerr asm cmp dx,sp asm jb sbrkok sbrkerr: return(-1); sbrkok: asm mov ax,dgroup:_brklvl asm mov dgroup :_brklvl,cx } #else coreleft() { asm mov ax,sp asm sub ax,MARGIN } coreminleft() { int *bottom = ⊥ bottom = (int *)((long)bottom & 0xffff0000); while (!*bottom++) ; return((long)bottom &0xffff); } #endif  6_ bsearch.cgar;licbtosclib_"ΆjefdjHOKm  /* Module bsearch.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ char *bsearch(key, base, nelem, width, fcmp) char *key; char *base; register int nelem; int width; int (*fcmp)(); { char *kmin, *probe; int i, j; kmin = base; while (nelem > 0){ i = n elem >> 1; probe = kmin + i * width; j = (*fcmp)(key, probe); if (j == 0) return(probe); else if (j < 0) nelem = i; else { kmin = probe + width; nelem = nelem - i - 1; } } return(0); }  [fflush.cgar;licbtosclib"jedjHOKm$ /* Module fflush.c V010BM01 === 09/17/87 * 09/17/87 rma - do not set _F_ERR if i < j (fix for \f phenomena) * 08/21/87 kcj - call _fseekeof() to force appending data * 07/02/87 rma - reset _f_curp before return * 05/20/87 rma - add _fflush() (no CheckpointBS call * 04/30/87 rma - fflush.c - fix to REALLY flush the file * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * C OPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include extern int CheckpointBs plm far (void *far pBSWA); extern char *_openfd[]; extern int kcjtest; fflush(fp) register FILE *fp; { int i; int j; if ((fp->_f_flags & (_F_WRIT|_F_OPEN|_F_ERR|_F_IN)) != (_F_WRIT|_F_OPEN)) return(0); if (fp->_f_curp > fp->_f_buffer){ i = fp->_f_curp - fp->_f_buffer; if (fp->_f_flags & _F_APND){ /* kcj */ if(_fseekeof(fp, 0L)){ fp->_f_flags |= _F_ERR; "  return(EOF); } } /* kcj */ j = _write(fp->_f_fd, fp->_f_buffer, i); fp->_f_curp = fp->_f_buffer; if (i > j){ /* rma 9/17/87 */ fp->_f_flags |= _F_ERR; return(EOF); } CheckpointBs(_openfd[fp->_f_fd]); } return(0); } _fflush(fp) register FILE *fp; { int i; int j; if ((fp->_f_flags & (_F_WRIT|_F_OPEN|_F_ERR|_F_IN)) != (_F_WRIT|_F_OPEN)) return(0); if (fp->_f_curp > fp->_f_buffer){ i = fp->_f_curp - fp->_f_buffer; if (fp->_f_flags & _F_APND){ /* kcj */$  if(_fseekeof(fp, 0L)){ fp->_f_flags |= _F_ERR; return(EOF); } } /* kcj */ j = _write(fp->_f_fd, fp->_f_buffer, i); fp->_f_curp = fp->_f_buffer; if (i > j){ /* rma 9/17/87 */ fp->_f_flags |= _F_ERR; return(EOF); } } return(0); } 5s]sss9s_ssssKs{sssDsuss^shsssXl(;i(JH2RFsssG71& _)zputw.cgar;licbtosclibz" jeٟdjIOKm)( /* Module putw.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include putw(w, fp) unsigned w; FILE *fp; { int res; res = putc(w & 0xff, fp); if (res == EOF) return(EOF); res = putc(w >> 8, fp); if (res == EOF) return(EOF); return(w); * }  , ァfgets.cgar;licbtosclib$1jedjIOKm,- /* Module fgets.c V010BM01 === 09/24/87 * 09/24/87 010B01 rma - add backspace logic for input from [kbd] * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include char *fgets(s, n, fp) register char *s; int n; FILE *fp; { int c; char *ret; ret = s; c = 0; while (-8/ -n > 0){ c = getc(fp); if (c == EOF || c == '\n') break; if ((c == '\b') && (fp->_f_flags & _F_KBD )) { if (s != ret) s--; } else *s++ = c; } if (c == EOF && s == ret) return(0); if (c == '\n') *s++ = c; *s = 0; return(ret); } ` p0_ @ 0@/`P0%@&O`,,O--// 01?`;<=/>?O6BPxD1 T fprintf.cgar;licbtosclib$߆je>djIOKmgP2 /* Module fprintf.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include #include #include extern int fputc(); fprintf(FILE *fp, char *fmt, ...) { va_list ap; va_start(ap, fmt); return(_printf(fputc, fp\4 , fmt, ap)); } vfprintf(FILE *fp, char *fmt, va_list ap) { return(_printf(fputc, fp, fmt, ap)); } h6  |strcat.cgar;licbtosclib$je6?mJOKm't7  /* * Module: strcat.c V011IM01 === 06/13/90 * * 06/13/90 011I01 sbw - strncat(): Replace strlen() call on source string * (protection violation if no null); return 0 if * zero length specified. * * * PROPRIETARY PROGRAM MATERIAL * * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1990 UNISYS CORPORATION */ #inc9  lude char *strcat( char *dest, char *src ) { movmem( src, dest + strlen( dest ), strlen( src ) + 1 ) ; return( dest ) ; } char *strncat( char *dest, char *src, size_t maxlen ) { size_t slen, dlen ; char *ssrc ; if ( maxlen ) { dlen = strlen( dest ) ; for ( ssrc = src, slen = 0; *ssrc && slen < maxlen ; ssrc++, slen++ ) { ; } movmem( src, dest + dlen, slen ) ; dest[dlen + slen] = '\0' ; } return( dest ) ; } ;  D6fputs.cgar;licbtosclib&jeAdjJOKm<  /* Module fputs.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include fputs(s, fp) char *s; FILE *fp; { int res; while (*s){ res = putc(*s, fp); s++; if (res == EOF) return(EOF); } return(0); } >  3=sin.cgar;licbtosclib&jeudjKOKm"?  /* Module sin.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #define PI2 1.570796326794896 #define YMAX 3.14159e8 #define C1 (3217./1024.) #define C2 -8.90891020676153e-6 double fabs(); static double R[8] = { -0.166666666666666, 0.8333333A  33333316e-2, -0.198412698412018e-3, 0.275573192101527e-5, -0.250521067982745e-7, 0.160589364903715e-9, -0.764291780689104e-12, 0.272047909578888e-14 }; static double sincos(x, y, sgn, coswanted) double x; double y; int sgn; int coswanted; { int n; double xn; double f; double floor(); double fabsx; double g; double rg; int i; if (y > YMAX){ errno = EDOM; return(0.0); } n = .5 + y * 0.318309886183790; xn = n; if (n & 1) sgn = -sgn; if (coswanted) xn = xn - .5; fabsx = fabs(xC  ); f = ((floor(fabsx) - xn * C1) + fabsx - floor(fabsx)) - xn * C2; if (fabs(f) > 1e-8){ g = f * f; for (i = 7, rg = 0; i >= 0; i--) rg = (rg + R[i]) * g; f = f + f * rg; } if (sgn < 0) f = -f; return(f); } double sin(x) double x; { if (x < 0) return(sincos(x, -x, -1, 0)); else return(sincos(x, x, 1, 0)); } double cos(x) double x; { return(sincos(x, fabs(x) + PI2, 1, 1)); } E  D realloc.cgar;licbtosclib&jedjKOKm%F  /* Module realloc.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ extern void free(); extern char *malloc(); char *realloc(ptr, size) char *ptr; unsigned size; { int *ip; unsigned oldsize; char *newp; ip = (int *)ptr; /* 6 == sizeof HEADER */ oldsH  ize = (ip[-1] * 6) - 6; /* hardwire for now... rma */ newp = malloc(size); if (newp == 0) return(0); movmem(ptr, newp, oldsize < size ? oldsize : size); free(ptr); return(newp); } J  (flsbuf.cgar;licbtosclib(&ׇjedjKOKm(L  /* Module flsbuf.c V010AM01 === 09/14/87 * 05/20/87 rma - call _fflush() (no CheckpointBS), not fflush() * 04/24/87 rma - fix for crash when press * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include _flsbuf(fp) FILE *fp; { if ((fp->_f_flags & (_F_WRIT|_F_OPEN  N|_F_ERR|_F_IN)) != (_F_WRIT|_F_OPEN)){ fp->_f_flags |= _F_ERR; if (fp->_f_flags & _F_BUF) /* malloc'ed buffer */ fp->_f_curp = fp->_f_buffer; else /* _f_buffer not valid */ fp->_f_curp = (unsigned char *)&fp->_f_hold; return(EOF); } fp->_f_flags |= _F_OUT; _fflush(fp); if (fp->_f_flags & _F_ERR) return(EOF); return(fp->_f_buffer[fp->_f_bsize - 1]); } P dhscanf.cgar;licbtosclibh(jemdjLOKm( (Q /* Module scanf.c V010FM01 === 03/09/88 * 03/09/88 010F01 rma - fix 's': for format "%4s %4s" (last char repeats) * 03/09/88 010F01 rma - fix ResultCount for case of no matches * 03/07/88 010F01 de - fix _match for width bug * 12/15/87 010E01 rma - fix ResultCount for "%[...]" * 09/29/87 010C01 rma - bulletproof scanf() for input>260 bytes * 09/18/87 010B01 rma - fix for "%[^\n]" format * 06/18/87 rma - fix for during input * 06/18/87 rma - fix for key press * 02/19/87 rma - add "L", 4S skip "+", implement %i, delete kbd terminator * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include #include extern int fgetc(); static int Feof; /* for key rma */ static int errflag; static int (*Infunc)(); static int (*Unfunc)(); @U static int *Inarg; static int ResultCount; static inabyte() { int c; if (Feof) return(EOF); if ((c = (*Infunc)(Inarg)) == EOF) Feof = 1; return(c); } static unfbyte(c, fp) char c; FILE *fp; { ungetc(c, fp); } static inbyte(bufp) register char **bufp; { if (**bufp) return(*(*bufp)++); else return(EOF); } /*ARGSUSED*/ static unbyte(c, bufp) char c; char **bufp; { --*bufp; } scanf(char *fmt, ...) { va_list ap; char s[260], *s2; va_start(ap, fmt); if (stdin->_f_flags & LW _F_KBD){ if (fgets(s,257,stdin) == NULL) /* 9/29/87 rma */ return(EOF); else{ strcat(s,"\n"); s2 = s; return(_scanf(inbyte, unbyte, &s2, fmt, ap)); } } return(_scanf(fgetc, unfbyte, stdin, fmt, ap)); } vscanf(char *fmt, va_list ap) { char s[128], *s2; if (stdin->_f_flags & _F_KBD){ if (gets(s) == NULL) return(EOF); else{ s2 = s; return(_scanf(inbyte, unbyte, &s2, fmt, ap)); } } return(_scanf(fgetc, unfbyte, stdin, fmt, ap)); } fscanf(FILE *fp, char *fmt, ...)XY  { va_list ap; va_start(ap, fmt); return(_scanf(fgetc, unfbyte, fp, fmt, ap)); } vfscanf(FILE *fp, char *fmt, va_list ap) { return(_scanf(fgetc, unfbyte, fp, fmt, ap)); } sscanf(char *buf, char *fmt, ...) { va_list ap; va_start(ap, fmt); return(_scanf(inbyte, unbyte, &buf, fmt, ap)); } vsscanf(char *buf, char *fmt, va_list ap) { return(_scanf(inbyte, unbyte, &buf, fmt, ap)); } static skipwhite() { register int c; while (isspace(c = inabyte())) ; return(c); } static _scanf(infud[ nc, unfunc, inarg, fmt, ap) int (*infunc)(); int (*unfunc)(); int *inarg; char *fmt; va_list ap; { int c; int suppress; int width; int longf; int base; char *startp, *cp; long val; long cvtint(); double d; double satof(); Feof=0; Unfunc = unfunc; Infunc = infunc; Inarg = inarg; ResultCount = 0; while (*fmt){ if (*fmt == ' ' || *fmt == '\t' || *fmt == '\n'){ c = skipwhite(); if (c != EOF) (*Unfunc)(c, Inarg); } else if (*fmt != '%'){ c = inabyte(); if (c != *fmt)p] { if (c != EOF) (*unfunc)(c, inarg); else if (ResultCount == 0) ResultCount = EOF; va_end(ap); return(ResultCount); } } else { errflag = 0; fmt++; if (*fmt == '*'){ suppress = 1; fmt++; } else suppress = 0; width = 0; while (isdigit(*fmt)) width = width * 10 + *fmt++ - '0'; if ((*fmt == 'l') || (*fmt == 'L')){ longf = 1; fmt++; } else { if (*fmt == 'h') fmt++; longf = 0; } switch (*fmt){ case '|_ [': case 'c': break; default: c = skipwhite(); if (c == EOF){ va_end(ap); if (ResultCount == 0) return(EOF); else return(ResultCount); } } switch (*fmt){ case '%': if (c != '%') return(ResultCount); break; case 'D': longf = 1; case 'd': base = 10; goto intcvt; case 'I': /* new integer format rma */ longf = 1; case 'i': base = 0; goto intcvt; case 'O': longf = 1; case 'o': base = 8;a  goto intcvt; case 'X': longf = 1; case 'x': base = 16; intcvt: val = cvtint(c, width, base); if (errflag){ va_end(ap); return(ResultCount); } if (!suppress){ if (longf) *va_arg(ap, long *) = val; else *va_arg(ap, int *) = (int)val; ResultCount++; } break; case 'E': case 'F': longf = 1; case 'e': case 'f': d = satof(c, width); if (errflag){ va_end(ap); return(ResultCount); } if (c  !suppress){ if (longf) *va_arg(ap, double *) = d; else *va_arg(ap, float *) = d; ResultCount++; } break; case 's': if (!suppress) cp = va_arg(ap, char *); if (width == 0) width = 0xffff; for (;;){ if (!suppress) *cp++ = c; if (--width == 0){ c = inabyte(); /* 3/8/88 rma */ break; } c = inabyte(); if (c == EOF){ if (!suppress){ *cp = 0; ResultCount++; } va_end(ap); e  return(ResultCount); } if (isspace(c)) break; } if (!suppress){ *cp = 0; ResultCount++; } (*unfunc)(c, inarg); break; case 'c': if (width == 0) width = 1; if (!suppress) cp = va_arg(ap, char *); while (--width >= 0){ c = (*infunc)(inarg); if (c == EOF){ va_end(ap); return(ResultCount); } if (!suppress) *cp++ = c; } if (!suppress) ResultCount++; break; case '[': startp =g  ++fmt; if (*startp == '^') startp++; for (fmt = startp; *fmt != ']'; fmt++) if (*fmt == 0){ va_end(ap); return(ResultCount); } if (!suppress) cp = va_arg(ap, char *); else cp = 0; if (width == 0) width = 0xffff; if (!_match(startp, fmt, cp, width)){ va_end(ap); return(ResultCount); } /* else if (!suppress) ResultCount++; ** _match set ResultCount 12/15/87 */ break; default: va_end(ap); return(Resi  ultCount); } } fmt++; } va_end(ap); return(ResultCount); } static _match(startp, endp, cpp, width) char *startp; char *endp; char *cpp; int width; { register char *cp; int base; int c; int nout = 0; /* 3/9/88 rma */ base = 0; for (;;){ c = inabyte(); if (c == EOF){ if (base) ResultCount++; else if (ResultCount == 0) ResultCount = EOF; return(0); } for (cp = startp; cp < endp; cp++) if (*cp == c) break; if (startp[-1] == '^'){ if (cp < endp)k  break; } else if (cp >= endp) break; width--; if (cpp){ base = 1; *cpp++ = c; nout++; /* 3/9/88 rma */ } if (width == 0) { c = inabyte(); /* negate unget 3/7/88 de */ break; } } if (nout){ /* 3/9/88 rma */ ResultCount++; *cpp = 0; } (*Unfunc)(c, Inarg); return(1); } static long cvtint(c, width, base) register int c; int width; int base; { long val; int sign; sign = 0; val = 0; if (width == 0) width = 100; if ((c == '+' || c == '-') && (basm e == 10 || base == 0)){ if (--width <= 0) return(0); if (c =='-') sign = 1; c = inabyte(); } if (base == 0){ /* new integer format rma */ if (c == '0'){ if (--width <= 0) return(0); base = 8; c = inabyte(); if (c == 'x' || c == 'X'){ if (--width <= 0) return(0); base = 16; c = inabyte(); } } else base = 10; } if ((base == 10 && !isdigit(c)) || (base == 8 && (c < '0' || c > '7')) || (base == 16 && !isxdigit(c))){ (*Unfunc)(c, Inaro g); errflag = 1; return(0); } do { if (!isdigit(c) && (base != 16 || !isxdigit(c))) break; if (isxdigit(c) && !isdigit(c)) c = tolower(c) + 10 - 'a'; else c -= '0'; val = val * base + c; c = inabyte(); } while (--width != 0); if (c != EOF) (*Unfunc)(c, Inarg); if (sign) val = -val; return(val); } static unsigned powtab[] = { 0x0000,0x0000,0x0000,0x4024, /* 1.0e1 */ 0x0000,0x0000,0x0000,0x4059, /* 1.0e2 */ 0x0000,0x0000,0x8800,0x40c3, /* 1.0e4 */ 0x0000,0x00q 00,0xd784,0x4197, /* 1.0e8 */ 0x8000,0x37e0,0xc379,0x4341, /* 1.0e16 */ 0x6e17,0xb505,0xb8b5,0x4693, /* 1.0e32 */ 0xf9f6,0xe93f,0x4f03,0x4d38, /* 1.0e64 */ 0x1d33,0xf930,0x7748,0x5a82, /* 1.0e128 */ 0xbf3f,0x7f73,0x4fdd,0x7515 /* 1.0e256 */ }; static unsigned fpowtab[] = { 0x999a,0x9999,0x9999,0x3fb9, /* 1.0e-1 */ 0x147b,0x47ae,0x7ae1,0x3f84, /* 1.0e-2 */ 0x432d,0xeb1c,0x36e2,0x3f1a, /* 1.0e-4 */ 0x8c3a,0xe230,0x798e,0x3e45, /* 1.0e-8 */ 0x89bc,0x97d8,0xd2b2,0x3c9c, /* 1.0e-16 */ 0xas 732,0xd5a8,0xf623,0x3949, /* 1.0e-32 */ 0xa73c,0x44f4,0x0ffd,0x32a5, /* 1.0e-64 */ 0x979a,0xcf8c,0xba08,0x255b, /* 1.0e-128 */ 0x6f40,0x64ac,0x0628,0x0ac8 /* 1.0e-256 */ }; static double _scale(d, exp) double d; int exp; { register double *tblp; if (exp == 0) return(d); if (exp < 0){ tblp = (double *)fpowtab; exp = -exp; } else tblp = (double *)powtab; exp &= 0777; /* remove excess bits */ while (exp){ if (exp & 1) d *= *tblp; exp >>= 1; tblp++; } return(d); } stv atic double satof(c, width) int c; int width; { double d; int negative; double frac; int fcnt; int exp; int enegative; d = 0.0; negative = 0; frac = 0.0; fcnt = 0; exp = 0; enegative = 0; errflag = 1; if (width == 0) width = 1000; if (c == '-' || c == '+'){ /* rma */ if (--width <= 0) return(d); if (c == '-') negative = 1; c = inabyte(); } while (isdigit(c)){ d = d * 10.0 + c - '0'; errflag = 0; if (--width <= 0) return(d); c = inabyte(); } if (c == '.'){ if x  (--width <= 0) return(d); c = inabyte(); while (isdigit(c)){ errflag = 0; frac = frac * 10.0 + c - '0'; fcnt++; if (--width <= 0) break; c = inabyte(); } } if (c == 'e' || c == 'E'){ errflag = 1; if (--width <= 0) return(d); c = inabyte(); if (c == '-'){ if (--width <= 0) return(d); c = inabyte(); enegative = 1; } else if (c == '+'){ if (--width <= 0) return(d); c = inabyte(); } while (isdigit(c)){ errflag = 0; exp = exp * 10z  + c - '0'; if (--width <= 0) break; c = inabyte(); } if (enegative) exp = -exp; } if (width > 0 && c != EOF) (*Unfunc)(c, Inarg); d = _scale(d + _scale(frac, -fcnt), exp); if (negative) d = -d; return(d); } cp = va_arg(ap, char *); while (--width >= 0){ c = (*infunc)(inarg); if (c == EOF){ va_end(ap); return(ResultCount); } if (!suppress) *cp++ = c; } if (!suppress) ResultCount++; break; case '[': startp =$| -opena.cgar;licbtosclib-(jeğdjMOKm(0} /* Module opena.c V010EM01 === 11/24/87 * 11/24/87 rma - ensure file exists for "r+" mode * 09/14/87 rma - initial submittal * 08/18/87 kcj - handle "w+" mode * 06/17/87 rma - set errno; free bswa * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include extern int errno; < extern char *_openfd[]; extern char _kbdflag[]; char *malloc(); _open(filename, opt, args) char *filename; int opt; char *args; /* kcj */ { register int fd; char *bswa; for (fd = 0; fd < 16; fd++) if (_openfd[fd] == 0) break; if (fd >= 16){ errno = 2; return(-1); } bswa = malloc(130 + 1024); if (bswa == 0){ errno = 400; /* rma */ return(-1); } if (*args == 'w' && opt == 'm') /* if the mode for fopen is "w+", */ unlink(filename); /* let's delete the file H  kcj */ if (*args == 'r' && opt == 'm' && strcmp(filename,"[kbd]")){ /* ensure file exists 11/24/87 rma */ errno = OpenByteStream(bswa, filename, strlen(filename), 0, 0, 0x6d00 + 'r', bswa + 130, 1024); if (errno){ free(bswa); return(-1); } else CloseByteStream(bswa); } errno = OpenByteStream(bswa, filename, strlen(filename), 0, 0, 0x6d00 + opt, bswa + 130, 1024); if (errno){ free(bswa); return(-1); } _kbdflag[fd] = strcmp(filename, "[kbd]"); _openfd[fd] = bswa; T return(fd); } ` Wwritea.cgar;licbtosclib*VjedjMOKm\l /* Module writea.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include extern int errno; extern char *_openfd[]; _write(fd, buffer, len) int fd; char *buffer; int len; { int rcnt; int res; res = WriteBsRecord(_openfd[fd], bux ffer, len, &rcnt); if (res == 1 || res == 0) return(rcnt); errno = res; return(-1); }  atan.cgar;licbtosclib*je*djNOKm /* Module atan.c V010GM01 === 04/20/88 * 04/20/88 010G01 rma - rename common to commonq so can assemble * 09/14/87 010A01 rma - initial submittal * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #define HALFPI 1.570796326794896 #define PI 3.14159265358979323846 #defi ne MAXEXP 0x400 /* Maximum hardware exponent */ #define TWOSQRT3 0.267949192431122 #define A 0.732050807568877 #define SQRT3 1.732050807568877 #define P0 -0.136887688941919e2 #define P1 -0.205058551958616e2 #define P2 -0.849462403513206e1 #define P3 -0.837582993681500 #define Q0 0.410663066825757e2 #define Q1 0.861573495971302e2 #define Q2 0.595784361425973e2 #define Q3 0.150240011600285e2 double fabs(); static double commonq(f) double f; { static double a[4] = { 0.0, 0.523598775598298, 1.5 70796326794896, 1.047197551196597 }; int n; double g, pg, qg; f = fabs(f); if (f > 1){ f = 1/f; n = 2; } else n = 0; if (f > TWOSQRT3){ f = (((A * f - 0.5) - 0.5) + f) / (SQRT3 + f); n++; } if (fabs(f) > 1e-8){ g = f * f; pg = P0 + g * (P1 + g * (P2 + g * P3)); qg = Q0 + g * (Q1 + g * (Q2 + g * (Q3 + g))); f = f + f * ((g * pg) / qg); } if (n > 1) f = -f; return(a[n] + f); } double atan(x) double x; { double res; res = commonq(x); if (x < 0) res = -res; ret urn(res); } double atan2(v, u) double v; double u; { double res; int uexp, vexp; if (u == 0){ if (v == 0){ errno = EDOM; return(0.0); } else if (v < 0) return(-HALFPI); else return(HALFPI); } frexp(u, &uexp); frexp(v, &vexp); if (vexp - uexp > MAXEXP - 3){ if (v < 0) return(-HALFPI); else return(HALFPI); } if (v/u == 0.0) res = 0.0; else res = commonq(v / u); if (u < 0) res = PI - res; if (v < 0) res = -res; return(res); } ssG7   printfa.cgar;licbtosclib *jeJdjNOKm)̔ /* Module printfa.c V010GM01 === 04/08/88 * 04/08/88 010G01 rma - cast i%10 to (int)(i%10) * 12/29/87 010F01 rma - added %p format * 09/14/87 010A01 rma - initial submittal * 06/09/87 rma - fixed for %d abs() call (use temp) * 06/02/87 rma - fixed for 0x80000000L output * 05/29/87 rma - fixed for ww.00s string format * 05/26/87 rma - fixed for ww.pps string format * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS ؖ CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include #include #include #include extern char *ecvt(); extern char *fcvt(); static int Negflag; /* Negative sign flag appeared */ static int Posflag; /* Plus sign flag appeared */ static int Blnkflag; /* Blank flag appeared */ static int Pndflag; /* # flag appeared */ static int Zerof; /* Leading zeroes */ static i nt Width; /* Field width */ static int Precision; /* Precision */ static int (*Outfunc)(); static int *Outarg; static int Result; /* Result value */ static jmp_buf Exitbuf; /* For quick exit */ static outbyte(c) unsigned char c; { register int res; res = (*Outfunc)(c, Outarg); if (res == EOF){ Result = EOF; longjmp(Exitbuf, 1); } Result++; } _printf(outfunc, outarg, fmt, ap) int (*outfunc)(); int *outarg; register char *fmt; va_list ap; { unsigned long ui; int longf; long i;  int j; char obuf[12]; char *obp; int k; double d; int ptypefar; Outfunc = outfunc; Outarg = outarg; Result = 0; if (setjmp(Exitbuf)){ /* Quick results */ va_end(ap); return(Result); } while (*fmt){ if (*fmt != '%'){ outbyte(*fmt); fmt++; continue; } Negflag = 0; Posflag = 0; Blnkflag = 0; longf = 0; Zerof = 0; Pndflag = 0; Width = 0; k = -1; fmt++; for (;;){ if (*fmt == '-') Negflag++; else if (*fmt == '+') Posflag++; else if (*fmt  == ' ') Blnkflag++; else if (*fmt == '#') Pndflag++; else break; fmt++; } if (*fmt == '0'){ fmt++; if (!Negflag) /* leading 0's only if no - rma */ Zerof = 1; } if (isdigit(*fmt)){ Width = atoi(fmt); while (isdigit(*fmt)) fmt++; } else if (*fmt == '*'){ Width = va_arg(ap, unsigned); fmt++; } if (*fmt == '.'){ fmt++; k = 0; /* Precision being specified 5/29/87 rma */ if (isdigit(*fmt)){ k = atoi(fmt); while (isdigit(*fmt))  fmt++; } else if (*fmt == '*'){ k = va_arg(ap, unsigned); fmt++; } } obp = obuf + sizeof obuf; *--obp = 0; ptypefar = (sizeof(obp) != sizeof(k)); if (*fmt == 'l'){ fmt++; longf = 1; } else if (*fmt == 'N'){ fmt++; ptypefar = 0; } else if (*fmt == 'F'){ fmt++; ptypefar = 1; } switch (*fmt){ case 'p': case 'P': longf = ptypefar; case 'o': case 'u': case 'x': case 'X': if (longf) ui = va_arg(ap, unsigned long); else   ui = va_arg(ap, unsigned); case 'd': if (k == -1) Precision = 1; else Precision = k; if (Zerof) Precision = (Width <= 0 ? 1 : Width); break; case 'c': case 's': #ifdef f5_29_87 if (k == -1) Precision = 0; else #endif /* reset Precision later 5/29/87 rma */ Precision = k; break; #ifndef NOFLOAT case 'e': case 'f': case 'g': case 'E': case 'G': d = va_arg(ap, double); if (k == -1) Precision = 6; else Precision = k; if (d < 0){  j = 1; d = -d; } else j = 0; #endif } switch (*fmt){ case 'd': if (longf) i = va_arg(ap, long); else i = va_arg(ap, int); if (i < 0){ k = 1; i = -i; } else k = 0; while (i){ j = (int)(i%10); /* for abs() macro performance rma 6/9/87 */ *--obp = '0' + abs(j); /* rma 6/2/87 */ i /= 10; } if (k) k = '-'; else if (Posflag) k = '+'; else if (Blnkflag) k = ' '; else k = 0; if (k){ conditionalpad(1,  , obp); outbyte(k); } outstr(obp, '0'); break; case 'o': while (ui){ *--obp = '0' + (ui & 7); ui >>= 3; } if (Pndflag && *obp != '0') *--obp = '0'; outstr(obp, '0'); break; case 'u': while (ui){ *--obp = '0' + (ui % 10); ui /= 10; } outstr(obp, '0'); break; case 'x': case 'X': while (ui){ --obp; k = (int)ui & 0xf; if (k > 9){ if (*fmt == 'x') k += 'a' - 10; else k += 'A' - 10; } else 8  k += '0'; *obp = k; ui >>= 4; } if (Pndflag){ conditionalpad(2, obp); outbyte('0'); outbyte(*fmt); } outstr(obp, '0'); break; case 'p': case 'P': for (j=0; j<(ptypefar?8:4); j++){ if (j == 4) *--obp = ':'; --obp; k = (int)ui & 0xf; if (k > 9){ if (*fmt == 'p') k += 'a' - 10; else k += 'A' - 10; } else k += '0'; *obp = k; ui >>= 4; } outstr(obp, '0'); break; #ifndef NOFLOAT case 'f': D  fout(d, *fmt, j); break; case 'g': case 'G': ecvt(d, 1, &k, &ui); if (k > -4 && k <= (int)Precision){ if (k > 0) Precision -= k; fout(d, *fmt, j); break; } Precision--; case 'e': case 'E': eout(d, *fmt, j); break; #endif case 'c': if (!Negflag){ while (Width > 1){ Width--; outbyte(' '); } } Width--; outbyte(va_arg(ap, int)); while (Width > 0){ Width--; outbyte(' '); } break; case 's': obp = va_arg(ap,P  char *); k = strlen(obp); if (Precision > k || Precision < 0) /* 5/29/87 rma */ Precision = k; #ifdef f5_26_87 if (Precision != 0 && Precision < strlen(obp)){ for (i = 0; i < Precision; i++) outbyte(*obp++); } else #endif /* should always call outstr! rma 5/26/87 */ outstr(obp, ' '); break; case '%': outbyte('%'); break; default: return(-1); } fmt++; } va_end(ap); return(Result); } #ifndef NOFLOAT static fout(value, fmt, sign) double value; \  char fmt; int sign; { int decpt; int xsign; register char *dbuffer; register char *cp; int length; int i; dbuffer = fcvt(value, Precision, &decpt, &xsign); decpt--; if (fmt != 'f' && !Pndflag){ i = strlen(dbuffer); cp = dbuffer; if (i < decpt + Precision) cp += i; else if (Precision + decpt >= 0) cp += Precision + decpt + 1; while (cp > dbuffer && cp[-1] == '0') cp--; *cp = 0; i = (cp - dbuffer) - decpt; if (i <= 0) Precision = 0; else if (i <= Precision) Precisih on = i - 1; } length = Precision + 1; if (sign || Posflag || Blnkflag) length++; /* rma */ if (decpt > 0) length += decpt; if (Pndflag || Precision) length++; if (!Negflag && !Zerof){ /* rma */ while (Width > length){ outbyte(' '); Width--; } } if (sign) outbyte('-'); else if (Posflag) outbyte('+'); /* rma */ else if (Blnkflag) outbyte(' '); /* rma */ if (Zerof){ /* rma */ while (Width > length){ outbyte('0'); Width--; } } if (decpt < 0) outbyte('0'); elst e { while (decpt >= 0){ if (*dbuffer) outbyte(*dbuffer++); else outbyte('0'); decpt--; } } if (Pndflag || Precision) outbyte('.'); while (decpt < -1 && Precision){ outbyte('0'); Precision--; decpt++; } while (Precision > 0){ if (fmt != 'f' && *dbuffer == 0) break; Precision--; if (*dbuffer) outbyte(*dbuffer++); else outbyte('0'); } if (Negflag){ Width -= length; Width += Precision; while (Width > 0){ Width--; outbyte(' '); } } } sta tic eout(value, fmt, sign) double value; char fmt; int sign; { int decpt; int xsign; register char *dbuffer; int length; register char *cp; int exp; dbuffer = ecvt(value, Precision + 1, &decpt, &xsign); if (value == 0) exp = 0; else exp = decpt - 1; if (!Pndflag && (fmt == 'g' || fmt == 'G')){ cp = dbuffer + strlen(dbuffer); while (cp > dbuffer && cp[-1] == '0') --cp; *cp = 0; if ((cp - dbuffer) <= Precision) Precision = (cp - dbuffer) - 1; if ((cp - dbuffer) == 0){ Pre cision = 0; dbuffer[0] = '0'; dbuffer[1] = 0; sign = 0; exp = 0; } } length = Precision + 7; if (sign || Posflag || Blnkflag) length++; /* rma */ if (abs(exp) < 100) /* shrink for 2 digit exponent rma */ length--; if (!Negflag && !Zerof){ /* rma */ while (Width > length){ outbyte(' '); Width--; } } if (sign) outbyte('-'); else if (Posflag) outbyte('+'); /* rma */ else if (Blnkflag) outbyte(' '); /* rma */ if (Zerof){ /* rma */ while (Width > length){  outbyte('0'); Width--; } } outbyte(*dbuffer); dbuffer++; if (Pndflag || (Precision && *dbuffer)) outbyte('.'); while (*dbuffer && Precision){ outbyte(*dbuffer); dbuffer++; Precision--; } while (Precision > 0){ Precision--; outbyte('0'); } if (fmt == 'G') fmt = 'E'; else if (fmt == 'g') fmt = 'e'; outbyte(fmt); if (exp < 0){ outbyte('-'); exp = -exp; } else outbyte('+'); if (exp >= 100) /* three digit exponent rma */ { outbyte(exp / 100 + '0'); exp %= 10 0; } outbyte(exp / 10 + '0'); outbyte(exp % 10 + '0'); if (Negflag){ Width -= length; while (Width > 0){ Width--; outbyte(' '); } } } #endif static conditionalpad(num, string) int num; char *string; { int slen = num + strlen(string); if (slen < Precision) slen = Precision; if (!Negflag){ while (Width > slen){ outbyte(' '); Width--; } } Width -= num; Precision -= num; } /* * FUNCTION: outstr * * DESCRIPTION: * This function does output of a strng with justific ation * and blank padding. Negflag and Width determine the * justification and padding amount. */ static outstr(s, pfill) register char *s; char pfill; { int res; int slen, i; slen = strlen(s); if (!Negflag){ if (Precision && (pfill == ' ')) res = (Precisionslen ? Precision : slen); while (Width > res){ Width--; outbyte(' '); } } if (pfill == '0'){ while (Precision > slen){ outbyte(pfill); Precision--; Width --; } } for (i=(pfill==' ' ? Precision : slen); i; i--){ Width--; outbyte(*s++); } while (slen < Precision){ outbyte(pfill); Precision--; Width--; } if (Negflag || pfill==' '){ while (Width > 0){ Width--; outbyte(' '); } } } #endif case 'c': if (!Negflag){ while (Width > 1){ Width--; outbyte(' '); } } Width--; outbyte(va_arg(ap, int)); while (Width > 0){ Width--; outbyte(' '); } break; case 's': obp = va_arg(ap,ȿ Xinport.cgar;licbtosclibX*je`djNOKm /* Module inport.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ inport(port) int port; { asm mov dx,port asm in ax,dx } inportb(port) int port; { asm mov dx,port asm in al,dx asm xor ah,ah }   } tolower.cgar;licbtosclib}*'jeܟdjOOKm) /* Module tolower.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include tolower(c) int c; { if (isupper(c)) return(_tolower(c)); else return(c); } toupper(c) int c; { if (islower(c)) return(_toupper(c)); else return(c); }  F strcspn.cgar;licbtosclib,je~djOOKm$ /* Module strcspn.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ strspn(s1, s2) char *s1; char *s2; { register char *srchs2; int len; for (len = 0; *s1; s1++, len++){ for (srchs2 = s2; *srchs2; srchs2++) if (*s1 == *srchs2) break; if (*srchs2  == 0) break; } return(len); } strcspn(s1, s2) char *s1; char *s2; { register char *srchs2; int len; for (len = 0; *s1; s1++, len++) for (srchs2 = s2; *srchs2; srchs2++) if (*s1 == *srchs2) return(len); return(len); }  rand.cgar;licbtosclib,}jedjPOKm&( /* Module rand.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #define MULTIPLIER 0x015a4e35L #define INCREMENT 1 static long Seed = 1; void srand(seed) unsigned seed; { Seed = seed; } int rand() { Seed = MULTIPLIER * Seed + INCREMENT; return((int)(See4 d >> 16) & 0x7fff); } @ o ctype.cgar;licbtosclib ,jedjPOKm'L /* Module ctype.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include char _ctype[257] = { 0, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL|IS_SP, IS_SP|IS_CTL, IS_CTL, IS_SP|IS_CTL, IS_CTL, IS_CTL,X  IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_CTL, IS_SP, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, IS_DIG, IS_DIG, IS_DIG, IS_DIG, IS_DIG, IS_DIG, IS_DIG, IS_DIG, IS_DIG, IS_DIG, 0, 0, 0, 0, 0, 0, 0, IS_UPP|IS_HEX, IS_HEX|IS_UPP, IS_UPP|IS_HEX, IS_UPP|IS_HEX, IS_UPP|IS_HEX, IS_UPP|IS_HEX, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, d IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, IS_UPP, 0, 0, 0, 0, 0, 0, IS_LOW|IS_HEX, IS_HEX|IS_LOW, IS_LOW|IS_HEX, IS_LOW|IS_HEX, IS_LOW|IS_HEX, IS_LOW|IS_HEX, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, IS_LOW, 0, 0, 0, 0, IS_CTL }; p 9x outport.cgar;licbtosclibx,je؟djPOKm)| /* Module outport.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ void outport(port, val) int port; int val; { asm mov dx,port asm mov ax,val asm out dx,ax } void outportb(port, val) int port; char val; { asm mov dx,port asm mov al,val asm out dx,a l }  YlS asctime.cgar;licbtosclibS.ʆje\djQOKm /* Module asctime.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include static char *Weekday[7] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; static char *Months[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "O ct", "Nov", "Dec" }; char *asctime(tm) struct tm *tm; { static char a[26]; sprintf(a, "%s %s %2d %2d:%2.2d:%2.2d %4d\n", Weekday[tm->tm_wday], Months[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, tm->tm_year + 1900); return(a); }  *bungetc.cgar;licbtosclibb.jeȟdjQOKm( /* Module ungetc.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #undef ungetc ungetc(c, fp) int c; FILE *fp; { return(*--fp->_f_curp = c); }  creat.cgar;licbtosclib0je4djROKm: /* Module creat.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include extern int errno; /*ARGSUSED*/ creat(filename, protections) char *filename; int protections; { unlink(filename); errno = CreateFile(filename, strlen(filename), 0, 0, 0L);  if (errno) return(-1); return(open(filename, 2)); }  Jpoke.cgar;licbtosclibJ0jeUdjROKmG /* Module poke.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #undef poke #undef pokeb void poke(unsigned segment, unsigned offset, int value) { _ES = segment; * (unsigned *_es) offset = value; } void pokeb(unsigned segment, unsigned of fset, char value) { _ES = segment; * (char *_es) offset = value; }  +mem.cgar;licbtosclib+0݇jeßdjSOKm5($ /* Module mem.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ char *memcpy(dst, src, len) char *dst, *src; unsigned len; { movmem(src, dst, len); return(dst); } char *memset(s, c, n) char *s; char c; unsigned n; { setmem(s, n, c); return(s); } mem0 cmp(s1, s2, n) char *s1, *s2; unsigned n; { while (n > 0){ n--; if (*s1 < *s2) return(-1); else if (*s1 > *s2) return(1); s1++; s2++; } return(0); } char *memchr(s, c, n) char *s; char c; unsigned n; { while (n > 0){ if (*s == c) return(s); n--; s++; } return(0); } <  `strlen.cgar;licbtosclib2Pje!djSOKm:H /* Module strlen.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ strlen(cp) char *cp; { #if defined(__LARGE__) | defined(__HUGE__) asm les di,dword ptr cp #else asm mov di,cp asm mov ax,ds asm mov es,ax #endif asm mov al,0 asm mov cx,0ffffh asm cld asmT  repnz scasb asm mov ax,di asm sub ax,cp asm dec ax } ` 07a strpbrk.cgar;licbtoscliba2jeǟdjTOKm(l /* Module strpbrk.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ char *strpbrk(s1, s2) char *s1; char *s2; { register char *srchs2; while (*s1){ for (srchs2 = s2; *srchs2; srchs2++) if (*s1 == *srchs2) return(s1); s1++; } return(0); } x  qfopen.cgar;licbtosclibq2 jeӟdjTOKm (  /* Module fopen.c V010AM01 === 09/14/87 * 08/18/87 kcj - add support for "a+" mode, pass args to _open() for "w+" * 06/17/87 rma - set errno=218, process "x+" modes * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include FILE _files[IOFILES]; unsigned *_openfd[16]; char _  kbdflag[16]; void *malloc(); extern int errno; extern FILE *getfp(); FILE *fopen(filename, args) char *filename; char *args; { int access; register FILE *fp; if ((fp = getfp()) == 0) return(0); if (!parsargs(args, &access, &fp->_f_flags)){ errno = 218; /* invalid mode rma */ free(fp->_f_buffer); return(0); } fp->_f_fd = _open(filename, access, args); /* kcj */ if (fp->_f_fd < 0){ free(fp->_f_buffer); return(0); } fp->_f_flags |= _F_OPEN; if (strcmp(filename, "[kbd]") == 0)    fp->_f_flags |= _F_KBD; if ((fp->_f_flags & (_F_APND|_F_RDWR)) == /* start of mod kcj */ (_F_APND | _F_RDWR)) if (fseek(fp, 0L, 2) != 0){ free(fp->_f_buffer); return(0); } /* End of Mod kcj */ return(fp); } FILE *freopen(filename, args, fp) char *filename; char *args; FILE *fp; { int access; if (fclose(fp) == EOF) return(0); if (!parsargs(args, &access, &fp->_f_flags)) return(0); fp->_f_bsize = BUFSIZ; fp->_f_buffer = malloc(BUFSIZ); if (fp->  _f_buffer == 0){ return(0); } fp->_f_curp = fp->_f_buffer; fp->_f_endp = fp->_f_buffer; fp->_f_fd = _open(filename, access, args); /* kcj */ if (fp->_f_fd < 0){ free(fp->_f_buffer); return(0); } fp->_f_flags |= _F_OPEN; if (strcmp(filename, "[kbd]") == 0) fp->_f_flags |= _F_KBD; if ((fp->_f_flags & (_F_APND|_F_RDWR)) == /* start of mod kcj */ (_F_APND | _F_RDWR)) if (fseek(fp, 0L, 2) != 0){ free(fp->_f_buffer); return(0); } /* End of Mod kcj */   return(fp); } static parsargs(args, access, flags) register char *args; int *access; int *flags; { *flags = _F_WRIT|_F_BUF; if (*args == 'r'){ *flags = _F_READ|_F_BUF; } else if (*args != 'w' && *args != 'a') return(0); if (*args=='a') *flags |= _F_APND; if (args[1]=='+'){ *access = 'm'; *flags |= _F_RDWR; } else *access = *args; return(1); } static FILE *getfp() { register FILE *fp; for (fp = _files; fp < _files + IOFILES; fp++) if ((fp->_f_flags & _F_OPEN) == 0)   break; if (fp >= _files + IOFILES) return(0); fp->_f_bsize = BUFSIZ; fp->_f_buffer = malloc(BUFSIZ); if (fp->_f_buffer == 0){ return(0); } fp->_f_curp = fp->_f_buffer; fp->_f_endp = fp->_f_buffer; return(fp); }   !Cunlink.cgar;licbtosclibC4jeOdjUOKmY  !/* Module unlink.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include extern int errno; unlink(filename) char *filename; { int fd; int res; errno = OpenFile(&fd, filename, strlen(filename), 0, 0, 'mm'); if (errno != 0) return(-1); errn  !o = Delete(fd); if (errno != 0) return(-1); CloseFile(fd); return(0); }  "strcmp.cgar;licbtosclib4jedjUOKm& "/* Module strcmp.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ strcmp(str1, str2) char *str1, *str2; { #if defined(__LARGE__) | defined(__HUGE__) asm push ds asm lds si,dword ptr str1 asm les di,dword ptr str2 #else asm mov ax,ds asm mov es,ax asm mov  "si,str1 asm mov di,str2 #endif asm xor ax,ax asm mov cx,0ffffh asm mov dx,di asm cld asm repnz scasb asm mov cx,di asm sub cx,dx asm mov di,dx asm dec cx asm rep cmpsb asm jz done asm jg greater less: asm dec ax goto leave; greater: asm inc ax goto leave; done: asm cmp [si],al asm jne greater leave: #if defined(__LARGE__) | defined(__HUGE__) asm pop ds #endif }  #cL lsearch.cgar;licbtosclib6ujedjUOKm&  #/* Module lsearch.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ char *lsearch(key, base, nelemp, width, fcmp) char *key; register char *base; int *nelemp; int width; int (*fcmp)(); { int nelem, j; nelem = *nelemp; while (nelem > 0){ j = (*fcmp)(key, #, base); if (j == 0) return(base); base += width; nelem--; } (*nelemp)++; movmem(key, base, width); return(base); } 8 $Oecvt.cgar;licbtosclib6jedjVOKmv 'D $/* Module ecvt.c V010AM01 === 09/14/87 * 06/03/87 rma - fix for .2e of 9.999e22 (was 1.00e22) * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #define CVTBUF 128 static unsigned powtab[] = { 0x0000,0x0000,0x0000,0x4024, /* 1.0e1 */ 0x0000,0x0000,0x0000,0x4059, /* 1.0e2 */ 0x0000,P $0x0000,0x8800,0x40c3, /* 1.0e4 */ 0x0000,0x0000,0xd784,0x4197, /* 1.0e8 */ 0x8000,0x37e0,0xc379,0x4341, /* 1.0e16 */ 0x6e17,0xb505,0xb8b5,0x4693, /* 1.0e32 */ 0xf9f6,0xe93f,0x4f03,0x4d38, /* 1.0e64 */ 0x1d33,0xf930,0x7748,0x5a82, /* 1.0e128 */ 0xbf3f,0x7f73,0x4fdd,0x7515 /* 1.0e256 */ }; static unsigned fpowtab[] = { 0x999a,0x9999,0x9999,0x3fb9, /* 1.0e-1 */ 0x147b,0x47ae,0x7ae1,0x3f84, /* 1.0e-2 */ 0x432d,0xeb1c,0x36e2,0x3f1a, /* 1.0e-4 */ 0x8c3a,0xe230,0x798e,0x3e45, /* 1.0e-8 */ 0\ $x89bc,0x97d8,0xd2b2,0x3c9c, /* 1.0e-16 */ 0xa732,0xd5a8,0xf623,0x3949, /* 1.0e-32 */ 0xa73c,0x44f4,0x0ffd,0x32a5, /* 1.0e-64 */ 0x979a,0xcf8c,0xba08,0x255b, /* 1.0e-128 */ 0x6f40,0x64ac,0x0628,0x0ac8 /* 1.0e-256 */ }; static double *Dpowg10 = (double *) powtab; static double *Dpowl10 = (double *) fpowtab; static char Dbuffer[CVTBUF + 1]; /* * Round to digits in decimal. */ static double decround(x, digits) double x; unsigned digits; { int i; double *dp; double d; if (digits > 16 || xh  $ == 0) return(x); d = 1.0 / 2.0; for (i = 16, dp = Dpowl10 + 4; dp >= Dpowl10; i >>= 1, dp--){ if (digits >= i){ d *= *dp; digits -= i; } } return(x + d); } static double dfrexp(d, expp) double d; register int *expp; { int i; if (d == 0.0){ *expp = 0; return(d); } *expp = 1; if (d >= 1.0){ for (i = 8; i >= 0; i--) if (d >= Dpowg10[i]){ d *= Dpowl10[i]; *expp += 1 << i; } } else { for (i = 8; i >= 0; i--) if (d <= Dpowl10[i]){ d *= Dpowg10[i]; t" $ *expp -= 1 << i; } if (d < 1){ d *= 10.0; (*expp)--; } } return(d); } static cvtcomm(value, ndigit, decpt) double value; int ndigit; int *decpt; { int over; char *cp; if (value == 0.0){ *decpt = 0; Dbuffer[0] = '0'; Dbuffer[1] = 0; } if (ndigit > CVTBUF) ndigit = CVTBUF; for (cp = Dbuffer, over = 16; over > 0 && ndigit > 0; over--, ndigit--, cp++){ int i; i = value; *cp = i + '0'; value -= i; value *= 10.0; } for (; ndigit > 0; ndigit--, cp++) *$ $cp = '0'; *cp = 0; } char *fcvt(value, ndigit, decpt, sign) double value; int ndigit; int *decpt; int *sign; { if (value < 0){ *sign = 1; value = -value; } else *sign = 0; value = dfrexp(decround(value, ndigit), decpt); cvtcomm(value, ndigit + *decpt, decpt); return(Dbuffer); } char *ecvt(value, ndigit, decpt, sign) double value; int ndigit; int *decpt; int *sign; { int i; if (value < 0){ *sign = 1; value = -value; } else *sign = 0; value = dfrexp(value, decpt); cvt& $comm(dfrexp(decround(value, ndigit - 1), &i), ndigit, decpt); *decpt += (i-1); /* 6/3/87 rma */ return(Dbuffer); } ( %fread.cgar;licbtosclib6je6?mVOKm') %/* * Module: fread.c V011IM01 === 06/13/90 * * 06/13/90 011I01 sbw - Size-related variables now unsigned for > 32K * * * PROPRIETARY PROGRAM MATERIAL * * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1990 UNISYS CORPORATION */ #include size_t fread( char * ptr, size_t psize, size_t nitems, FILE *fp ) { /* psi+ %ze, nitems, ncnt, i: all unsigned. 011I01 sbw */ size_t ncnt ; /* 011I01 sbw */ size_t i ; /* 011I01 sbw */ int c ; for ( ncnt = 0 ; ncnt < nitems ; ncnt++ ) { for ( i = 0 ; i < psize ; i++ ) { c = getc( fp ) ; if ( c == EOF ) break ; *ptr++ = c ; } if ( i < psize ) break ; } if ( ferror( fp ) && ncnt == nitems ) return( ncnt - 1 ) ; return( ncnt ) ; } - &Elctime.cgar;licbtosclibl6jeϟdjWOKm(. &/* Module ctime.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include static char Days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; /*ARGSUSED*/ struct tm *gmtime(clock) time_t *clock; { return(0); }0 & struct tm *localtime(clock) time_t *clock; { struct expandedDate s; static struct tm tm; int i; ExpandDateTime(*clock, &s); tm.tm_sec = s.second; tm.tm_min = s.minute; tm.tm_year = s.year - 1900; tm.tm_isdst = -1; tm.tm_hour = s.hour; /* Compute day of year from months */ for (i = 0, tm.tm_yday = s.monthDay; i < s.month; i++) tm.tm_yday += Days[i]; /* Check for leap year */ if (s.month >= 2 && (s.year & 3) == 0) tm.tm_yday++; tm.tm_wday = s.weekDay; tm.tm_mon = s.month; tm.2 &tm_mday = s.monthDay; return(&tm); } char *ctime(clock) time_t *clock; { char *asctime(); return(asctime(localtime(clock))); } 4 ')merrno.cgar;licbtosclib8jedjWOKmF%5 '/* Module merrno.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ int errno; 8 ( asin.cgar;licbtosclib 8jedjWOKm'9 (/* Module asin.c V010BM01 === 09/25/87 * 09/25/87 010B01 rma - clear errno if no error * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #define P1 -0.273684945241642e2 #define P2 0.572082278778917e2 #define P3 -0.396888629975048e2 #define P4 0.101525222338064e2 #defi; (ne P5 -0.696745734473506 #define Q0 -0.164210967144985e3 #define Q1 0.417144302482604e3 #define Q2 -0.381863033617501e3 #define Q3 0.150952708410306e3 #define Q4 -0.238238591536702e2 #define Q5 1.0 double fabs(); double sqrt(); double ldexp(); static int i; static double a[2] = { 0.0, 0.785398163397448 }; static double b[2] = { 1.570796326794896, 0.785398163397448 }; static double asincos(x, flag) double x; int flag; { double y; double pg, qg; double g; y = fabs(x); if (y > .5){ if (y > 1.0){ (= ( errno = EDOM; return(0.0); } errno = 0; /* rma */ i = 1 - flag; g = ldexp((0.5 - y) + 0.5, -1); y = ldexp(-sqrt(g), 1); } else { i = flag; if (y < 1e-8){ return(y); } else g = y * y; } pg = g * (P1 + g * (P2 + g * (P3 + g * (P4 + g * P5)))); qg = Q0 + g * (Q1 + g * (Q2 + g * (Q3 + g * (Q4 + g)))); return(y + y * (pg / qg)); } double asin(x) double x; { double res; res = asincos(x, 0); res = a[i] + (a[i] + res); if (errno == EDOM) return(0.0); if (x < 0) 4? (res = -res; return(res); } double acos(x) double x; { double res; res = asincos(x, 1); if (errno == EDOM) return(0.0); if (x < 0) return(b[i] + (b[i] + res)); else return(a[i] + (a[i] - res)); } .y...1.S..6.. ..k5s]sss9s_ssssKs{sssDsuss^shsssXl(;i(JH2RFsssG71@A )/ segread.cgar;licbtosclib/8jeƟdjXOKm(LB )/* Module segread.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include segread(segp) struct UREGS *segp; { #if defined(__LARGE__) | defined(__HUGE__) asm push es asm les si,dword ptr segp asm mov es:.cs[si],cs asm mov es:.ss[si],ss asm mov XD )es:.ds[si],ds asm pop es:.es[si] #else asm mov si,segp asm mov .cs[si],cs asm mov .ss[si],ss asm mov .ds[si],ds asm mov .es[si],es #endif } dF *Hfabs.cgar;licbtosclib:sjedjXOKm&pG */* Module fabs.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ double fabs(x) double x; { register int *ip; ip = (int *)&x; ip[3] &= 0x7fff; return(x); } |I +wexp.cgar;licbtosclib<(je%djYOKmJ +/* Module exp.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ /* Modified exp courtesy of John Levine */ #include #include extern int _8087; static unsigned uINFINITY[] = { 0x0000, 0x0000, 0x0000, 0x7ff0 }; #define INFINITY ( *(doubleL + *)uINFINITY ) static unsigned uHALF[] = { 0x0000, 0x0000, 0x0000, 0x3fe0 }; #define HALF ( *(double *)uHALF ) static unsigned uC1[] = { 0x0000, 0x0000, 0x3000, 0x3fe6 }; static unsigned uC2[] = { 0x0ca8, 0x5c61, 0xd010, 0xbf2b }; static unsigned uP0[] = { 0x0000, 0x0000, 0x0000, 0x3fd0 }; static unsigned uP1[] = { 0xf6e0, 0x6fb3, 0x70e4, 0x3f7c }; static unsigned uP2[] = { 0xdc1c, 0x6f58, 0x52a4, 0x3ef1 }; static unsigned uQ1[] = { 0x51b3, 0x7142, 0x718e, 0x3fac }; static unsigned uQ2[] = { 0x3809, N +0x6fde, 0x3f99, 0x3f40 }; static unsigned uR0[] = { 0x82fe, 0x652b, 0x1547, 0x3ff7 }; #define C1 ( *(double *)uC1 ) /* 0.693359375 (355.0/512.0)*/ #define C2 ( *(double *)uC2 ) /* -2.121944400546905827679e-4 */ #define P0 ( *(double *)uP0 ) /* 0.249999999999999993 */ #define P1 ( *(double *)uP1 ) /* 0.6943600015117929e-2 */ #define P2 ( *(double *)uP2 ) /* 0.165203300268279e-4 */ #define Q0 HALF #define Q1 ( *(double *)uQ1 ) /* 0.55553866696900119e-1 */ #define Q2 ( *(double *)uQ2 ) /* P +0.495862884905441e-3 */ #define R0 ( *(double *)uR0 ) /* 1.44269504088896 */ #define BIGX 500.0 #define SMALLX -500.0 #define EPS 1e-300 double exp(x) double x; { register int n; double g, x1, xn; double gpz, qz, z; if (x > BIGX){ errno = ERANGE; return(INFINITY); } if (x < SMALLX){ errno = ERANGE; return(0.0); } if (fabs(x) < EPS) return(1.0); xn = floor(x * R0 + HALF); n = xn; x1 = floor(x); #define noguard 1 #if noguard g = ((x1 - xn * C1) + (x - x1)) - xn * C2; #else g = R +(x1 - xn * C1) - xn * C2; #endif z = g * g; gpz = ((P2 * z + P1) * z + P0) * g; qz = (Q2 * z + Q1) * z + Q0; x = HALF + gpz / (qz - gpz); return(ldexp(x, n + 1)); } T ,peek.cgar;licbtosclib<Fje(djYOKm2U ,/* Module peek.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #undef peek #undef peekb int peek(unsigned segment, unsigned offset) { _ES = segment; return(* (int *_es) offset); } int peekb(unsigned segment, unsigned offset) { _ES = seW ,gment; return(* (unsigned char *_es) offset); } Y -strcpy.cgar;licbtosclib<je6?mZOKmZ -/* * Module: strcpy.c V011IM01 === 06/13/90 * * 06/13/90 011I01 sbw - strncpy(): Replace strlen() call (protection * violation if no null); return 0 if zero length * specified. * * * PROPRIETARY PROGRAM MATERIAL * * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1990 UNISYS CORPORATION */ #include ] - char *strcpy( char *dest, char *src ) { movmem( src, dest, strlen( src ) + 1 ) ; return( dest ) ; } char *strncpy( char *dest, char *src, size_t len ) { size_t slen ; char *ssrc ; /* Max strlen and zero len check ... 011I01 sbw */ if ( len ) { for ( ssrc = src, slen = 0 ; *ssrc && slen < len ; ssrc++, slen++ ) { ; } movmem( src, dest, slen ) ; if ( slen < len ) setmem( dest + slen, len - slen, 0 ) ; } return( dest ) ; }  _ .Mceil.cgar;licbtosclibM<цjeXdjZOKmy` ./* Module ceil.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ double ceil(x) double x; { int exp; register int *ip; int incr; if (x == 0) return(0); ip = (int *)&x; exp = ((ip[3] >> 4) & 0x7ff) - 0x3ff; if (exp < 0){ /* number magnitude less than 1$b . */ if (x < 0) x = 0.0; else x = 1.0; } else { if (exp < 52){ incr = 0; for (exp = 52 - exp; exp >= 16; exp -= 16){ if (*ip) incr = 1; *ip++ = 0; } exp = *ip & ((~0) << exp); if (exp != *ip) incr = 1; *ip = exp; if (incr && x > 0) x += 1.0; } } return(x); } double floor(x) double x; { return(-ceil(-x)); } 0d /8atoi.cgar;licbtosclib<̆jetdj[OKm" #define DIGIT(x) (isdigit(x) ? (x) - '0' : \ islower(x) ? (x) + 10 - 'a' : (x) + 10 - 'A') #define MBASE ('z' - 'a' + 1 + 10) long strtol(str, ptr, base) register char *str; chHg /ar **ptr; register int base; { register long val; register int c; int xx, neg = 0; if (ptr != (char **)0) *ptr = str; /* in case no number is formed */ if (base < 0 || base > MBASE) return (0); /* base is invalid -- should be a fatal error */ if (!isalnum(c = *str)) { while (isspace(c)) c = *++str; switch (c) { case '-': neg++; case '+': /* fall-through */ c = *++str; } } if (base == 0) if (c != '0') base = 10; else if (str[1] == 'x' || str[1] == 'X') base = 16; eTi /lse base = 8; /* * for any base > 10, the digits incrementally following * 9 are assumed to be "abc...z" or "ABC...Z" */ if (!isalnum(c) || (xx = DIGIT(c)) >= base) return (0); /* no number formed */ if (base == 16 && c == '0' && isxdigit(str[2]) && (str[1] == 'x' || str[1] == 'X')) c = *(str += 2); /* skip over leading "0x" or "0X" */ for (val = -DIGIT(c); isalnum(c = *++str) && (xx = DIGIT(c)) < base; ) /* accumulate neg avoids surprises near MAXLONG */ val = base * val - xx; if`k / (ptr != (char **)0) *ptr = str; return (neg ? val : -val); } long atol(char *nptr) { return(strtol(nptr,(char **)0,10)); } int atoi(nptr) char *nptr; { return((int)strtol(nptr,(char **)0,10)); } lm 0pow.cgar;licbtosclib>Hje7?m[OKm xn 0/* * Module: pow.c V011IM01 === 06/13/90 * * 06/13/90 011I01 sbw - NOTICE: * * When re-creating the libraries with -f for use * with an 80x87 or the Math Server, DO NOT recompile * log.c, pow.c, or sqrt.c. These three modules * already have 80x87 code in the form of "asm db ..." * statements. The remaining code in these modules * will cause the generation of inline 80x87 op codes * which the Ctos Assembler cannot recognize. The * result is a BAD object filep 0 (emitted by the Assembler * even if errors occur) and a BAD run file." * * 04/18/88 010G01 rma - make work with any prolog options * 01/07/88 010F01 rma - use 8087 if present * 10/02/87 010C01 rma - fix for x=-1.0, EDOM * * PROPRIETARY PROGRAM MATERIAL * * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1990 UNISYS CORPr 0ORATION */ /* New pow routine with modifications courtesy John Levine. */ #include #include #include extern _8087; double pow(x, y) double x; double y; { double dtemp; /* must be first 4/18/88 rma */ register int sign = 0; register int iy = (int)y; /* rma */ unsigned long ly; errno = 0; /* Special case raising to a small integer power -- Arye. */ if (y == (double)iy){ _DX = iy; /* need if option -r used */ if (_8087){ dtemp = x; asm db 9bh,0d9h,0e8t 0h ;/* fld1 */ asm db 9bh,0ddh,46h,0f8h ;/* fld qword ptr dtemp */ asm test dx, 08000h asm jz posarg asm db 9bh,0d9h,0e8h ;/* fld1 */ asm db 9bh,0deh,0f1h ;/* fdivr */ asm neg dx posarg: asm test dx, dx asm jz done looptop: asm shr dx, 1 asm jnc nobit asm db 09bh,0dch,0c9h ;/* fmul st(1),st(0) mul y by powr of x */ nobit: asm test dx, dx asm jz done asm db 09bh,0d8h,0c8h ;/* fmul st,st(0) square x */ asm jmp short looptop done: asm db 09bh,0ddh,0d8h ;/*v 0 fstp st(0) */ asm db 09bh,0ddh,05eh,0f8h ;/* fstp qword ptr dtemp */ asm db 09bh ;/* fwait */ return(_DX<0?1.0/dtemp:dtemp); } if (iy < 0){ x = 1/x; iy = -iy; } y = 1.0; if (!iy) goto done2; looptop2: iy >>= 1; asm jnc nobit2 y *= x; nobit2: if (!iy) goto done2; x *= x; asm jmp short looptop2 done2: return (y); } if (x == 1.0) return(1.0); if (x < 0){ ly = (unsigned long)y; if ((double)ly == y){ if (ly & 1) sign = 1; x = -x; if (xx 0 == 1.0){ if (sign) return (-1.0); else return (1.0); } } else{ errno = EDOM; return (-HUGE_VAL); } } x = exp(y * log(x)); if (sign) x = -x; return(x); } z 1_strchr.cgar;licbtosclib>jeDdj\OKm{ 1/* Module strchr.c V010CM01 === 09/29/87 * 09/29/87 010C01 rma - fix for strchr(s,'\0') call * 09/14/87 010A01 rma - intial submittal * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ char *strchr(s, c) register char *s; char c; { while (*s){ if (*s == c) return(s); s++; } } 1 return(c ? 0 : s); /* 09/29/87 */ } char *strrchr(s, c) char *s; char c; { register char *ss; for (ss = s + strlen(s); ss > s; ss--) if (*ss == c) return(ss); return(*ss == c ? ss : 0); }  /O  p ` p0_ @ 0@/`P0%@&O`,,O--// 01?`;<=/>?O6BPx 2[ sprintf.cgar;licbtosclib>jedj\OKm' 2/* Module sprintf.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include #include #include static putbyte(c, bufp) int c; char **bufp; { register char *buf; buf = *bufp; *buf++ = c; *buf = 0; *bufp = 2 buf; return(c); } sprintf(char *buffer, char *fmt, ...) { va_list ap; va_start(ap, fmt); *buffer = 0; return(_printf(putbyte, &buffer, fmt, ap)); } vsprintf(char *buffer, char *fmt, va_list ap) { *buffer = 0; return(_printf(putbyte, &buffer, fmt, ap)); }  3v,modf.cgar;licbtosclib,>߇jeğdj\OKm( 3/* Module modf.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include double modf(x, ipart) double x; double *ipart; /* Integer part */ { double floor(); if (x > 0) *ipart = floor(x); else *ipart = ceil(x); return(x - *ipart); }   4sfseek.cgar;licbtosclibs>jeԟdj]OKm), 4/* Module fseek.c V010AM01 === 09/14/87 * 09/08/87 rma - adjust a for data in buffer * 08/24/87 rma - move GetBsLfa call before fflush else fp moved to EOF * 08/21/87 kcj - add _fseekeof() to support "a" and "a+" I/O modes * 08/18/87 kcj - reset _f_curp so fflush() won't flush old data * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNAT8 4IONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include extern int errno; extern char *_openfd[]; fseek(fp, offset, whence) FILE *fp; long offset; int whence; { int i; char *bswa; long a; bswa = _openfd[fileno(fp)]; i = GetBsLfa(bswa, &a); if (i){ errno = i; return(EOF); } /* rma */ if (fp->_f_flags & _F_IN && fp->_f_buffer) /* fix for relative currpos */ a -= fp->_f_endp - fp->_f_curp; fflush(fp); if (ferror(fp)) return(EOF); fp->_f_flagsD 4 &= ~(_F_OUT|_F_IN); fp->_f_endp = fp->_f_buffer; fp->_f_curp = fp->_f_buffer; /* 8/18/87 kcj */ if (whence == 1){ offset += a; } else if (whence == 2){ return(_fseekeof(fp, offset)); /* 8/21/87 kcj */ } i = SetBsLfa(bswa, offset); if (i){ errno = i; return(EOF); } else return(0); } _fseekeof(fp, offset) /* 8/21/87 kcj */ FILE *fp; long offset; { int i; char *bswa; long a; bswa = _openfd[fileno(fp)]; a = 0xffffffffL; i = SetBsLfa(bswa, a); if (i){ errno = i; returnP 4(EOF); } i = GetBsLfa(bswa, &a); if (i){ errno = i; return(EOF); } offset += a; i = SetBsLfa(bswa, offset); if (i){ errno = i; return(EOF); } else return(0); } \ 5 longjmp.cgar;licbtosclib@:jedj]OKm%h 5/* Module longjmp.c V010GM01 === 04/15/88 * 04/15/88 010G01 rma - fix setjmp() for any prolog options * 09/14/87 010A01 rma - initial submittal * 08/24/87 rma - save/restore ds for HUGE * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include "setjmp.h" void longjmp(jmpb, retval) jmpt 5_buf jmpb; int retval; { if (retval == 0) retval = 1; asm mov ax,retval #if defined(__LARGE__) || defined(__HUGE__) asm les si,dword ptr jmpb asm mov bp,es:[si.j_frame] asm mov sp,es:[si.j_sp] asm push es:[si.j_cs] asm push es:[si.j_ret] #if defined __HUGE__ asm mov ds,es:[si.j_ds] #endif asm mov di,es:[si.j_regv2] asm mov si,es:[si.j_regv1] asm db 0cbh #else asm mov si,jmpb asm mov bp,[si.j_frame] asm mov sp,[si.j_sp] #ifdef __MEDIUM__ asm push [si.j_cs] asm push [si.j_ret] #else asm m 5ov bx,[si.j_ret] #endif asm mov di,[si.j_regv2] asm mov si,[si.j_regv1] #ifdef __MEDIUM__ asm db 0cbh #else asm jmp bx #endif #endif } setjmp(jmpb) jmp_buf jmpb; { asm push di asm lea di,word ptr jmpb #if defined (__SMALL__) asm mov bx,ss:[di-2] /* IP */ #else asm mov ax,ss:[di-2] /* CS */ asm mov bx,ss:[di-4] /* IP */ #if defined(__HUGE__) asm mov cx,[bp+2] /* DS */ #endif #endif #if defined(__LARGE__) | defined(__HUGE__) asm les di,dword ptr jmpb #define ADDR es:[di #else asm mov di,jmp 5b #define ADDR [di #endif asm pop ADDR.j_regv2] asm mov ADDR.j_ret],bx #ifndef __SMALL__ asm mov ADDR.j_cs],ax #ifdef __HUGE__ asm mov ADDR.j_ds],cx #endif #endif asm lea ax,jmpb asm mov ADDR.j_sp],ax asm mov cx,[bp] asm mov ADDR.j_frame],cx asm mov ADDR.j_regv1],si return(0); } s]sss9s_ssssKs{sssDsuss^shsssXl(;i(JH2RFsssG7 6 strncmp.cgar;licbtosclib@Rjez int strncmp( char *str1, char 6 *str2, size_t len ) { asm xor ax, ax asm mov cx, len /* if ( len == 0 ) return( 0 ) */ asm jcxz exit #if defined( __LARGE__ ) asm push ds /* A huge model compile will push ds as part of the */ /* function entry code. 011I01 sbw */ #endif #if defined ( __LARGE__ ) || defined( __HUGE__ ) asm lds si, dword ptr str1 asm les di, dword ptr str2 #else asm mov ax, ds asm mov es, ax asm mov si, str1 asm mov di, str2 #endif asm mov dx, di asm xor ax, ax  6/* 011I01 sbw CX contains the input 'len' */ /* Don't compare against 0xffff, as before, */ /* because of possible protect violation if */ /* no null byte. */ asm cld asm repnz scasb /* Only look for a null byte in one array. */ /* A null in the other will show up as a */ /* miscompare. */ asm jnz nonull asm dec di /* di needs to point just beyond the last */ /* non-null char */ nȡ 6onull: asm mov cx, di /* Final address minus Initial address */ asm sub cx, dx asm jcxz done asm mov di, dx asm cmp cx, len asm jae shortcmp asm rep cmpsb asm jz done asm jg greater less: asm dec ax goto leave ; greater: asm inc ax goto leave ; shortcmp: asm mov cx, len asm rep cmpsb asm jz leave asm jg greater asm dec ax asm jmp short leave done: asm cmp [si], al asm jne greater leave: #if defined( __LARGE__ ) asm pop ds #endif ԣ 6 exit: } 'u'''''(((( ({((d)((17EF+` e Q h " N  D `vrp&"g;is w/ !M""$+$-$9$%)%:%%%%& &&&i&t&&6'T'r'''(((())$)1);)O)b)d))HNTZ`flrx~ &,28>DJP 7eindex.cgar;licbtosclibeBjejdj^OKm  7/* Module index.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ rindex(s, t) char *s; char *t; { int i, j, k; for (i = strlen(s) - strlen(t); i >= 0; i--){ for (j = i, k = 0; t[k] && s[j] == t[k]; j++, k++) ; if (t[k] == 0) return(i); } return 7(-1); } index(s, t) char *s; char *t; { int i, j, k; for (i = 0; s[i]; i++){ for (j = i, k = 0; t[k] && s[j] == t[k]; j++, k++) ; if (t[k] == 0) return(i); } return(-1); }  8Ίofilbuf.cgar;licbtoscliboBjesdj_OKm2" 8/* Module filbuf.c V010AM01 === 09/14/87 * 08/17/87 kcj - more fixes for fopen "+" modes * 07/07/87 rma - fixes for fopen "+" modes * 06/18/87 rma - fix for key press * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include _filbuf(fp) FILE *fp; { int c; if ((f 8p->_f_flags & (_F_READ|_F_OPEN|_F_ERR|_F_OUT)) != (_F_READ|_F_OPEN)){ fp->_f_flags |= _F_ERR; return(EOF); } /* Each read clears the EOF indicator - it may be reset */ fp->_f_flags &= ~_F_EOF; fp->_f_flags |= _F_IN; if (fp->_f_flags & _F_TERM){ register FILE *ifp; for (ifp = _files; ifp < _files + SYS_OPEN; ifp++) if (ifp->_f_flags & _F_TERM) fflush(ifp); } c = _read(fp->_f_fd, fp->_f_buffer, fp->_f_bsize); if (c <= 0){ if (!(fp->_f_flags & _F_KBD)) { /* rma */ ( 8 fp->_f_flags |= (c < 0) ? _F_ERR : _F_EOF; fp->_f_curp = fp->_f_buffer; /* kcj */ fp->_f_endp = fp->_f_buffer; /* kcj */ } else fp->_f_flags |= _F_EOF; fp->_f_flags &= ~_F_IN; return(EOF); } fp->_f_curp = fp->_f_buffer; fp->_f_endp = fp->_f_buffer + c; return(*fp->_f_curp++); } 4 9ߵmovmem.cgar;licbtosclibDBjedj_OKm@ 9/* Module movmem.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ void movmem(src, dst, len) register char *src; char *dst; int len; { asm cld if (src < dst){ src += len - 1; dst += len - 1; asm std } #if defined(__LARGE__) | defined(__HUGE__) asmL 9 push ds asm lds si,dword ptr src asm les di,dword ptr dst #else asm mov si,src asm mov ax,ds asm mov es,ax asm mov di,dst #endif asm mov cx,len asm rep movsb asm cld #if defined(__LARGE__) | defined(__HUGE__) asm pop ds #endif } void setmem(addr, len, val) char *addr; int len; char val; { #if defined(__LARGE__) | defined(__HUGE__) asm les di,dword ptr addr #else asm mov di,addr asm mov ax,ds asm mov es,ax #endif asm mov cx,len asm mov al,val asm cld asm rep stosb } X :fgetc.cgar;licbtosclibD/jedj_OKmwd :/* Module fgetc.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include fgetc(FILE *fp) { return(getc(fp)); } p ;eqsort.cgar;licbtosclibDje= 2){ Ewidth = ewidth; Fcmp = fcmp; iqsort(dtable, dtable + (nitems - 1) * ewidth); } } static iqsort(pivot, endp) char *pivot; char *endp; { register char *jp, *kp; jp = pivot + Ewidth; kp = endp; while (jp < kp){ while (jp < kp && (*Fcmp)(jp, pivot) < 1) jp += Ewidth; while (jp <= kp && (*Fcmp)(pivot, kp) < 1) kp -= Ewidth; if (jp < kp){ swapstr(jp, kp); jp += E ;width; kp -= Ewidth; } } if ((*Fcmp)(pivot, kp) > 0) swapstr(pivot, kp); if (kp > pivot) kp -= Ewidth; if (pivot < kp) iqsort(pivot, kp); if (jp < endp) iqsort(jp, endp); } static swapstr(s1, s2) register char *s1, *s2; { int len; int c; for (len = Ewidth; len > 0; len--, s1++, s2++){ c = *s1; *s1 = *s2; *s2 = c; } }  <Etfwrite.cgar;licbtosclibtDje7?m`OKm) </* * Module: fwrite.c V011IM01 === 06/13/90 * * 06/13/90 011I01 sbw - Size-related variables now unsigned for > 32K * * * PROPRIETARY PROGRAM MATERIAL * * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1990 UNISYS CORPORATION */ #include size_t fwrite( char * ptr, size_t psize, size_t nitems, FILE *fp ) { /* p <size, nitems, ncnt, i: all unsigned. 011I01 sbw/de */ size_t ncnt ; /* 011I01 sbw */ size_t i ; /* 011I01 sbw */ int c ; for ( ncnt = 0 ; ncnt < nitems ; ncnt++ ) { for ( i = 0 ; i < psize ; i++ ) { c = putc( *ptr, fp ) ; if ( c == EOF ) break ; ptr++ ; } if ( i < psize ) break ; } if ( ferror( fp ) && ncnt == nitems ) return( ncnt - 1 ) ; return( ncnt ) ; }  =hsqrt.cgar;licbtosclibFLje6?maOKm =/* * Module: sqrt.c V011IM01 === 06/13/90 * * 06/13/90 011I01 sbw - NOTICE: * * When re-creating the libraries with -f for use * with an 80x87 or the Math Server, DO NOT recompile * log.c, pow.c, or sqrt.c. These three modules * already have 80x87 code in the form of "asm db ..." * statements. The remaining code in these modules * will cause the generation of inline 80x87 op codes * which the Ctos Assembler cannot recognize. The * result is a BAD object fil =e (emitted by the Assembler * even if errors occur) and a BAD run file." * * 04/18/88 010G01 rma - make work with any prolog options * 01/07/88 010F01 rma - use 8087 if present * * PROPRIETARY PROGRAM MATERIAL * * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1990 UNISYS CORPORATION */ /* * New sqrt with modification =s by John Levine */ #include #include extern _8087; typedef union { unsigned u[4]; double d; } DUBBLE; static unsigned halfsqrt2[] = /* .70710678118654752440 */ { 0x3bcd, 0x667f, 0xa09e, 0x3fe6 /* sqrt(2)/2 from 80287 -- blue */ }; static unsigned minus_infinity[] = { 0x0000, 0x0000, 0x0000, 0xfff8 /* sqrt(-n) from 80287 -- blue */ }; double sqrt(x) double x; { double dtemp; /* must be first 4/18/88 rma */ register int j; int exp; double frexp(), ldexp();  =double f; DUBBLE y0; if (_8087){ dtemp = x; asm db 9bh,0ddh,46h,0f8h asm db 9bh,0d9h,0fah asm db 9bh,0ddh,5eh,0f8h asm db 9bh /* ; fld qword ptr x ; fsqrt ; fst qword ptr x ; fwait */ return(dtemp); } if (x == 0.0) return(x); if (x < 0.0){ errno = EDOM; return( *(double *)minus_infinity ); } f = frexp(x, &exp); /* y0.d = .41731 + .59016 * f; */ y0.d = .42578 + .57422 * f; /* pg. 20 Cody & Waite -- blue */ for (j = 0; j < 4; j++){ /* upped to 4 iterations -- blue * =/ /* y0 = .5 * (y0 + f / y0); */ y0.d += f / y0.d; y0.u[3] -= 0x10; /* cheap divide-by-2 */ } if (exp & 1){ y0.d *= *(double *)halfsqrt2; exp++; } return(ldexp(y0.d, exp >> 1)); }   >Mfmainu.cgar;licbtosclibfFjekdjaOKm>  >/* Module mainu.c V011CM01 === 07/05/88 * * 07/05/88 011C01 sbw - Check return errors from fopen's * 04/18/88 010G01 rma - Don't allow real reg vars in _main() * 09/25/87 010B01 rma - Call ErrorExitString with filename * 06/11/87 rma - Added pipe emulation * 02/24/87 rma - Added check for possible dirspec if '<' found * * * PROPRIETARY PROGRAM MATERIAL * * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS C$ >ORPORATION, DETROIT, MICHIGAN 48232, USA. * * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1988 UNISYS CORPORATION */ #define PIPES 1 #define SAFETY 1 #include #include #ifdef PIPES #include #include #define PIPEFILE "[Sys]<$>pipe.file" #define PIPEFILE2 "[Sys]<$>pipe.file2" #endif int CheckErc plm far (int erc); int ErrorExitString plm far (int erc,char *far pbmsg,int cbmsg); char *malloc(); char *strchr(); extern int errno; _main() { reg0 >ister int dummy1, dummy2; /* use up regvars 4/18/88 rma */ int argc; char **argv, **cpp, *lb, *rb; int i, j, parms, subparms, inerrno, outerrno ; int errerrno ; /* 011C01 sbw */ FILE *in, *out, *err, *fp; char *cp; struct { char *far addr; int len; } pblk; char *inp, *outp, *errp; char *refip; #ifdef PIPES int pipef=0; char nextprog[128], pipefile[32]; struct sdtype { char *far pb; int cb; } param; /* for VLPB setting */ #endif inp = "[kbd]"; refip = inp; outp = "[vid]"< >; errp = outp; parms = CParams(); for (argc = 1, i = 1; i < parms; i++) argc += CSubParams(i); argv = (char **)malloc((argc + 1) * sizeof (char *)); if (argv == 0){ parms = 0; argc = 0; } for (i = 0, cpp = argv ; i < parms; i++){ /* rma */ subparms = CSubParams(i); for (j = 0; j < subparms; j++){ RgParam(i, j, &pblk); cp = malloc(pblk.len + 1); if (cp == 0){ i = parms; break; } *cpp = cp; cpp++; copyin(cp, pblk.addr, pblk.len); if (i == 0) break;H > /* just did command name */ #ifdef PIPES if (!pipef){ /* no redirection after pipe flag */ #endif if (cp[0] == '<'){ /* new tests rma */ lb = strchr(cp+1,'<'); rb = strchr(cp+1,'>'); if (!rb || (lb && (lb < rb))){ /* then not dirname */ inp = cp + 1; cpp--; } } else if (cp[0] == '>'){ outp = cp + 1; cpp--; } #ifdef PIPES else if (cp[0] == '|'){ /* pipe emulation */ outp = (strcmp(argv[0],"p&q")==0 ? PIPEFILE2 : PIPEFILE); pipef = cppT > - argv - 1; /* index to next progname */ if (cp[1] == '\0'){ cpp--; /* disregard this | parm */ #ifdef SAFETY if ((j+1) == subparms){ /* nextprogname missing */ pipef = 0; /* cancel piping */ i = parms; break; } #endif } else cpp[-1]++; /* parm is of form |nxtprog */ } } /* end if (!pipef) */ #endif } } argc = cpp - argv; #ifdef PIPES if (pipef){ parms = argc; argc = pipef; } #endif *cpp = 0 ; /* * Strengthened error checking o` >n the fopens for in, out, and err. * 011C01 sbw */ in = fopen( inp, "r" ) ; inerrno = errno ; if ( in == 0 ) ErrorExitString( inerrno, inp, strlen( inp ) ) ; if ( outp[0] == '>' ) out = fopen( ++outp, "a" ) ; else out = fopen( outp, "w" ) ; outerrno = errno ; if ( out == 0 ) { fclose( in ) ; ErrorExitString( outerrno, outp, strlen( outp ) ) ; } if ( inp == refip ) setbuf( stdin, NULL ) ; if ( outp == errp ) setbuf( stdout, NULL ) ; err = fopen( l >errp, "w" ) ; errerrno = errno ; if ( err == 0 ) { fclose( in ) ; fclose( out ) ; ErrorExitString( errerrno, errp, strlen( errp ) ) ; } setbuf( err, NULL ) ; main( argc, argv ) ; #ifdef PIPES /* set up for emulated pipe */ if (pipef){ fclose(stdout); CheckErc(RgParamInit(NULL,0,2)); CheckErc(RgParamSetListStart(0)); if (strcmp(argv[0],"p&q")==0) param.pb = "q&p"; else param.pb = "p&q"; param.cb = 3; CheckErc(RgParamSetEltNext(¶m)); CheckErc(RgPax > ramSetListStart(1)); param.pb = strcat(strcpy(pipefile,"<"),outp); param.cb = strlen(pipefile); CheckErc(RgParamSetEltNext(¶m)); for (j=pipef+1; j"),argv[pipef]),".run"); else fclose(fp); CheckErc(Chain(nextprog,strlen( > nextprog),"",0,128,0,0)); } else{ /* no more pipes */ fclose(stdin); unlink(PIPEFILE); /* clean up */ unlink(PIPEFILE2); /* clean up */ } #endif exit(0); } static copyin(dest, src, len) char *dest; char *far src; int len; { while (len > 0){ *dest++ = *src++; len--; } *dest = 0; } } .. ......2&2P2222C2l2~2222:2Z2222222'2N222  ?rfputc.cgar;licbtosclibrF jeԟdjbOKm) ?/* Module fputc.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include fputc(c, fp) unsigned char c; FILE *fp; { return(putc(c, fp)); }  @g`ssort.cgar;licbtosclib`HjeƟdjbOKm( @/* Module ssort.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ /* shell sort algorithm */ ssort(dtable, nitems, ewidth, fcmp) char *dtable; /* Address of data table */ unsigned nitems; /* number of items */ unsigned ewidth; /* width of a row */ int (*fcmp @)(); /* key compare function */ { register int j, gap; int i; char *pj, *pjg; int len, c; if (nitems >= 2) { for (gap=nitems/2; gap>0; gap /= 2) for (i=gap; i=0; j-=gap) { pj = dtable + (j*ewidth); pjg = dtable + ((j+gap)*ewidth); if ((*fcmp)(pj, pjg) < 0) break; for (len = ewidth; len > 0; len--) { c = *pj; *pj++ = *pjg; *pjg++ = c;  @} } } }  A_'fclose.cgar;licbtosclib'JՇjedjcOKm( A/* Module fclose.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include fclose(fp) register FILE *fp; { /* Force a flush of any data buffers */ if ((fp->_f_flags & _F_OPEN) == 0) return(EOF); fflush(fp); if (fp->_f_flags & _F_BUF){ free A(fp->_f_buffer); fp->_f_buffer = 0; } fp->_f_flags = 0; /* indicate closed */ _close(fp->_f_fd); /* Close the MSDOS handle */ return(0); }  B* hugeval.cgar;licbtosclib*JۇjeŸdjcOKm( B/* Module hugeval.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ double _huge_val() { static char a[8] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0x7f }; return(*(double *)a); }  CUfrexp.cgar;licbtosclibLjedjcOKm)'  C/* Module frexp.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ double frexp(x, expptr) double x; int *expptr; { register int *ip; if (x == 0){ *expptr = 0; return(0); } ip = (int *)&x; *expptr = (((ip[3] & 0x7ff0) >> 4) - 0x3ff)+1; ip[3] &= ~0x7f, Cf0; ip[3] |= 0x3ff0; return(x*0.5); } 8 D.reada.cgar;licbtosclib.LjeşdjdOKm(D D/* Module reada.c V010GM01 === 04/11/88 * 04/11/88 010G01 rma - turn cursor on before reading * 09/14/87 010A01 rma - initial submittal * 06/18/87 rma - fix for key -> EOF * 06/17/87 rma - fix echo kbd to stderr * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include extern int errno; extern char *_openfd[]; extern char _kbdflag[]; _read(int fd, char *buffer, int len) { int rcnt; if (!_kbdflag[fd] && _openfd[2]) /* turn cursor on */ _write(2, "\x0ffVN", 3); errno = ReadBsRecord(_openfd[fd], buffer, len, &rcnt); /* force echo of keyboard to stderr */ if (!_kbdflag[fd] && !errno && _openfd[2]) _write(2, buffer, rcnt); if (!_kbdflag[fd] && errno == 1) /* key pressed */ return(-1); else if (errno < 2) return(rcnt); else return(-\ D1); } 1E ! 0F I/ r CNCLL{LLLi,[9 X X X 5X UX X   M  s+ + + + o >Cq# KKKKJKKK+KK ?$?<?T?l?N??? ????2? ? ? N x    [   h Egwmyds.cgar;licbtosclibwLjeןdjdOKmU)t E/* Module myds.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ myds() { asm mov ax,ds }   Foheap.cgar;licbtosclibNjewdjeOKm"  F/* Module heap.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #if defined(__LARGE__) | defined(__HUGE__) typedef unsigned long bsize; #else typedef unsigned bsize; #endif typedef int align; /* alignment unit */ struct header { bsize h_size; /* Size of th  Fis free block */ struct header *h_ptr; /* Pointer to next header */ }; static struct header _Base = { 0, &_Base }; /* Empty list to get started */ struct header *_Allocp = &_Base; /* Last allocated block */  GG abs.cgar;licbtosclib NjedjeOKmf' G/* Module abs.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ abs(i) int i; { return(i < 0 ? -i : i); }  HШtime.cgar;licbtosclibPTjedjfOKm H/* Module time.c V010EM01 === 11/24/87 * 11/24/87 rma - replace long with time_t * 09/14/87 rma - initial submittal * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include time_t time(tloc) time_t *tloc; { time_t x; GetDateTime(&x); if (tloc) *t Hloc = x; return(x); }  I\ftell.cgar;licbtosclib\PjecdjfOKm I/* Module ftell.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include extern int errno; extern char *_openfd[]; long ftell(fp) FILE *fp; { long a; int i; fflush(fp); i = GetBsLfa(_openfd[fileno(fp)], &a); if ( Ii){ errno = i; return(EOF); } if (fp->_f_flags & _F_IN && fp->_f_buffer) a -= fp->_f_endp - fp->_f_curp; return(a); }  Jstrtok.cgar;licbtosclibPjedjfOKmW& J/* Module strtok.c V010GM01 === 04/20/88 * 04/20/88 010G01 rma - change Ss to Ssq so can assemble * 09/14/87 010A01 rma - initial submittal * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ static char *Ssq; char *strtok(s1, s2) char *s1; char *s2; { register char *sp; char *tok;  J if (s1) Ssq = s1; /* First skip separators */ while (*Ssq){ for (sp = s2; *sp; sp++) if (*sp == *Ssq) break; if (*sp == 0) break; Ssq++; } if (*Ssq == 0) return(0); tok = Ssq; while (*Ssq){ for (sp = s2; *sp; sp++) if (*sp == *Ssq){ *Ssq++ = 0; return(tok); } Ssq++; } return(tok); } 0@/`P0%@&O`,,O--// 01?`;<=/>?O6BPx(! K!malloc.cgar;licbtosclibR@je djgOKmz4" K/* Module malloc.c V010FM01 === 01/11/88 * 01/11/88 rma - check malloc size request for BTOS max of 65526 * 09/14/87 rma - initial submittal * 05/20/87 rma - Merge all models into one malloc.c * 02/20/87 rma - Fix morecore to get remaining memory * 02/12/87 rma - Fix morecore to get max sized chunks * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BO@$ KRLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #define MAXBYTES 65526U /* max malloc() request for BTOS */ #if defined (__LARGE__) | defined (__HUGE__) /* Camarillo version of malloc */ int AllocMemorySL plm far (int sz, char *far cp); int QueryMemAvail plm far (int *far cp); #define NALLOC 10922 /* # units to allocate at once */ typedef int ALIGN; /* alignment unit */ union header { struct { union header *ptr; /* Pointer to next header */ unsigneL& Kd size; /* Size of this free block */ } s; ALIGN x; }; typedef union header HEADER; static HEADER base; /* Empty list to get started */ static HEADER *allocp = (HEADER *)NULL; /* Last allocated block */ void free(ap) char *ap; { register HEADER *p, *q; p = (HEADER *)ap - 1; /* point to header */ for (q = allocp; !(p > q && p < q->s.ptr); q = q->s.ptr) if (q >= q->s.ptr && (p > q || p < q->s.ptr)) break; /* at one end or other */ if (p + p->s.size == q->s.ptr) { /* X( Kjoin to upper nbr */ p->s.size += q->s.ptr->s.size; p->s.ptr = q->s.ptr->s.ptr; } else p->s.ptr = q->s.ptr; if (q + q->s.size == p) { /* join to lower nbr */ q->s.size += p->s.size; q->s.ptr = p->s.ptr; } else q->s.ptr = p; allocp = q; } static HEADER *morecore(nu) int nu; { char *cp; HEADER *up; int rnu; unsigned cPars; rnu = NALLOC; /* 65532 bytes */ while (AllocMemorySL((rnu * sizeof(HEADER)),(void *) &cp)) { if (rd* Knu == nu) return((HEADER *)NULL); /* couldn't find enough memory */ QueryMemAvail(&cPars); /* get number of paragraphs left */ rnu = (cPars*16) / sizeof(HEADER); /* convert to malloc units */ if (rnu < nu) rnu = nu; /* never try less than requested */ } up = (HEADER *)cp; up->s.size = rnu; free((char *)(up + 1)); return (allocp); } char *malloc(nbytes) unsigned nbytes; { register HEADER *p, *q; register int nunits; if (nbytes > MAXBYTES) retup, Krn (NULL); /* too much memory requested */ nunits = 1 + (nbytes + sizeof(HEADER) - 1) / sizeof(HEADER); if ((q = allocp) == (HEADER *)NULL) { /* no free list yet */ base.s.ptr = allocp = q = &base; base.s.size = 0; } for (p = q->s.ptr; ; q = p, p = p->s.ptr){ if (p->s.size >= nunits) { /* big enough */ if (p->s.size == nunits) /* exactly */ q->s.ptr = p->s.ptr; else { p->s.size -= nunits; p += p->s.size; p->s|. K.size = nunits; } allocp = q; return((char *)(p + 1)); } if (p == allocp) /* wrapped around free list */ if ((p = morecore(nunits)) == (HEADER *)NULL) return (NULL); /* none left */ } } #else /* Must be __MEDIUM__ or __SMALL__ */ typedef unsigned bsize; typedef int align; /* alignment unit */ struct header { bsize h_size; /* Size of this free block */ struct header *h_ptr; /* Pointer to next header */ }; extern struct header *_Al0 Klocp; /* Last allocated block */ extern void free(); extern char *sbrk(); extern char *__sbrk(); extern char *malloc(); char *mlalloc(); char *relalloc(); char *malloc(nbytes) unsigned nbytes; { register struct header *p, *q; register char *cp; if (nbytes > MAXBYTES) return (NULL); /* too much memory requested */ nbytes += sizeof (struct header); nbytes &= ~1; q = _Allocp; for (p = q->h_ptr; ; q = p, p = p->h_ptr){ if (p->h_size >= nbytes){ if (p->h_size <= nbytes + sizeof (struct head2 K er)) q->h_ptr = p->h_ptr; else { p->h_size -= nbytes; p = (struct header *)((char *)p + p->h_size); p->h_size = nbytes; } _Allocp = q; return((char *)(&p->h_ptr)); } if (p == _Allocp) break; } cp = sbrk(nbytes); if ((int)cp == -1) return(0); p = (struct header *)cp; p->h_size = nbytes; return((char *)(&p->h_ptr)); } #endif oc + len; ChangeFileLength(f->fd_xfd, (rloc + 511) & ~511L); SetFileStatus(f->fd_xfd, 6, &rloc, sizeof rloc); f->fd_eof = rloc; 4 L ssignal.cgar;licbtosclibTNje#djgOKm5 L/* Module ssignal.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include static int (*Sigtbl[16])() = { 0, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, }7 L; int (*ssignal(sig, action))() register int sig; int (*action)(); { int (*oldact)(); if (sig < 1 || sig > 15) return(SIG_DFL); oldact = Sigtbl[sig]; Sigtbl[sig] = action; return(oldact); } int gsignal(sig) register int sig; { int (*action)(); if (sig < 1 || sig > 15) return(0); action = Sigtbl[sig]; if (action == SIG_IGN) return(1); if (action == SIG_DFL) return(0); Sigtbl[sig] = SIG_DFL; return((*action)(sig)); } 9 M;!ctosio.cgar;licbtosclib!TLJjedjhOKm"(: M/* Module ctosio.c V011AM01 === 06/15/88 * * 06/15/88 011A01 arm - write(): do movmem only if ptemp != NULL * 03/11/88 010F01 arm - lseek(): check f->fd_xfd == -1 else fail with BNET * 02/15/88 010F01 rma - set errno=0 in _readblk_ * 10/02/87 010C01 arm - fix for odd buffer address * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1988 BORLAND IN< MTERNATIONAL * COPYRIGHT (C) 1988 UNISYS CORPORATION */ #include #define NFDS 20 extern int errno; char *malloc(); static struct filedesc { long fd_loc; long fd_eof; int fd_xfd; } _fdesc_[NFDS] = { { 0, 0, -1 }, /* 0 */ { 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, /* 5 */ { 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, /* 10 */ { 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, /* 15 */ { 0, 0, -1 }, {> M 0, 0, -1 }, { 0, 0, -1 }, { 0, 0, -1 }, /* 19 */ }; #define SECTORSIZE 512 #define BUFFSIZE 1024 #define ODDBYTEADDR 234 static char _buf_[BUFFSIZE]; static long Bloc; static int Bfd = -1; #define NULL 0 int open(filename, mode) char *filename; int mode; { int fd; int ifd; struct filedesc *f; for (f = _fdesc_, ifd = 0; f < _fdesc_ + NFDS; f++, ifd++) if (f->fd_xfd == -1){ if (mode != 0) mode = 'mm'; else mode = 'rm'; errno = OpenFile(&fd, filename, strlen(fi@ Mlename), NULL, 0, mode); if (errno) return(-1); f->fd_xfd = fd; f->fd_loc = 0; GetFileStatus(fd, 6, &f->fd_eof, sizeof f->fd_eof); return(ifd); } errno = 214; return(-1); } int read(fd, buf, len) int fd; char *buf; unsigned len; { unsigned rcount; struct filedesc *f; char *offs; unsigned clen, xlen; long rloc; char *ptemp; /* pointer to word aligned buffer */ unsigned xclen, xxlen; long xfd_loc; char *xbuf; f = &_fdesc_[fd]; if (fd < 0 || fd > NFDS || f->fC Md_xfd == -1){ errno = 210; return(-1); } rcount = 0; rloc = f->fd_eof - f->fd_loc; if (rloc < len) len = rloc; if ((f->fd_loc & 511) != 0){ /* Read first partial block */ rloc = f->fd_loc & ~511L; _readblk_(f->fd_xfd, rloc); if (errno > 1) return(-1); if (errno == 1) return(0); offs = _buf_ + (f->fd_loc - rloc); clen = 512 - (f->fd_loc - rloc); if (len < clen) clen = len; movmem(offs, buf, clen); rcount = clen; f->fd_loc += clen; len -= rcount; buf += rcount;  E M } if (len >= 512){ /* Read whole blocks */ clen = len & ~511; errno = ReadFile(f->fd_xfd, buf, clen, f->fd_loc, &xlen); if( errno > 1 ) { if( errno == ODDBYTEADDR ) { if( clen <= BUFFSIZE ) ptemp = _buf_; else ptemp = malloc(clen); if( ptemp != NULL ) { errno = ReadFile(f->fd_xfd, ptemp, clen, f->fd_loc, &xlen); if( errno <= 1 ) movmem(ptemp, buf, clen); if( ptemp != _buf_ ) free(ptemp); else { Bfd = f->fd_xfd; BG Mloc = f->fd_loc; } if( errno > 1 ) return(-1); } else { /* read it BUFFSIZE at a time */ /* we know we will need to do at leaset */ /* one full read */ for(xclen=BUFFSIZE, xfd_loc = f->fd_loc, xlen=0, xbuf = buf; xlen < clen; ){ errno = ReadFile(f->fd_xfd, _buf_, xclen, xfd_loc, &xxlen); if( errno > 1 ) return(-1); movmem(_buf_, xbuf, xxlen); xbuf += xxlen; xlen += xxlen; xfd_loc += xxlen; if( (xlen + BUF$I MFSIZE ) > clen ) xclen = clen - xlen; } Bfd = f->fd_xfd; Bloc = xfd_loc - xxlen; } } else return(-1); } f->fd_loc += xlen; if (xlen != clen) return(rcount + xlen); rcount += xlen; len -= xlen; buf += xlen; } if (len > 0){ /* Read final partial block */ _readblk_(f->fd_xfd, f->fd_loc); if (errno > 1) return(-1); if (errno == 1) return(rcount); movmem(_buf_, buf, len); rcount += len; f->fd_loc += len; } return(rcount); 0K M } write(fd, buf, len) int fd; char *buf; unsigned len; { unsigned rcount; struct filedesc *f; char *offs; unsigned clen, xlen; long rloc; char *ptemp; /* pointer to word aligned buffer */ unsigned xclen, xxlen; long xfd_loc; char *xbuf; f = &_fdesc_[fd]; if (fd < 0 || fd > NFDS || f->fd_xfd == -1){ errno = 210; return(-1); } rcount = 0; rloc = f->fd_eof - f->fd_loc; /* Adjust file length */ if (rloc < len){ rloc = f->fd_loc + len; ChangeFileLength(f->fd_xfd, (rloc + 511)fd_xfd, 6, &rloc, sizeof rloc); f->fd_eof = rloc; } /* Read/write first partial block */ if ((f->fd_loc & 511) != 0){ rloc = f->fd_loc & ~511L; _readblk_(f->fd_xfd, rloc); if (errno > 1) return(-1); if (errno == 1) return(0); offs = _buf_ + (f->fd_loc - rloc); clen = 512 - (f->fd_loc - rloc); if (len < clen) clen = len; movmem(buf, offs, clen); _writeblk_(); if (errno > 1) return(-1); rcount = clen; f->fd_loc += clen; len -= rcountHO M ; buf += rcount; } /* Write whole blocks */ if (len >= 512){ clen = len & ~511; errno = WriteFile(f->fd_xfd, buf, clen, f->fd_loc, &xlen); if( errno > 1 ) { if( errno == ODDBYTEADDR ) { if( clen <= BUFFSIZE ) ptemp = _buf_; else ptemp = malloc(clen); if( ptemp != NULL ) { movmem(buf, ptemp, clen); /* 5/5/88 arm */ errno = WriteFile(f->fd_xfd, ptemp, clen, f->fd_loc, &xlen); if( ptemp != _buf_ ) free(ptemp); else { Bfd = TQ M f->fd_xfd; Bloc = f->fd_loc; } if( errno > 1 ) return(-1); } else { /* read it BUFFSIZE at a time */ /* we know we will need to do at leaset */ /* one full read */ for(xclen=BUFFSIZE, xfd_loc = f->fd_loc, xlen=0, xbuf = buf; xlen < clen; ){ movmem(xbuf, _buf_, xclen); errno = WriteFile(f->fd_xfd, _buf_, xclen, xfd_loc, &xxlen); if( errno > 1 ) return(-1); xbuf += xxlen; xlen += xxlen; xfd_loc += xxlen; `S M if( (xlen + BUFFSIZE ) > clen ) xclen = clen - xlen; } Bfd = f->fd_xfd; Bloc = xfd_loc - xxlen; } } else return(-1); } f->fd_loc += xlen; if (xlen != clen) return(rcount + xlen); rcount += xlen; len -= xlen; buf += xlen; } /* Read/write final partial block */ if (len > 0){ _readblk_(f->fd_xfd, f->fd_loc); if (errno > 1) return(-1); if (errno == 1) return(rcount); movmem(buf, _buf_, len); _writeblk_(); if (errno > 1) lU M return(-1); rcount += len; f->fd_loc += len; } return(rcount); } long lseek(fd, loc, manner) int fd; long loc; int manner; { struct filedesc *f; f = &_fdesc_[fd]; if (fd < 0 || fd > NFDS || f->fd_xfd == -1){ /* 3/11/88 arm */ errno = 210; return(-1L); } switch(manner){ case 0: f->fd_loc = loc; break; case 1: f->fd_loc += loc; break; case 2: f->fd_loc = loc + f->fd_eof; break; default: errno = 218; return(-1L); } return(f->fd_loc); } close(fd) int fd; { int xfd; ixW Mf (fd < 0 || fd > NFDS || _fdesc_[fd].fd_xfd == -1){ errno = 210; return(-1); } errno = CloseFile(_fdesc_[fd].fd_xfd); if (errno) return(-1); else { xfd = _fdesc_[fd].fd_xfd; _fdesc_[fd].fd_xfd = -1; if (xfd == Bfd) Bfd = -1; return(0); } } /* _writeblk_() MUST be preceded by _readblk_ */ static _writeblk_() { int wcnt; errno = WriteFile(Bfd, _buf_, SECTORSIZE, Bloc, &wcnt); if (errno == 0 && wcnt != SECTORSIZE) errno = 1; } static _readblk_(fd, loc) int fd; long loc; Y M { int rcnt; if (fd != Bfd || loc != Bloc){ Bfd = fd; Bloc = loc; errno = ReadFile(fd, _buf_, SECTORSIZE, loc, &rcnt); if (errno == 0 && rcnt != SECTORSIZE) errno = 1; } else errno = 0; /* 2/15/87 */ } /************************************************************************/ /* fdtofh translates a C library file descriptor to a BTOS file handle. */ /* returns the BTOS file handle */ /* returns -1 if the file descriptor is invalid. */ /************************************[ M************************************/ int fdtofh(fd) int fd; { struct filedesc *f; f = &_fdesc_[fd]; if (fd < 0 || fd > NFDS || f->fd_xfd == -1) { errno = 210; return(-1); } return (f->fd_xfd); } /***************************************************************/ /* PROGRAM truncfile() truncates the file (sets length to zero */ /***************************************************************/ int truncfile(fd) int fd; { int ret; struct filedesc *f; f = &_fdesc_[fd]; if(fd < 0 || fd > NF] MDS || f->fd_xfd == -1) { errno = 210; return(-1); } if( ret = ChangeFileLength(f->fd_xfd, 0L) ) { errno = ret; return(-1); } f->fd_eof = 0; f->fd_loc = 0; return 0; } n) return(rcount + xlen); rcount += xlen; len -= xlen; buf += xlen; } if (len > 0){ /* Read final partial block */ _readblk_(f->fd_xfd, f->fd_loc); if (errno > 1) return(-1); if (errno == 1) return(rcount); movmem(_buf_, buf, len); rcount += len; f->fd_loc += len; } return(rcount); _ N|setbuf.cgar;licbtosclib|T%je۟djhOKm)` N/* Module setbuf.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include void setbuf(fp, buf) char *buf; register FILE *fp; { if (fp->_f_flags & _F_BUF) free(fp->_f_buffer); if (buf == 0){ fp->_f_curp = fp->_f_endp = fp->_f_buffer = &fp->_f_b Nhold; fp->_f_bsize = 1; } else { fp->_f_buffer = fp->_f_curp = fp->_f_endp = buf; fp->_f_bsize = BUFSIZ; } fp->_f_flags &= ~_F_BUF; } d O?sinh.cgar;licbtosclibVJje$djiOKme O/* Module sinh.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #define P0 -0.351812834301771e6 #define P1 -0.115635211968517e5 #define P2 -0.163757982026307e3 #define P3 -0.789661274173570 #define Q0 -0.211087700581062e7 #define Q1 0.36162723g O1094218e5 #define Q2 -0.277735231196507e3 #define YBAR 500.0 #define LNV 0.6931610107421875 #define WMAX 500.0 #define V2LESS1 0.138302778796019e-4 double fabs(); double exp(); static double sincosh(y, coshflag) double y; int coshflag; { double z; double w; if (y > YBAR){ w = y - LNV; if (w > WMAX){ errno = ERANGE; return(1e300); } z = exp(w); return(z + V2LESS1 * z); } else { z = exp(y); if (coshflag) return((z + 1 / z) / 2); else return((z - 1 / z) / 2); } } di Oouble sinh(x) double x; { double y; double rx2; double f; double pf, qf; y = fabs(x); if (y > 1.0){ y = sincosh(y, 0); if (x < 0) y = -y; } else if (y < 1e-8) y = x; else { f = x * x; pf = P0 + f * (P1 + f * (P2 + f * P3)); qf = Q0 + f * (Q1 + f * (Q2 + f)); rx2 = f * (pf / qf); y = x + x * rx2; } return(y); } double cosh(x) double x; { return(sincosh(fabs(x), 1)); } k Patof.cgar;licbtosclibV!je)djiOKm m P/* Module atof.c V010BM01 === 09/26/87 * 09/26/87 010B01 rma use /= 10.0 logic instead of fpowtab * 07/21/87 rma - Adjust constants for better conversion * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include static unsigned powtab[] = { 0x0000,0x0000,0x0000,0x4024, /* 1o P.0e1 */ 0x0000,0x0000,0x0000,0x4059, /* 1.0e2 */ 0x0000,0x0000,0x8800,0x40c3, /* 1.0e4 */ 0x0000,0x0000,0xd784,0x4197, /* 1.0e8 */ 0x8000,0x37e0,0xc379,0x4341, /* 1.0e16 */ 0x6e17,0xb505,0xb8b5,0x4693, /* 1.0e32 */ 0xf9f6,0xe93f,0x4f03,0x4d38, /* 1.0e64 */ 0x1d33,0xf930,0x7748,0x5a82, /* 1.0e128 */ 0xbf3f,0x7f73,0x4fdd,0x7515 /* 1.0e256 */ }; #ifdef NOTUSED static unsigned fpowtab[] = { 0x999a,0x9999,0x9999,0x3fb9, /* 1.0e-1 */ 0x147b,0x47ae,0x7ae1,0x3f84, /* 1.0e-2 */ 0x432d,0xeb1c,0x q P36e2,0x3f1a, /* 1.0e-4 */ 0x8c3a,0xe230,0x798e,0x3e45, /* 1.0e-8 */ 0x89bc,0x97d8,0xd2b2,0x3c9c, /* 1.0e-16 */ 0xa732,0xd5a8,0xf623,0x3949, /* 1.0e-32 */ 0xa73c,0x44f4,0x0ffd,0x32a5, /* 1.0e-64 */ 0x979a,0xcf8c,0xba08,0x255b, /* 1.0e-128 */ 0x6f40,0x64ac,0x0628,0x0ac8 /* 1.0e-256 */ }; #endif static double scale(d, exp) double d; int exp; { register double *tblp; if (exp == 0) return(d); if (exp < 0){ #ifdef NOTUSED tblp = (double *)fpowtab; #else exp = -exp; while (exp--) d,s P /= 10.0; /* fpowtab method inaccurate for 1.000000000 */ return(d); #endif } else tblp = (double *)powtab; exp &= 0777; /* remove excess bits */ while (exp){ if (exp & 1) d *= *tblp; exp >>= 1; tblp++; } return(d); } double strtod(const char *s, char **endptr) { double d; int negative; int fcnt; int exp; int enegative; d = 0.0; negative = 0; fcnt = 0; exp = 0; enegative = 0; while (*s == ' ' || *s == '\t' || *s == '+') s++; if (*s == '-'){ s++; negative = 1; }8u P while (isdigit(*s)){ d = d * 10.0 + (*s - '0'); s++; } if (*s == '.'){ s++; while (isdigit(*s)){ d = d * 10.0 + (*s - '0'); fcnt++; s++; } } if (*s == 'e' || *s == 'E'){ s++; if (*s == '-'){ s++; enegative = 1; } else if (*s == '+') s++; while (isdigit(*s)){ exp = exp * 10 + *s - '0'; s++; } if (enegative) exp = -exp; } d = scale(d, exp-fcnt); if (negative) d = -d; if (endptr) *endptr = s; return(d); } double atof(char *s) { return(sDw Ptrtod(s,(char **)0)); } 11W=WOWoWWWWW W(WLWiWWxxxx)xQx_xxxxxx x*x0xjxpxx"y~JO^8l"'1S\fs>w#J 'Fhp:DWdtRZ~ rsrrrPy Q?stime.cgar;licbtosclibVje-djjOKm\z Q/* Module stime.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include int stime(tp) time_t *tp; { if (SetDateTime(tp->seconds, tp->dayTimes2)) return(-1); return(0); } h| Rfree.cgar;licbtosclibVjedjjOKm!&t} R/* Module free.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #if defined(__LARGE__) | defined(__HUGE__) typedef unsigned long bsize; #else typedef unsigned bsize; #endif typedef int align; /* alignment unit */ struct header { bsize h_size; /* Size of th Ris free block */ struct header *h_ptr; /* Pointer to next header */ }; extern struct header *_Allocp; /* Last allocated block */ extern void free(); extern char *sbrk(); extern char *__sbrk(); extern char *malloc(); char *mlalloc(); char *relalloc(); void free(ap) char *ap; { register struct header *p, *q; p = (struct header *)(ap - sizeof p->h_size); for (q = _Allocp; !(p > q && p < q->h_ptr); q = q->h_ptr) if (q >= q->h_ptr && (p > q || p < q->h_ptr)) break; if ((char *)p + p->h_size  R== q->h_ptr){ p->h_size += q->h_ptr->h_size; p->h_ptr = q->h_ptr->h_ptr; } else p->h_ptr = q->h_ptr; if ((char *)q + q->h_size == p){ q->h_size += p->h_size; q->h_ptr = p->h_ptr; p = q; } else q->h_ptr = p; #if defined(__LARGE__) | defined(__HUGE__) /* If the block just freed is at the top of memory, use brk to free it up. */ if ((char *)p + p->h_size == sbrk(0)){ /* Find the new end of list */ for (q = p; q->h_ptr != p; q = q->h_ptr) ; q->h_ptr = p->h_ptr; brk R(p); } #endif _Allocp = q; }  Svexit.cgar;licbtosclibVqjedjjOKm& S/* Module exit.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include extern FILE _files[]; extern char _openfd[]; exit(c) int c; { int i; for (i = 0; i < IOFILES; i++){ fclose(_files + i); close(i); } _exit(c); }  T\ulog.cgar;licbtosclibuVje6?mkOKm))ȉ T/* * Module: log.c V011IM01 === 06/13/90 * * 06/13/90 011I01 sbw - NOTICE: * * When re-creating the libraries with -f for use * with an 80x87 or the Math Server, DO NOT recompile * log.c, pow.c, or sqrt.c. These three modules * already have 80x87 code in the form of "asm db ..." * statements. The remaining code in these modules * will cause the generation of inline 80x87 op codes * which the Ctos Assembler cannot recognize. The * result is a BAD object fileԋ T (emitted by the Assembler * even if errors occur) and a BAD run file." * * 04/18/88 010G01 rma - make work with any prolog options * 01/07/88 010F01 rma - use 8087 if present * 10/02/87 010C01 rma - fix for log(1.0) * * PROPRIETARY PROGRAM MATERIAL * * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1990 UNISYS CORPORATIO TN */ /* * Modified log courtesy of John Levine */ #include #include static unsigned uHALF[] = { 0x0000, 0x0000, 0x0000, 0x3fe0 }; #define HALF ( *(double *)uHALF ) static unsigned halfsqrt2[] = /* .70710678118654752440 */ { 0x3bcd, 0x667f, 0xa09e, 0x3fe6 /* sqrt(2)/2 from 80287 -- blue */ }; static unsigned uMINUS_INFINITY[] = { 0x0000, 0x0000, 0x0000, 0xfff8 /* sqrt(-n) from 80287 -- blue */ }; #define MINUS_INFINITY ( *(double *)uMINUS_INFINITY ) static unsigned uC1[ T] = { 0x0000, 0x0000, 0x3000, 0x3fe6 }; static unsigned uC2[] = { 0x0ca8, 0x5c61, 0xd010, 0xbf2b }; static unsigned uA0[] = { 0xb6d1, 0x12b3, 0x07ff, 0xc050 }; static unsigned uA1[] = { 0xafed, 0x2016, 0x624a, 0x4030 }; static unsigned uA2[] = { 0xbd29, 0xb356, 0x4415, 0xbfe9 }; static unsigned uB0[] = { 0x9077, 0x9c0d, 0x0bfe, 0xc088 }; static unsigned uB1[] = { 0x267e, 0xfa15, 0x8083, 0x4073 }; static unsigned uB2[] = { 0xce0f, 0x4b67, 0xd580, 0xc041 }; #define C0 ( *(double *)halfsqrt2 ) /* 0.70710678 T118654752440 */ #define C1 ( *(double *)uC1 ) /* 0.693359375 (355.0/512.0)*/ #define C2 ( *(double *)uC2 ) /* -2.121944400546905827679e-4 */ #define A0 ( *(double *)uA0 ) /* -0.64124943423745581147e2 */ #define A1 ( *(double *)uA1 ) /* 0.16383943563021534222e2 */ #define A2 ( *(double *)uA2 ) /* -0.78956112887491257267 */ #define B0 ( *(double *)uB0 ) /* -0.76949932108494879777e3 */ #define B1 ( *(double *)uB1 ) /* 0.31203222091924532844e3 */ #define B2 ( *(double *)uB2 ) /* -0.3566797 T7739034646171e2 */ extern int _8087; typedef union { unsigned u[4]; double d; } DUBBLE; double log(x) double x; { double dtemp; /* must be first */ int exp; DUBBLE f; DUBBLE zden; double znum; double z, w; double aw, bw; double rz; double nexp; if (x <= 0.0){ errno = EDOM; return(MINUS_INFINITY); } if (x == 1.0) return(0.0); if (_8087){ dtemp = x; asm db 9bh,0d9h,0edh asm db 9bh,0ddh,46h,0f8h asm db 9bh,0d9h,0f1h asm db 09bh,0ddh,5eh,0f8h asm db 9bh #ifd Tef LISTQQ asm .8087 asm fldln2 ; /*put ln(2) on the stack*/ asm fld qword ptr x ; /*put x on the stack*/ asm fyl2x asm fstp qword ptr x ; /*ln(2) * log2(x) = ln(x)*/ asm fwait #endif return(dtemp); } f.d = frexp(x, &exp); ++exp; f.u[3] -= 0x10; /* cheap divide-by-2 */ /* now 0.5 <= f < 1.0 */ znum = f.d - HALF; if (f.d > C0){ znum -= HALF; zden.d = f.d; } else { --exp; zden.d = znum; } zden.u[3] -= 0x10; /* cheap divide-by-2 */ zden.d += HALF; z = znum / zden.d;  Tw = z * z; aw = A0 + w * (A1 + w * A2); bw = B0 + w * (B1 + w * (B2 + w)); rz = z + z * (w * aw / bw); nexp = (double)exp; return(C1 * nexp + (rz + C2 * nexp)); } double log10(x) double x; { return(0.43429448190325182765 * log(x)); } ( UgNprintf.cgar;licbtosclibNXjeXdjkOKmC4 U/* Module printf.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #include #include #include printf(char *fmt, ...) { va_list ap; va_start(ap, fmt); return(_printf(fputc, stdout, fmt, ap)); } vprintf(char@ U *fmt, va_list ap) { return(_printf(fputc, stdout, fmt, ap)); } L VOtanh.cgar;licbtosclibOXjeYdjlOKmAX V/* Module tanh.c V010GM01 === 04/11/88 * 04/11/88 010G01 rma - fix Q1 constant * 09/14/87 010A01 rma - initial submittal * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #define P0 -0.161341190239962e4 #define P1 -0.992259296722360e2 #define P2 -0.964374927772254 #ded Vfine Q0 0.484023570719886e4 #define Q1 0.223377207189623e4 /* 4/11/88 rma */ #define Q2 0.112744743805349e3 #define XBIG (27 * 0.693147180559945) #define LN3OVER2 0.549306144334054 double fabs(); double exp(); double tanh(x) double x; { double f; double g; double pg, qg; f = fabs(x); if (f > XBIG) f = 1.0; else if (f > LN3OVER2){ f = 0.5 - 1.0 / (exp(f + f) + 1.0); f = f + f; } else if (f > 1e-8){ g = f * f; pg = P0 + g * (P1 + g * P2); qg = Q0 + g * (Q1 + g * (Q2 + g)); f = f p V+ f * (g * (pg / qg));; } if (x < 0) f = -f; return(f); } E ! 0F I/ r CNCLL{LLLi,[9 X X X 5X UX X   M  s+ + + + o >Cq# KKKKJKKK+KK ?$?<?T?l?N??? ????2? ? ? N x    [   | Wlgets.cgar;licbtoscliblXjepdjlOKm! W/* Module gets.c V010AM01 === 09/14/87 * 05/11/87 rma - process backspace chars * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include char *gets(s) register char *s; { int c; char *ret; ret = s; for (;;){ c = getc(stdin); if (c == EOF || c == '\n') break;  Wif (c=='\b') { if (s != ret) s--; } else *s++ = c; } if (c == EOF && s == ret) return(0); *s = 0; return(ret); }  X init8087.cgar;licbtosclibXjedjlOKm|' X/* Module init8087.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ int _8087 = 0; init8087() { _8087 = 1; asm db 0dbh,0e3h }  Y\tan.cgar;licbtosclibXjedjmOKm'į Y/* Module tan.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include #define YMAX 1.57079e8 #define TWOPI 0.636619772367581 #define C1 (3217./2048.) #define C2 -4.45445510338076e-6 #define P1 -0.128283470409574 #define P2 0.280591824116998e-2 #definб Ye P3 -0.748363496661206e-5 #define Q0 1.0 #define Q1 -0.461616803742904 #define Q2 0.233448528220687e-1 #define Q3 -0.208448044220387e-3 double fabs(); double floor(); double tan(x) double x; { double y; int n; double xn; double f; double xnum; double xden; double g; y = fabs(x); if (y > YMAX){ errno = EDOM; return(0.0); } n = .5 + x * TWOPI; xn = n; f = ((floor(x) - xn * C1) + x - floor(x)) - xn * C2; if (fabs(f) < 1e-8){ if ((n & 1) == 0) return(f); errno = ERANGE; return(ܳ Y0.0); } else { g = f * f; xnum = f + f * g * (P1 + g * (P2 + g * P3)); xden = Q0 + g * (Q1 + g * (Q2 + g * Q3)); } if ((n & 1) == 0) return(xnum / xden); else return(xden / -xnum); }  Z X&exita.cgar;licbtosclib&XӇjedjmOKms( Z/* Module exita.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include _exit(code) { ErrorExit(code); }  [0gcvt.cgar;licbtosclibZ4jedjnOKm  [/* Module gcvt.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ char *ecvt(); char *gcvt(value, ndigit, buf) double value; int ndigit; char *buf; { int decpt; int sign; char *dbuffer; char *cp; char *bufsv; bufsv = buf; dbuffer = ecvt(value, ndigit,  [&decpt, &sign); if (sign){ *buf++ = '-'; ndigit--; } cp = dbuffer + strlen(dbuffer); while (cp > dbuffer && cp[-1] == '0') cp--; *cp = 0; if (decpt >= -4 && decpt < ndigit){ while (decpt > 0){ if (*dbuffer) *buf++ = *dbuffer++; else *buf++ = '0'; decpt--; ndigit--; } if (ndigit > 0 && *dbuffer){ *buf++ = '.'; while (decpt < 0){ *buf++ = '0'; decpt++; } while (ndigit > 0 && *dbuffer){ *buf++ = *dbuffer++; ndigit--; } } } else { $ [ if (*dbuffer) *buf++ = *dbuffer++; else *buf++ = '0'; ndigit--; if (*dbuffer && ndigit > 0){ *buf++ = '.'; while (ndigit > 0 && *dbuffer){ *buf++ = *dbuffer++; ndigit--; } } *buf++ = 'e'; if (decpt < 0){ *buf++ = '-'; decpt = -decpt; } else *buf++ = '+'; *buf++ = decpt / 100 + '0'; decpt %= 100; *buf++ = decpt / 10 + '0'; *buf++ = decpt % 10 + '0'; } *buf = 0; return(bufsv); } 0 \]Uputs.cgar;licbtosclibUZje^djnOKm< \/* Module puts.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include puts(s) char *s; { int res; while (*s){ res = putc(*s, stdout); s++; if (res == EOF) return(EOF); } res = putchar('\n'); if (res == EOF) return(EOF); return(0H \); } T ] ldexp.cgar;licbtosclib\8jedjoOKmD` ]/* Module ldexp.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include double ldexp(x, exp) double x; int exp; { register int *ip; if (x == 0) return(0); ip = (int *)&x; exp <<= 4; exp += ip[3] & 0x7ff0; if (exp < 0){ errno = ERANGE; l ] return(0.0); } ip[3] &= ~0x7ff0; ip[3] |= exp; return(x); } x ^zswab.cgar;licbtosclib\jedjoOKm' ^/* Module swab.c V010AM01 === 09/14/87 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ swab(from, to, nbytes) register char *from; char *to; int nbytes; { while (nbytes > 1){ to[0] = from[1]; to[1] = from[0]; from += 2; to += 2; nbytes -= 2; } }  _`nosam.cgar;licbtosclib^Dje+djoOKm= _/* Module nosam.c V010EM01 === 11/17/87 * 11/17/87 010E01 rma - call _exit(), not exit(); else SAM stuff * 09/14/87 010A01 rma - initial submittal * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include char *malloc(); _main() { int argc; char **argv, **cpp; int i _, j, k, parms, subparms; char *cp; struct { char *far addr; int len; } pblk; char *refip; parms = CParams(); for (argc = 1, i = 1; i < parms; i++) argc += CSubParams(i); argv = malloc((argc + 1) * sizeof (char *)); if (argv == 0){ parms = 0; argc = 0; } for (i = 0, cpp = argv ; i < parms; i++){ subparms = CSubParams(i); for (j = 0; j < subparms; j++){ k = RgParam(i, j, &pblk); cp = malloc(pblk.len + 1); if (cp == 0){ argc = cpp - argv; i = parms; break;  _ } *cpp = cp; cpp++; copyin(cp, pblk.addr, pblk.len); if (i == 0) break; } } argc = cpp - argv; *cpp = 0; main(argc, argv); _exit(0); } static copyin(dest, src, len) char *dest; char *far src; int len; { while (len > 0){ *dest++ = *src++; len--; } *dest = 0; }  `28calloc.cgar;licbtosclib^ije6?mpOKmw& `/* * Module: calloc.c V011IM01 === 06/13/90 * * 06/13/90 011I01 sbw - Use size_t * * * PROPRIETARY PROGRAM MATERIAL * * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1990 UNISYS CORPORATION */ #include extern void *malloc() ; extern void *memset() ; void *calloc( size_t nmemb, size_t size ) { register ` void *mp ; if ( (mp = malloc( nmemb *= size )) != NULL ) (void)memset( mp, 0, nmemb ) ; return( mp ) ; }  a)fmod.cgar;licbtosclib)^هjedjpOKm( a/* Module fmod.c V010CM01 === 10/02/87 * 10/02/87 010C01 rma - fix to conform to ANSI std * 09/26/87 010B01 rma - allow y <== 0.0 * * PROPRIETARY PROGRAM MATERIAL * REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION * OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. * COPYRIGHT (C) 1987 BORLAND INTERNATIONAL * COPYRIGHT (C) 1987 UNISYS CORPORATION */ #include double floor(); double ceil(); double fmod(x, y) double x; double y; { double tmp;  a if (y == 0.0) return(x); tmp = x / y; if (tmp < 0.0) return(x - ceil(x / y) * y); else return(x - floor(x / y) * y); }  _ /O  p ` p0_ @ 0@/`P0%@&O`,,O--// 01?`;<=/>?O6BPx b8c version.cgar;licbtosclibc^je6?mqOKm( b/* * Module version.c V011IM01 === 06/13/90 * * Date for the BtosC C Library * */ static char *version = "BTOS C 1.1.4 06/13/90" ;   cOWfasg.asmgar;licbtosclib +je djqOKmU, c; Module fasg.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name fasg prog segment byte public 'code' assume cs:prog public fasg@ fasg@: pop cx pop word ptr [bx] pop word ptr 2[bx] jmp cx ; return public fload@ fload@: pop cx push word ptr 2[bx8 c] push word ptr [bx] ; push the double onto stack jmp cx ; return prog ends end D dQ spush.asmgar;licbtosclib$jeLdjrOKmFP d; Module spush.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; prog segment byte public 'code' assume cs:prog public spush@ spush@: pop bx sub sp,cx push bp mov bp,sp push si push di push ds mov ds,dx mov si,ax lea di,2[bp] mov ax,ss mov es,ax \ dcld rep movsb pop ds pop di pop si pop bp jmp bx prog ends end h eYdcmp.asmgar;licbtosclib&&je&djsOKmt e; Module dcmp.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dcmp prog segment byte public 'code' assume cs:prog public dcmp@ dcmp@: push bp mov bp,sp ; set up frame pointer mov ax,18[bp] ; get the second exp/sign test ax,7ff0h jz cmp@zro2 ;  esecond op is zero mov dx,10[bp] ; get the first exp/sign test dx,7ff0h jz cmp@zro1 ; first op is zero mov cx,dx ; now find the signs or dx,dx ; first op negative? js firstneg ; yes or ax,ax ; second op negative? js gtr ; yes: greater ; ; both positive cmp dx,ax ; compare exponents jne cexit ; not eq: use flags as is mov ax,16[bp] cmp 8[bp],ax ; second word of fractions jne cexit ; not eq: use flags as is mov ax,14[bp] cmp 6[bp],ax ; third word of fractions jne cexit  e; not eq: use flags as is mov ax,12[bp] cmp 4[bp],ax ; final word of fractions cexit: ; use flags as is jbe cdone gtr: mov al,1 cmp al,0 cdone: pop bp ret 16 ; done firstneg: or ax,ax ; second op negative? jns lss ; no: lss and ax,7fffh ; clear the signs and dx,7fffh cmp ax,dx ; reverse operands jne cexit mov ax,8[bp] cmp 16[bp],ax jne cexit mov ax,6[bp] cmp 14[bp],ax jne cexit mov ax,4[bp] cmp 12[bp],ax jmp cexit lss: mov al,0 mov ah,1 ; force less than cmp al,ah p eop bp ret 16 ; done cmp@zro2: test word ptr 10[bp],7ff0h jz cdone ; both zero cmp 10[bp],ax jg gtr jl lss pop bp ret 16 cmp@zro1: test ax,8000h jnz gtr cmp dx,ax jg gtr jl lss pop bp ret 16 prog ends end  f pointerc.asmgar;licbtosclib&zjedjsOKm& f; Module pointerc.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name pointerc ; ; Long memory model pointer functions (ughh!) ; prog segment byte public 'code' assume cs:prog pnorm proc near mov ch,al mov cl,4 shr ax,cl add dx,ax mov al,ch and ax,0fh f ret pnorm endp pneg proc near not bx not cx add bx,1 adc cx,0 ret pneg endp pcxadj proc near mov ch,cl mov cl,4 shl ch,cl xor cl,cl ret pcxadj endp ; ; pcmp@ - compares two poitners on the stack, sets the condition codes ; public pcmp@ pcmp@ proc near push bp push di mov bp,sp mov ax,6[bp] ; left hand pointer offset mov dx,ax mov cl,4 shr dx,cl add dx,8[bp] ; normalize the segment and ax,0fh ; normalize the offset mov bx,10[bp] ; right hand pointer offset mov di,bx shr di,cl f add di,12[bp] ; right hand pointer segment and bx,0fh cmp dx,di ; compare segments jne pcmpend cmp ax,bx ; compare offsets pcmpend: pop di pop bp ret 8 pcmp@ endp public psbp@ psbp@ proc near push bp push di mov bp,sp push si mov ax,6[bp] mov dx,8[bp] mov di,10[bp] mov si,12[bp] mov bx,dx mov bp,si mov cl,4 shl bx,cl shl bp,cl mov cl,12 shr dx,cl shr si,cl add ax,bx adc dx,0 add di,bp adc si,0 sub ax,di sbb dx,si pop si pop di pop bp ret 8 psbp@ endp public padd@  fpadd@ proc near push bp mov bp,sp mov ax,4[bp] mov dx,6[bp] mov bx,8[bp] mov cx,10[bp] or cx,cx jge add1 call pneg jmp sub1 add1: add ax,bx jnc addok add dx,1000h addok: call pcxadj add dx,cx call pnorm pop bp ret 8 padd@ endp public psub@ psub@ proc near push bp mov bp,sp mov ax,4[bp] mov dx,6[bp] mov bx,8[bp] mov cx,10[bp] or cx,cx jge sub1 call pneg jmp add1 sub1: sub ax,bx jnc subok sub dx,1000h subok: call pcxadj sub dx,cx call pnorm pop bp ret 8 psub@ endp publi fc pina@ pina@ proc near push bp push di push es ;save es for small model rma mov bp,sp les di,dword ptr 6[bp] mov ax,es:[di] mov dx,es:2[di] mov bx,10[bp] mov cx,12[bp] or cx,cx jge ina1 call pneg jmp dea1 ina1: add ax,bx jnc inaok add dx,1000h inaok: call pcxadj add dx,cx call pnorm xchg es:[di],ax xchg es:2[di],dx pop es ;restore es for small model rma pop di pop bp ret 8 pina@ endp public pdea@ pdea@ proc near push bp push di push es ;save es for small model rma mov b fp,sp les di,dword ptr 6[bp] mov ax,es:[di] mov dx,es:2[di] mov bx,10[bp] mov cx,12[bp] or cx,cx jge dea1 call pneg jmp ina1 dea1: sub ax,bx jnc deaok sub dx,1000h deaok: call pcxadj sub dx,cx call pnorm xchg es:[di],ax xchg es:2[di],dx pop es ;restore es for small model rma pop di pop bp ret 8 pdea@ endp public pada@ pada@ proc near push bp push di push es ;save es for small model rma mov bp,sp les di,dword ptr 6[bp] mov ax,es:[di] mov dx,es:2[di] mov bx,10[bp] mov cx,12[ fbp] or cx,cx jge ada1 call pneg jmp sba1 ada1: add ax,bx jnc adaok add dx,1000h adaok: call pcxadj add dx,cx call pnorm mov es:[di],ax mov es:2[di],dx pop es ;restore es for small model rma pop di pop bp ret 8 pada@ endp public psba@ psba@ proc near push bp push di push es ;save es for small model rma mov bp,sp les di,dword ptr 6[bp] mov ax,es:[di] mov dx,es:2[di] mov bx,10[bp] mov cx,12[bp] or cx,cx jge sba1 call pneg jmp ada1 sba1: sub ax,bx jnc sbaok sub dx,1000h sba fok: call pcxadj sub dx,cx call pnorm mov es:[di],ax mov es:2[di],dx pop es ;restore es for small model rma pop di pop bp ret 8 psba@ endp prog ends end  g& dcmpml.asmgar;licbtosclib(jeEdjtOKm g; Module dcmpml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dcmpml C_dcmpml segment byte 'code' assume cs:C_dcmpml public dcmp@ dcmp@ proc far push bp mov bp,sp(  g ; set up frame pointer mov ax,20[bp] ; get the second exp/sign test ax,7ff0h jz cmp@zro2 ; second op is zero mov dx,12[bp] ; get the first exp/sign test dx,7ff0h jz cmp@zro1 ; first op is zero mov cx,dx ; now find the signs or dx,dx ; first op negative? js firstneg ; yes or ax,ax ; second op negative? js gtr ; yes: greater ; ; both positive cmp dx,ax ; compare exponents jne cexit ; not eq: use flags as is mov ax,18[bp] cmp 10[bp],ax ; second word of fractions jne cex4  git ; not eq: use flags as is mov ax,16[bp] cmp 8[bp],ax ; third word of fractions jne cexit ; not eq: use flags as is mov ax,14[bp] cmp 6[bp],ax ; final word of fractions cexit: ; use flags as is jb lss je cdone gtr: mov ax,1 ccmp: cmp al,ah cdone: pop bp ret 16 ; done firstneg: or ax,ax ; second op negative? jns lss ; no: lss and ax,7fffh ; clear the signs and dx,7fffh cmp ax,dx ; reverse operands jne cexit mov ax,10[bp] cmp 18[bp],ax jne cexit mov ax,8[bp] cmp 16[b@ gp],ax jne cexit mov ax,6[bp] cmp 14[bp],ax jmp cexit lss: mov ax,100h jmp ccmp cmp@zro2: test word ptr 12[bp],7ff0h jz cdone ; both zero cmp 12[bp],ax jl lss jg gtr jmp cdone cmp@zro1: cmp dx,ax jl lss jg gtr jmp cdone pop bp ret dcmp@ endp C_dcmpml ends end 5s]sss9s_ssssKs{sssDsuss^shsssXl(;i(JH2RFsssG7L hVdadd.asmgar;licbtosclibV(je^djtOKmX h; Module dadd.asm V010AM01 === 09/14/87 ; 06/08/87 rma - fix for low order bit error ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dadd dgroup group data data segment byte public 'data' extrn _8087:byte data ends prog segment byte public 'code' assume cs:prog,ds:dgroup publicd h dsub@ public dadd@ extrn unpack@:near extrn normalize@:near dsub@: mov bx,sp ; get frame xor byte ptr ss:17[bx],80h ; invert sign to do subtraction dadd@: push bp ; save the frame pointer cmp _8087,0 jz emul mov bp,sp db 9bh ;wait db 0ddh,46h,0ch db 9bh ;wait db 0ddh,46h,04h db 9bh ;wait db 0deh,0c1h db 9bh ;wait db 0ddh,5eh,0ch ; fld qword ptr 12[bp] ; fadd qword ptr 4[bp] ; fstp qword ptr 12[bp] pop bp db 9bh ;wait ret 8 emul: push si ; save the register var push di mov bp,sp hp ; set up a new frame test word ptr 14[bp],7ff0h ; lower operand zero? jz aexit ; yes: done test word ptr 22[bp],7ff0h ; upper operand zero? jnz mustadd ; no: add them mov ax,8[bp] mov bx,10[bp] mov cx,12[bp] mov dx,14[bp] mov 16[bp],ax mov 18[bp],bx mov 20[bp],cx mov 22[bp],dx aexit: mov sp,bp ; restore stack pop di pop si pop bp ret 8 ; return and pop one double mustadd: mov si,16 ; upper operand call unpack@ mov dx,ax ; save exponent/sign mov di,si mov si,8 ; lower | hoperand call unpack@ ; ; si points to lower operand ; di points to upper operand ; push dx ; save the upper sign push ax ; save the lower sign and ax,07ff0h ; strip the sign and dx,07ff0h ; ditto mov cx,ax ; compare the exponents sub cx,dx je noscale ; exponents same, no scaling jg silarger ; lower operand already larger xchg si,di ; exchange operands neg cx ; make exponent diff positive xchg ax,dx ; exchange exponents pop bx ; exchange signs xchg bx,-2[bp] push bx ; ; si p hoints to larger exponent operand ; di points to smaller exponent operand ; cx contains difference (scaling amount). ; silarger: cmp ch,3 ; too great a difference? jbe scalwd ; no: scale by words first pop dx and dx,8000h ; strip to the sign or ax,dx ; combine mov di,ax mov ax,[bp+si] mov bx,2[bp+si] mov cx,4[bp+si] mov dx,6[bp+si] mov 16[bp],ax mov 18[bp],bx mov 20[bp],cx mov 22[bp],dx mov si,16 call normalize@ ; pack up and exit jmp aexit scalwd: xor ax,ax push ax mov dx,6[bp+di h] mov bx,2[bp+di] mov ax,[bp+di] push cx mov cl,ch xor ch,ch jcxz scalwlend scalwloop: mov -6[bp],ah ; store the carry mov ax,bx mov bx,4[bp+di] mov 4[bp+di],dx xor dx,dx loop scalwloop scalwlend: pop cx xor ch,ch ; do the single word shift shr cx,1 shr cx,1 shr cx,1 shr cx,1 jcxz ascalend scale: shr dx,1 rcr word ptr 4[bp+di],1 rcr bx,1 rcr ax,1 ; shift fraction rcr byte ptr -6[bp],1 ; save the carry loop scale ; repeat for scale amount ascalend: mov 6[bp+di],dx mov 2[bp+d hi],bx mov [bp+di],ax jmp short noscald noscale: xor ax,ax push ax noscald: mov bx,2[bp+si] mov cx,4[bp+si] mov dx,6[bp+si] mov ax,-4[bp] ; add or subtract? xor ax,-2[bp] ; combine the signs mov ax,[bp+si] js dosubtr ; we have to subtract ; clc ; test byte ptr -6[bp],80h NO - rma 6/8/87 ; jz anocarry ; stc ;anocarry: add [bp+di],ax ; was adc rma adc 2[bp+di],bx adc 4[bp+di],cx adc 6[bp+di],dx ; do the addition jmp short ncomm ; now normalize dosubtr: ; clc ; test byte ptr -6[bp],80h  h NO - rma 6/8/87 ; jz snocarry ; stc ;snocarry: sub [bp+di],ax ; was sbb rma sbb 2[bp+di],bx sbb 4[bp+di],cx sbb 6[bp+di],dx ; do the subtraction jge norm ; positive, normalize xor ax,ax ; force a zero not word ptr 2[bp+di] not word ptr 4[bp+di] not word ptr 6[bp+di] not word ptr [bp+di] add word ptr [bp+di],1 adc 2[bp+di],ax adc 4[bp+di],ax adc 6[bp+di],ax ; hard negation (gross). jmp short ncomm norm: xor byte ptr -3[bp],80h ; invert the sign ncomm: mov si,di ; save the result a! h ddress pop di ; discard one word pop di call normalize@ ; normalize the result mov ax,[bp+si] mov bx,2[bp+si] mov cx,4[bp+si] mov dx,6[bp+si] mov 16[bp],ax mov 18[bp],bx mov 20[bp],cx mov 22[bp],dx jmp aexit prog ends end # i cvtdlml.asmgar;licbtosclib*njedjuOKm &$ i; Module cvtdlml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name cvtdlml extrn unpack@:far extrn normalize@:far C_cvtdlml segment byte 'code' assume cs:C_cvtdlml pub& ilic cvtdl@ public cvtdul@ public cvtld@ public cvtuld@ cvtld@ proc far push bp mov bp,sp pop bp pop cx pop bx pop ax pop dx sub sp,8 push bx push cx push di mov di,dx or di,di jns cvtcomq not dx not ax add ax,1 adc dx,0 cvtcomq: push bp push si mov bp,sp mov si,10 ; get address of long xor cx,cx mov [si+bp],ax mov 2[si+bp],dx mov 4[si+bp],cx mov 6[si+bp],cx and di,8000h ; strip to the sign or di,4330h ; store the unnormalized exponent call normalize@ mov sp,bp pop si( i pop bp pop di ret cvtld@ endp cvtuld@ proc far push bp mov bp,sp pop bp pop bx pop cx pop ax pop dx sub sp,8 push cx push bx push di xor di,di cvtcom: push bp push si mov bp,sp mov si,10 ; get address of long xor cx,cx mov [si+bp],ax mov 2[si+bp],dx mov 4[si+bp],cx mov 6[si+bp],cx and di,8000h ; strip to the sign or di,4330h ; store the unnormalized exponent call normalize@ mov sp,bp pop si pop bp pop di ret cvtuld@ endp cvtdl@ proc far push bp mov bp,sp pop bp pu* ish bp push si mov bp,sp push di mov si,8 call unpack@ ; open up the double mov cx,ax and ax,7ff0h and cx,8000h lower: cmp ax,4230h ; the right exponent? jge higher ; maybe shr word ptr 6[si+bp],1 rcr word ptr 4[si+bp],1 rcr word ptr 2[si+bp],1 add ax,10h jmp lower higher: cmp ax,4230h ; right exponent yet? jle cdone shl word ptr [si+bp],1 rcl word ptr 2[si+bp],1 rcl word ptr 4[si+bp],1 sub ax,10h jmp higher cdone: mov dx,4[si+bp] ; fetch the long bits mov ax,2[si+bp] or cx,cx- i ; check the sign jz cexit not dx not ax add ax,1 adc dx,0 ; negate the long cexit: mov di,-2[bp] mov sp,bp pop si pop bp ret 8 cvtdul@ endp cvtdul@ proc far push bp mov bp,sp pop bp push bp push si mov bp,sp push di mov si,8 call unpack@ ; open up the double mov cx,ax and ax,7ff0h and cx,8000h lower2: cmp ax,4230h ; the right exponent? jge higher2 ; maybe shr word ptr 6[si+bp],1 rcr word ptr 4[si+bp],1 rcr word ptr 2[si+bp],1 add ax,10h jmp lower2 higher2: cmp ax,42 / i30h ; right exponent yet? jle cdone shl word ptr [si+bp],1 rcl word ptr 2[si+bp],1 rcl word ptr 4[si+bp],1 sub ax,10h jmp higher2 cdone2: mov dx,4[si+bp] ; fetch the long bits mov ax,2[si+bp] or cx,cx ; check the sign jz cexit2 not dx not ax add ax,1 adc dx,0 ; negate the long cexit2: mov di,-2[bp] mov sp,bp pop si pop bp ret 8 cvtdul@ endp C_cvtdlml ends end   > w           # J         ' F h p    1 j$ ddivml.asmgar;licbtosclib$.·jedjuOKm($2 j; Module ddivml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; ; ; Double precision divide using Knuth's division algorithm ; D given in section 4.3.1 (Volume 2 first edition04 j) of The ; Art of Computer Programming. ; ; The division does an arbitrary precision divide of the ; fractional parts of the floating point numbers. The ; exponent and sign are handled separately. ; name ddivml dgroup group data data segment word public 'data' extrn _8087:byte data ends extrn normalize@:far C_ddivml segment byte 'code' assume cs:C_ddivml,ds:dgroup public ddiv@ ddiv@ proc far push bp cmp _8087,0 jz emul mov bp,sp db 09bh db 0ddh,46h,06h db 09bh db 0ddh,46h,0eh db 09bh db 0de<6 jh,0f9h db 09bh db 0ddh,5eh,0eh db 09bh pop bp ret 8 emul: mov bp,sp ; set up a full frame push si push di mov ax,7ff0h ; look at the exponent test ax,20[bp] ; second op zero? jz overflow ; done test ax,12[bp] ; first op zero? jnz realdiv ; nope, have to divide underflow: xor ax,ax mov 20[bp],ax mov 18[bp],ax mov 16[bp],ax mov 14[bp],ax fexit: mov di,-4[bp] mov si,-2[bp] mov sp,bp ; clean up stack pop bp ret 8 ; pop lowest operand overflow: mov ax,12[bp] ; use sign of op H8 j1 or ax,7fffh ; set high mov 20[bp],ax or ax,8000h ; force all bits for mantissa mov 18[bp],ax mov 16[bp],ax mov 14[bp],ax jmp fexit realdiv: mov ax,20[bp] mov dx,ax ; copy for exp. mov di,ax ; save the mantissa mov bx,12[bp] xor ax,bx ; find the result sign and ax,8000h ; strip to the sign and dx,7ff0h ; strip to the exp and bx,7ff0h ; strip to the exp sub dx,3fb0h ; remove the bias neg dx add dx,bx ; produce the final exp js underflow ; addition went negative cmp dx,7ff0T: jh ; check for overflow jg overflow or dx,ax ; force in the sign push dx and di,0fh ; remove the exponent mov dx,12[bp] mov cx,10[bp] mov bx,8[bp] mov ax,6[bp] shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 xor dh,dh or dl,80h ; force proper fraction mov si,-7 push dx push cx push bx push ax xor ax,ax push ax push ax push ax push ax mov 20[bp],ax ; clear upper bits mov dx,di mov cx,18[bp] mov bx,16[bp] mo`< jv ax,14[bp] shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 xor dh,dh or dl,80h ; force proper fraction mov 12[bp],dx mov 10[bp],cx mov 8[bp],bx mov 6[bp],ax d2: ; Knuth step d2 mov cx,8 ; set up repeat count mov di,21 ; set up for quotient address d3: mov ax,-1[si+bp] cmp ah,12[bp] ; if Uj == V1 jb qhatx mov bl,255 ; qhat = 255 mov bh,al ; remember pseudo remainder jmp short setrhat qhatx: div byte ptr 12[bp] ; l> jqhat = (Ujb + Uj+1) / V1 mov bx,ax ; remember quotient and remainder jmp short tstqhat decqhat: dec bl ; qhat-- setrhat: add bh,12[bp] jc d4 tstqhat: mov al,11[bp] ; V2 mul bl ; V2 * qhat cmp ah,bh jb d4 ja decqhat cmp al,-2[si+bp] ja decqhat d4: ; Knuth step d4 push di ; save quotient address mov di,6 ; multiply back push cx sub si,7 ; find the addition position mov cx,7 ; do 7 multiplies xor dx,dx ; byte carry mulloop: mov al,[di+bp] mul bl ; qhat * Vi add ax,dx ; add in x@ jthe carry byte mov dl,ah ; save the carry byte sub [si+bp],al ; do the subtraction adc dx,0 ; combine in the carry for next byte inc di inc si loop mulloop ; loop until done sub [si+bp],dl ; final subtraction pop cx ; restore outer loop count d5: ; Knuth step d5 pop di ; restore quotient address mov [di+bp],bl ; store qhat as quotient digit jnc d7 ; test for borrow in sub above d6: ; Knuth step d6 dec byte ptr [di+bp] ; Qj-- push di ; save quotient address again sub si,7 ; back uB j p U push cx mov cx,7 ; repeat 7 times mov di,6 clc addback: mov al,[di+bp] adc [si+bp],al ; add back inc si inc di loop addback pop cx pop di adc byte ptr [si+bp],0 d7: dec di dec si loop d3 d8: ; Knuth step d8 - we do nothing norm: ; now normalize the result mov di,-6[bp] ; retrieve the sign/exponent mov si,14 ; quotient pointer call normalize@ jmp fexit ; done pop bp ret ddiv@ endp C_ddivml ends end DJPV\bhntzD k dmulh.asmgar;licbtosclib2jedjvOKm 'E k; Module dmulh.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dmulh extrn _8087:byte extrn normalize@:far C_dmulh segment byte 'code' assume cs:C_dmulh mult dw 20,12,-8 dw 18,12,-10 dw 20,10,-10 dw 18,10,-12 dw 16,12,-12 dw 20,8,-12 dw 20,6,-14 G k dw 18,8,-14 dw 16,10,-14 dw 14,12,-14 dw 16,8,-16 dw 14,10,-16 dw 18,6,-16 public dmul@ dmul@ proc far push bp mov ax,seg _8087 mov es,ax cmp es:_8087,0 jz emul mov bp,sp db 09bh db 0ddh,46h,0eh db 09bh db 0ddh,46h,06h db 09bh db 0deh,0c9h db 09bh db 0ddh,5eh,0eh db 09bh pop bp ret 8 emul: mov bp,sp ; set up a full frame push si push di mov ax,7ff0h ; look at the exponent test ax,20[bp] ; second op zero? jz fexit ; done test ax,12[bp] ; first op zero? jnz realmul ;I k nope, have to multiply mov ax,6[bp] mov 14[bp],ax mov ax,8[bp] mov 16[bp],ax mov ax,10[bp] mov 18[bp],ax mov ax,12[bp] mov 20[bp],ax fexit: mov di,-4[bp] mov si,-2[bp] mov sp,bp ; clean up stack pop bp ret 8 ; pop lowest operand underflow: xor ax,ax mov 20[bp],ax mov 18[bp],ax mov 16[bp],ax mov 14[bp],ax jmp fexit overflow: or bx,7fffh mov 20[bp],bx or bx,8000h mov 18[bp],bx mov 16[bp],bx mov 14[bp],bx jmp fexit realmul: mov ax,20[bp] mov dx,ax ; copy for exp. mov cx,ax K k ; save the mantissa mov bx,12[bp] xor ax,bx ; find the result sign and ax,8000h ; strip to the sign and dx,7ff0h ; strip to the exp and bx,7ff0h ; strip to the exp sub bx,4030h ; remove the bias add bx,dx ; produce the final exp js underflow ; addition went negative cmp bx,7ff0h ; check for overflow ja overflow or bx,ax ; force in the sign and cx,0fh ; remove the exponent or cx,10h ; add in the understood bit mov 20[bp],cx mov ax,12[bp] ; remove exponent b. and ax,0fh ; rM kemove the exponent or ax,10h ; add in the understood bit mov 12[bp],ax xor ax,ax push ax push ax push ax push ax push ax push ax mov cx,13 ; loop through mult table mov si,offset mult mloop: mov di,cs:[si] ; get one multiplier address mov ax,[di+bp] ; get the multiplier or ax,ax ; test sign jz nextloop ; skip if zero mov di,cs:2[si] ; get the other multiplier mul word ptr [di+bp] ; unsigned multiply mov di,cs:4[si] ; the destination address add [di+bp],ax ; store the multiplieO kd value inc di inc di adc [di+bp],dx ; add in the high word jnc nextloop ; done if no carry carryloop: inc di inc di inc word ptr [di+bp] ; put in the carry jz carryloop nextloop: add si,6 ; next table entry loop mloop lea sp,-14[bp] ; get the result string pop ax mov 14[bp],ax pop ax mov 16[bp],ax pop ax mov 18[bp],ax pop ax mov 20[bp],ax mov di,bx ; set up the exponent mov si,14 ; set up the return address call normalize@ jmp fexit dmul@ endp C_dmulh ends end Q lv lrshml.asmgar;licbtosclibv2jeןdjvOKm)R l; Module lrshml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name lrshml C_lrshml segment byte 'code' assume cs:C_lrshml public llsh@ llsh@ proc far push bp mov bp,spT l pop bp cmp cx,32 jbe lsh@lop xor ax,ax xor dx,dx ret lsh@lop: dec cx ; are we done? jl lsh@don shl ax,1 ; start at the lower word rcl dx,1 ; now the upper word jmp lsh@lop ; repeat lsh@don: ret llsh@ endp public lrsh@ lrsh@ proc far push bp mov bp,sp pop bp cmp cx,32 jbe rsh@lop mov cx,32 rsh@lop: dec cx ; are we done? jl rsh@don sar dx,1 ; rcr ax,1 ; jmp rsh@lop ; repeat rsh@don: ret lrsh@ endp public lursh@ lursh@ proc far push bp mov bp,sp pop bp cmp cx,32 jbe W lursh@lop xor ax,ax xor dx,dx ret ursh@lop: dec cx ; count down unti done. jl ursh@don shr dx,1 ; rcr ax,1 ; jmp ursh@lop ; repeat ursh@don: ret lursh@ endp C_lrshml ends end / r CNCLL{LLLi,[9 X X X 5X UX X   M  s+ + + + o >Cq# KKKKJKKK+KK ?$?<?T?l?N??? ????2? ? ? N x    [   Y m1m cvtpfml.asmgar;licbtosclibm6jeПdjwOKm( Z m; Module cvtpfml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name cvtpfml ; ; Converts old style parameters to float. ; C_cvtpf segment byte 'code' assume cs:C_cvtpf pu,\ mblic cvtpf@ cvtpf@ proc far push bp mov bp,sp pop bp mov dx,ss:6[bx] ; mov cx,dx and cx,7fffh ; strip to exponent cmp cx,3800h ; too low? jl underflow ; yes: underflow cmp cx,47f0h ; too large? jge overflow ; yes: overflow sub dx,3800h ; adjust to float exp jns nosign or dh,10h ; put in a new sign nosign: mov ax,ss:4[bx] ; mov cx,ss:2[bx] shl cx,1 rcl ax,1 rcl dx,1 ; do a single bit shift shl cx,1 rcl ax,1 rcl dx,1 ; do a single bit shift shl cx,1 rcl ax,1 rcl dx,1 8^ m ; do a single bit shift fexit: mov ss:2[bx],dx mov ss:[bx],ax ret underflow: xor dx,dx xor ax,ax jmp fexit ; return zero on underflow overflow: or dx,7fffh ; force high value mov ax,0ffffh jmp fexit ; return overflow cvtpf@ endp C_cvtpf ends end [9 X X X 5X UX X   M  s+ + + + o >Cq# KKKKJKKK+KK ?$?<?T?l?N??? ????2? ? ? N x    [   D` n chk87h.asmgar;licbtosclib8ֆjeudjwOKm "Pa n; Module chk87h.asm V010FM01 === 01/11/88 ; 010F01 01/11/88 rma - save/restore si/di ; 010A01 09/14/87 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; NAME Check87 ;Check for presence of 8087. DGROUP GROUP DATA EXTRN _8087:WORD ;Set to 0 if 8087 i\c ns absent, 1 otherwise. DATA SEGMENT PUBLIC 'DATA' WSType DW 0 ; Used by GETMODULEID MB 10/22/85 DATA ENDS EXTRN GETMODULEID:FAR ; Get hardware type info. CHK87 SEGMENT PUBLIC 'CODE' PUBLIC Check8087 Check8087 PROC FAR ASSUME CS:CHK87,DS:DGROUP,SS:DGROUP push bp mov bp,sp push cx ;for 8087 reg push ds push ss pop ds ; ; Test for existence of 8087 or 80287. ; MOV AX,SEG _8087 he n MOV ES,AX MOV WORD PTR ES:_8087,1 ; Chip is present if this is non-0 dw 0e3dbH ; FINIT Initialize the 287. ; Determine the processor type. PUSH SI PUSH DI MOV AX, 2 PUSH AX ; iBus MOV AX, 1 PUSH AX ; nPos PUSH DS MOV AX, OFFSET DGroup:WsType PUSH AX ; pModuleIdRet CALL GETMOtg nDULEID ; CTOS call. POP DI POP SI CMP AX, 7H JE FCHK87 ; Erc 7 = not implemented; ; means AWS/IWS. MOV AX, WSType ; WSType is returned by GETMODULEID. XOR AL, AL CMP AX, 100H ; MEC - '1' in AH means B26 JE FCHK87 CMP AX, 300H ; MEC - '3' means B27 JE FCHK87 ; MEC - must bei n '7' (B28) or 'A' (B38), assume it's a 287 FCHK287: ; 80287 initialization check XOR AX,AX ; Clean AX. MOV [bp-2],AX ; Clear temporary. dw 0dd9bH,0fe7eH ; FSTCW Examine STATUS (not control) word. PUSH AX ; Wait for store to complete POP AX PUSH AX POP AX ; For 286, low byte of status is zero if 287 is present. MOV AX, [bp-2] k n OR AL, AL JMP TEST87 FCHK87: ; 8087 initialization check XOR AX,AX ; Clean AX. MOV [bp-2],AX ; Clear temporary. dw 0d99bH,0fe7eH ; FSTCW Examine CONTROL (not status) word. PUSH AX ; Wait for store to complete POP AX PUSH AX POP AX ; Perform Non-286 test of status word. ;*** Control word is 3FF hex if 8087 is prm nesent. MDB 10/10/85 CMP word ptr [bp-2], 3FFH TEST87: JE GOT8087 MOV AX,SEG _8087 MOV ES,AX MOV WORD PTR ES:_8087,0 got8087: ;Restore what was saved and return. MOV AX,SEG _8087 MOV ES,AX MOV AX,WORD PTR ES:_8087 pop ds pop cx pop bp ret Check8087 endp CHK87 ENDS END *h >V)m:o o"ޱ pointerm.asmgar;licbtosclib:jedjxOKm %p o; Module pointerm.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name pointer ; ; Long memory model pointer functions (ughh!) ; C_pointer segment byte 'code' assume cs:C_pointer pnorm proc near mov ch,al mov cl,4 shr ax,cl add dx,ax mov al,ch and ax,0r ofh ret pnorm endp pneg proc near not bx not cx add bx,1 adc cx,0 ret pneg endp pcxadj proc near mov ch,cl mov cl,4 shl ch,cl xor cl,cl ret pcxadj endp ; ; pcmp@ - compares two poitners on the stack, sets the condition codes ; public pcmp@ pcmp@ proc far push bp mov bp,sp push di mov ax,6[bp] ; left hand pointer offset mov dx,ax mov cl,4 shr dx,cl add dx,8[bp] ; normalize the segment and ax,0fh ; normalize the offset mov bx,10[bp] ; right hand pointer offset mov di,bx shr di,ct ol add di,12[bp] ; right hand pointer segment and bx,0fh cmp dx,di ; compare segments jne pcmpend cmp ax,bx ; compare offsets pcmpend: pop di pop bp ret 8 pcmp@ endp public psbp@ psbp@ proc far push bp mov bp,sp push di push si mov ax,6[bp] mov dx,8[bp] mov di,10[bp] mov si,12[bp] mov bx,dx mov bp,si mov cl,4 shl bx,cl shl bp,cl mov cl,12 shr dx,cl shr si,cl add ax,bx adc dx,0 add di,bp adc si,0 sub ax,di sbb dx,si pop si pop di pop bp ret 8 psbp@ endp public padd@ v opadd@ proc far push bp mov bp,sp mov ax,6[bp] mov dx,8[bp] mov bx,10[bp] mov cx,12[bp] or cx,cx jge add1 call pneg jmp sub1 add1: add ax,bx jnc addok add dx,1000h addok: call pcxadj add dx,cx call pnorm pop bp ret 8 padd@ endp public psub@ psub@ proc far push bp mov bp,sp mov ax,6[bp] mov dx,8[bp] mov bx,10[bp] mov cx,12[bp] or cx,cx jge sub1 call pneg jmp add1 sub1: sub ax,bx jnc subok sub dx,1000h subok: call pcxadj sub dx,cx call pnorm pop bp ret 8 psub@ endp publix oc pina@ pina@ proc far push bp push di push es mov bp,sp mov di,8[bp] mov es,10[bp] mov ax,es:[di] mov dx,es:2[di] mov bx,12[bp] mov cx,14[bp] or cx,cx jge ina1 call pneg jmp dea1 ina1: add ax,bx jnc inaok add dx,1000h inaok: call pcxadj add dx,cx call pnorm xchg es:[di],ax xchg es:2[di],dx pop es pop di pop bp ret 8 pina@ endp public pdea@ pdea@ proc far push bp push di push es mov bp,sp mov di,8[bp] mov es,10[bp] mov ax,es:[di] mov dx,es:2[di] mov bx,12[bp] mov cx,14[z obp] or cx,cx jge dea1 call pneg jmp ina1 dea1: sub ax,bx jnc deaok sub dx,1000h deaok: call pcxadj sub dx,cx call pnorm xchg es:[di],ax xchg es:2[di],dx pop es pop di pop bp ret 8 pdea@ endp public pada@ pada@ proc far push bp push di push es mov bp,sp mov di,8[bp] mov es,10[bp] mov ax,es:[di] mov dx,es:2[di] mov bx,12[bp] mov cx,14[bp] or cx,cx jge ada1 call pneg jmp sba1 ada1: add ax,bx jnc adaok add dx,1000h adaok: call pcxadj add dx,cx call pnorm mov es:[di],ax mo| ov es:2[di],dx pop es pop di pop bp ret 8 pada@ endp public psba@ psba@ proc far push bp push di push es mov bp,sp mov di,8[bp] mov es,10[bp] mov ax,es:[di] mov dx,es:2[di] mov bx,12[bp] mov cx,14[bp] or cx,cx jge sba1 call pneg jmp ada1 sba1: sub ax,bx jnc sbaok sub dx,1000h sbaok: call pcxadj sub dx,cx call pnorm mov es:[di],ax mov es:2[di],dx pop es pop di pop bp ret 8 psba@ endp C_pointer ends end  p chk87ml.asmgar;licbtosclib:ljedjxOKm & p; Module chk87ml.asm V010FM01 === 01/11/88 ; 010F01 01/11/88 rma - save/restore si/di ; 010A01 09/14/87 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; NAME Check87 ;Check for presence of 8087. DGROUP GROUP DATA DATA SEGMENT PUBLIC 'DATA' EXTRN _8087:WORD  p ;Set to 0 if 8087 is absent, 1 otherwise. WSType DW 0 ; Used by GETMODULEID MB 10/22/85 DATA ENDS EXTRN GETMODULEID:FAR ; Get hardware type info. CHK87 SEGMENT PUBLIC 'CODE' PUBLIC Check8087 Check8087 PROC FAR ASSUME CS:CHK87,DS:DGROUP,SS:DGROUP PUSH BP MOV BP,SP PUSH CX ;for 8087 reg ; ; Test for existence of 8087 or 80287. ; MOV WORD PTR _8087,1 ; Chip is present if this is non-0 ( pdw 0e3dbH ; FINIT Initialize the 287. ; Determine the processor type. PUSH SI PUSH DI MOV AX, 2 PUSH AX ; iBus MOV AX, 1 PUSH AX ; nPos PUSH DS MOV AX, OFFSET DGroup:WsType PUSH AX ; pModuleIdRet CALL GETMODULEID ; CTOS call. POP DI POP SI CMP AX, 7H JE FC4 pHK87 ; Erc 7 = not implemented; ; means AWS/IWS. MOV AX, WSType ; WSType is returned by GETMODULEID. XOR AL, AL CMP AX, 100H ; MEC - '1' in AH means B26 JE FCHK87 CMP AX, 300H ; MEC - '3' means B27 JE FCHK87 ; MEC - must be '7' (B28) or 'A' (B38), assume it's a 287 FCHK287: ; 80287 initialization check XOR @ p AX,AX ; Clean AX. MOV [bp-2],AX ; Clear temporary. dw 0dd9bH,0fe7eH ; FSTCW Examine STATUS (not control) word. PUSH AX ; Wait for store to complete POP AX PUSH AX POP AX ; For 286, low byte of status is zero if 287 is present. MOV AX, [bp-2] OR AL, AL JMP TEST87 FCHK87: ; 8087 initialization check XOR AX,L pAX ; Clean AX. MOV [bp-2],AX ; Clear temporary. dw 0d99bH,0fe7eH ; FSTCW Examine CONTROL (not status) word. PUSH AX ; Wait for store to complete POP AX PUSH AX POP AX ; Perform Non-286 test of status word. ;*** Control word is 3FF hex if 8087 is present. MDB 10/10/85 CMP word ptr [bp-2], 3FFH TEST87: JE GOT8087 MOVX p WORD PTR _8087,0 GOT8087: ;Restore what was saved and return. MOV AX,WORD PTR _8087 POP CX POP BP RET Check8087 endp CHK87 ENDS END 1Hcz L"p"""""""""X"z"""""%"A"^"""""" ""P"""""I"T"v""""%B[|*h >V)m:d qC{ scopy.asmgar;licbtosclib{:"jeڟdjyOKm)p q; Module scopy.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; prog segment byte public 'code' assume cs:prog public scopy@ scopy@: push bp mov bp,sp push si push di push ds lds si,dword ptr 4[bp] les di,dword ptr 8[bp] mov ax,ds mov dx,es cmp ax,| qdx ja srchigher cmp si,di ja srchigher cld comm: rep movsb pop ds pop di pop si pop bp ret 8 srchigher: add si,cx add di,cx dec si dec di std jmp comm prog ends end  r  scopyml.asmgar;licbtosclib<jeBdjyOKmS r; Module scopyml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; C_scopyml segment byte public 'code' assume cs:C_scopyml public scopy@ scopy@ proc far push bp mov bp,sp r push si push di push ds lds si,dword ptr 6[bp] les di,dword ptr 10[bp] mov ax,ds mov dx,es cmp ax,dx ja srchigher cmp si,di ja srchigher cld comm: rep movsb pop ds pop di pop si pop bp ret 8 srchigher: add si,cx add di,cx dec si dec di std jmp comm ret ;dummy for overlay manager scopy@ endp C_scopyml ends end 0@/`P0%@&O`,,O--// 01?`;<=/>?O6BPx sԖIdasg.asmgar;licbtosclibI<jeTdjzOKmS s; Module dasg.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dasg prog segment byte public 'code' assume cs:prog public dasg@ public ddsasg@ public dssasg@ dasg@: pop cx pop word ptr es:[bx] pop word ptr es:2[bx] pop word ptr es:4[bx] pop word ě sptr es:6[bx] ; pop the double off stack jmp cx ; return ddsasg@: pop cx pop word ptr [bx] pop word ptr 2[bx] pop word ptr 4[bx] pop word ptr 6[bx] ; pop the double off stack jmp cx ; return dssasg@: pop cx pop word ptr ss:[bx] pop word ptr ss:2[bx] pop word ptr ss:4[bx] pop word ptr ss:6[bx] ; pop the double off stack jmp cx ; return public dload@ public ddsload@ public dssload@ dload@: pop cx push word ptr es:6[bx] push word ptr es:4[bx] push word ptr es:2[bx] push word ptr eН ss:[bx] ; push the double onto stack jmp cx ; return ddsload@: pop cx push word ptr 6[bx] push word ptr 4[bx] push word ptr 2[bx] push word ptr [bx] ; push the double onto stack jmp cx ; return dssload@: pop cx push word ptr ss:6[bx] push word ptr ss:4[bx] push word ptr ss:2[bx] push word ptr ss:[bx] ; push the double onto stack jmp cx ; return public dneg@ dneg@: mov bx,sp ; set up frame test word ptr ss:8[bx],7ff0h ; test the exponent jz iszero ; if zero, then number is zero ܟ s xor byte ptr ss:9[bx],80h ; invert the sign iszero: ret ; done prog ends end  tX  cvtdf.asmgar;licbtosclib <jedjzOKm1' t; Module cvtdf.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name cvtdf prog segment byte public 'code' assume cs:prog public cvtdf@ public cvtfd@ cvtfd@: pop cx ; save the return value pop dx pop ax ; fetch the float push cx xor bx,bx ; more  tlow bits mov cx,3 ; 3 bit shift ashifter: sar ax,1 rcr dx,1 rcr bx,1 loop ashifter and ax,8fffh ; clear the excess exp bits jnz nonzero pop cx push ax push ax push ax ; force zero in all bits push ax jmp cx ; return nonzero: pop cx add ax,3800h ; adjust exponent push ax push dx push bx xor ax,ax push ax jmp cx ; return cvtdf@: pop cx ; pop the return value pop ax pop bx ; 4 pop ax ; 6 pop dx ; 8 push di mov di,dx and di,7fffh ; strip to exponent cmp di,3800  th ; too low? jl underflow ; yes: underflow cmp di,47f0h ; too large? jge overflow ; yes: overflow sub dx,3800h ; adjust to float exp jns nosign or dh,10h ; put in a new sign nosign: mov di,cx mov cx,3 ; left shift 3 bits shifter: shl bx,1 rcl ax,1 rcl dx,1 ; do a single bit shift loop shifter ; and repeat mov cx,di fexit: pop di push dx push ax jmp cx underflow: xor dx,dx xor ax,ax jmp fexit ; return zero on underflow overflow: or dx,7fffh ; force high value mov ax,0fff tfh jmp fexit ; return overflow prog ends end $ u.pack.asmgar;licbtosclib<jedjzOKm'0 u; Module pack.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name pack prog segment byte public 'code' assume cs:prog public unpack@ public normalize@ unpack@: mov ax,6[bp+si] ; fetch the exponent part mov bx,ax and ax,0fff0h ; strip the mantissa an< ud bx,0fh ; remove exponent and sign or bx,10h ; put in understood bit mov 6[bp+si],bx ; replace in number ret normalize@: mov dx,6[bp+si] mov cx,4[bp+si] mov bx,2[bp+si] mov ax,[bp+si] or ax,bx or ax,cx or ax,dx ; any non-zero bits? jnz donorm ; nope ret donorm: mov ax,[bp+si] ; set up number push di and di,7fffh ; clear the sign shftright: cmp dx,1fh ; too small? jbe higher ; yes shr dx,1 ; shift fraction right rcr cx,1 rcr bx,1 rcr ax,1 adc ax,0 adc bx,0 adc cx,0H u adc dx,0 ; round fraction add di,10h ; increase exponent jl overflow jmp shftright overflow: pop di or di,7fffH mov 6[si+bp],di or di,8000H mov 4[si+bp],di mov 2[si+bp],di mov [si+bp],di ret underflow: pop di xor ax,ax mov 6[si+bp],ax mov 4[si+bp],ax mov 2[si+bp],ax mov [si+bp],ax ret higher: cmp dx,0fh ; correct size? ja ndone ; yes: done shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 sub di,10h ; adjust exponent jle underflow jmp higher ndone: and dx,0fh ; clear for exponeT unt or dx,di ; insert exponent pop di ; fetch the sign and di,8000h ; reduce to sign or dx,di ; insert it mov 6[si+bp],dx mov 4[si+bp],cx mov 2[si+bp],bx mov [si+bp],ax ; store it back ret ; done prog ends end ` v/" dasgh.asmgar;licbtosclib"<ʇjedj{OKm@(l v; Module dasgh.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dasgml C_dasgml segment byte 'code' assume cs:C_dasgml public dasg@ public ddsasg@ public dssasg@ dasg@ proc far pop ax pop cx pop word ptr es:[bx] pop word ptr es:2[bx] pop word ptrx v es:4[bx] pop word ptr es:6[bx] ; pop the double off stack push cx push ax ret dasg@ endp ddsasg@ proc far pop ax pop cx pop word ptr [bx] pop word ptr 2[bx] pop word ptr 4[bx] pop word ptr 6[bx] ; pop the double off stack push cx push ax ret ddsasg@ endp dssasg@ proc far pop ax pop cx pop word ptr ss:[bx] pop word ptr ss:2[bx] pop word ptr ss:4[bx] pop word ptr ss:6[bx] ; pop the double off stack push cx push ax ret dssasg@ endp public dload@ public ddsload@ public dssload@ dlo vad@ proc far pop ax pop cx push word ptr es:6[bx] push word ptr es:4[bx] push word ptr es:2[bx] push word ptr es:[bx] ; push the double onto stack push cx push ax ret dload@ endp ddsload@ proc far pop ax pop cx push word ptr 6[bx] push word ptr 4[bx] push word ptr 2[bx] push word ptr [bx] ; push the double onto stack push cx push ax ret ddsload@ endp dssload@ proc far pop ax pop cx push word ptr ss:6[bx] push word ptr ss:4[bx] push word ptr ss:2[bx] push word ptr ss:[bx] ; push the v double onto stack push cx push ax ret dssload@ endp public dneg@ dneg@ proc far push bp mov bp,sp ; set up frame test word ptr 12[bp],7ff0h ; test the exponent jz iszero ; if zero, then number is zero xor byte ptr 13[bp],80h ; invert the sign iszero: pop bp ret ; done dneg@ endp C_dasgml ends end  wL ldivml.asmgar;licbtosclibL>jeWdj{OKm  w; Module ldivml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; 04/28/87 rma - fix signed remainder (2 rem -3 = -2) ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name ldivml C_ldivml segment byte 'code' assume cs:C_ld wivml public ldiv@ public ludiv@ public lmod@ public lumod@ ldiv@ proc far push bp mov bp,sp pop bp xor cx,cx ; signed divide call far ptr lcommon pop bp ret ldiv@ endp ludiv@ proc far push bp mov bp,sp pop bp mov cx,1 ; unsigned divide call far ptr lcommon pop bp ret ludiv@ endp lmod@ proc far push bp mov bp,sp pop bp mov cx,2 ; signed remainder call far ptr lcommon pop bp ret lmod@ endp lumod@ proc far push bp mov bp,sp pop bp mov cx,3 ; unsigned remainder call  wfar ptr lcommon pop bp ret lumod@ endp ; ; di now contains a two bit control value. The low order ; bit (test mask of 1) is on if the operation is unsigned, ; signed otherwise. The next bit (test mask of 2) is on if ; the operation returns the remainder, quotient otherwise. ; lcommon proc far push bp pop bp pop ax pop ax push bp push si push di mov bp,sp ; set up frame mov di,cx ; ; dividend is pushed last, therefore the first in the args ; divisor next. ; mov ax,10[bp] ; get the first lo ww word mov dx,12[bp] ; get the first high word mov bx,14[bp] ; get the second low word mov cx,16[bp] ; get the second high word test di,1 ; signed divide? jnz positive ; no: skip ; ; Signed division should be done. Convert negative ; values to positive and do an unsigned division. ; Store the sign value in the next higher bit of ; di (test mask of 4). Thus when we are done, testing ; that bit will determine the sign of the result. ; or dx,dx ; test sign of dividend jns onepos neg dx  w neg ax sbb dx,0 ; negate dividend or di,4 onepos: or cx,cx ; test sign of divisor jns positive neg cx neg bx sbb cx,0 ; negate divisor test di,2 ; divide? ** jz adjustflag ; yes, adjust sign flag ** or dx,dx ; no, test sign of dividend ** jns positive ; dividend pos, skip sign flag ** adjustflag: xor di,4 positive: mov bp,cx mov cx,32 ; shift counter push di ; save the flags ; ; Now the stack looks something like this: ; ; 16[bp]: divisor (high word) ; 14[bp]: divisor (low  wword) ; 12[bp]: dividend (high word) ; 10[bp]: dividend (low word) ; 8[bp]: return CS ; 6[bp]: return IP ; 4[bp]: previous BP ; 2[bp]: previous SI ; [bp]: previous DI ; -2[bp]: control bits ; xor di,di ; fake a 64 bit dividend xor si,si ; xloop: shl ax,1 ; shift dividend left one bit rcl dx,1 rcl si,1 rcl di,1 cmp di,bp ; dividend larger? jb nosub ja subtract cmp si,bx ; maybe jb nosub subtract: sub si,bx sbb di,bp ; subtract the divisor inc ax ; build quotient nosu wb: loop xloop ; ; When done with the loop the four register value look like: ; ; | di | si | dx | ax | ; | remainder | quotient | ; pop bx ; get control bits test bx,2 ; remainder? jz usequo mov ax,si mov dx,di ; use remainder usequo: test bx,4 ; needs negative jz finish neg dx neg ax sbb dx,0 ; negate finish: pop di pop si pop bp ret 8 ldiv@ endp C_ldivml ends end h >V x lxmul.asmgar;licbtosclibB>je dj|OKm x; Module lxmul.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name lxmul prog segment byte public 'code' assume cs:prog public lxmul@ ; ; ax:dx - one argument dx is high order ; bx:cx - other argument cx is high order ; lxmul@: push bp mov bp,ax mov ax, xdx mul bx ; mult high of ax:dx by low of bx:cx xchg cx,ax ; result <-> high of bx:cx mul bp ; mult low of ax:dx by high of bx:cx add cx,ax ; cx += result mov ax,bp mul bx ; multiply low of each add dx,cx ; high order result += partials pop bp ret prog ends end   y fasgml.asmgar;licbtosclibB-jedj}OKm, y; Module fasgml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name fasgml C_fasgml segment byte 'code' assume cs:C_fasgml public fasg@ fasg@ proc far push bp mov bp,sp8 y pop bp pop cx pop ax pop word ptr es:[bx] pop word ptr es:2[bx] push ax push cx ret fasg@ endp public fload@ fload@ proc far pop cx pop ax push word ptr es:2[bx] push word ptr es:[bx] ; push the double onto stack push ax push cx ret fload@ endp C_fasgml ends end ` p0_ @ 0@/`P0%@&O`,,O--// 01?`;<=/>?O6BPxD z6ipdmul.asmgar;licbtosclibpBjeҟdj}OKmD (P z; Module dmul.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dmul dgroup group data data segment byte public 'data' extrn _8087:byte data ends prog segment byte public 'code' assume cs:prog,ds:dgroup public dmul@ extrn normalize@:near mult dw 22,14,\ z-4 dw 20,14,-6 dw 22,12,-6 dw 20,12,-8 dw 18,14,-8 dw 22,10,-8 dw 22,8,-10 dw 20,10,-10 dw 18,12,-10 dw 16,14,-10 dw 18,10,-12 dw 16,12,-12 dw 20,8,-12 dmul@: push bp cmp _8087,0 jz emul mov bp,sp db 9bh ;wait db 0ddh,46h,12 db 9bh ;wait db 0ddh,46h,4 db 9bh ;wait db 0deh,0c9h db 9bh ;wait db 0ddh,05eh,12 ; fld qword ptr 12[bp] ; fmul qword ptr 4[bp] ; fstp qword ptr 12[bp] pop bp db 9bh ;wait ret 8 emul: push si push di mov bp,sp ; set up a full frame mov ax,7ff0h ; look h zat the exponent test ax,22[bp] ; second op zero? jz fexit ; done test ax,14[bp] ; first op zero? jnz realmul ; nope, have to multiply mov ax,8[bp] mov bx,10[bp] mov cx,12[bp] mov dx,14[bp] mov 16[bp],ax mov 18[bp],bx mov 20[bp],cx mov 22[bp],dx fexit: mov sp,bp ; clean up stack pop di pop si pop bp ret 8 ; pop lowest operand underflow: xor ax,ax mov 22[bp],ax mov 20[bp],ax mov 18[bp],ax mov 16[bp],ax jmp fexit overflow: or bx,7fffh mov 22[bp],bx or bx,8000h mov 20[bp],bxt z mov 18[bp],bx mov 16[bp],bx jmp fexit realmul: mov ax,22[bp] mov dx,ax ; copy for exp. mov cx,ax ; save the mantissa mov bx,14[bp] xor ax,bx ; find the result sign and ax,8000h ; strip to the sign and dx,7ff0h ; strip to the exp and bx,7ff0h ; strip to the exp sub bx,4030h ; remove the bias add bx,dx ; produce the final exp js underflow ; addition went negative cmp bx,7ff0h ; check for overflow ja overflow or bx,ax ; force in the sign and cx,0fh ; remove the exponent or z cx,10h ; add in the understood bit mov 22[bp],cx mov ax,14[bp] ; remove exponent b. and ax,0fh ; remove the exponent or ax,10h ; add in the understood bit mov 14[bp],ax xor ax,ax push ax push ax push ax push ax push ax push ax mov cx,13 ; loop through mult table mov si,offset mult mloop: mov di,cs:[si] ; get one multiplier address mov ax,[di+bp] ; get the multiplier or ax,ax ; test sign jz nextloop ; skip if zero mov di,cs:2[si] ; get the other multiplier mul word ptr [di z+bp] ; unsigned multiply mov di,cs:4[si] ; the destination address add [di+bp],ax ; store the multiplied value inc di inc di adc [di+bp],dx ; add in the high word jnc nextloop ; done if no carry carryloop: inc di inc di inc word ptr [di+bp] ; put in the carry jz carryloop nextloop: add si,6 ; next table entry loop mloop mov di,bx ; set up the exponent mov ax,-10[bp] mov bx,-8[bp] mov cx,-6[bp] mov dx,-4[bp] mov 16[bp],ax mov 18[bp],bx mov 20[bp],cx mov 22[bp],dx mov si,16 ; s zet up the return address call normalize@ jmp fexit prog ends end  {6 lxmulml.asmgar;licbtosclibDjedj}OKm' {; Module lxmulml.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name lxmulml C_lxmulml segment byte 'code' assume cs:C_lxmulml public lxmul@ lxmul@ proc far push bp mov bp,ax mov ax,dx mul bx ; mult high of ax:dx by low of bx:cx xchg cx,ax ; resul {t <-> high of bx:cx mul bp ; mult low of ax:dx by high of bx:cx add cx,ax ; cx += result mov ax,bp mul bx ; multiply low of each add dx,cx ; high order result += partials pop bp ret lxmul@ endp C_lxmulml ends end  |(% dmulml.asmgar;licbtosclib%DЇjedj~OKma ( |; Module dmulml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dmulml dgroup group data data segment word public 'data' extrn _8087:byte data ends extrn normalize@:fa |r C_dmulml segment byte 'code' assume cs:C_dmulml,ds:dgroup public dmul@ dmul@ proc far push bp mov bp,sp cmp _8087,0 jz emul db 09bh db 0ddh,46h,0eh db 09bh db 0ddh,46h,06h db 09bh db 0deh,0c9h db 09bh db 0ddh,5eh,0eh db 09bh pop bp ret 8 emul: push si push di mov ax,7ff0h ; look at the exponent test ax,20[bp] ; second op zero? jz fexit ; done test ax,12[bp] ; first op zero? jnz realmul ; nope, have to multiply mov ax,6[bp] mov 14[bp],ax mov ax,8[bp] mov 16[bp],ax mov  |ax,10[bp] mov 18[bp],ax mov ax,12[bp] mov 20[bp],ax fexit: mov di,-4[bp] mov si,-2[bp] mov sp,bp ; clean up stack pop bp ret 8 ; pop lowest operand underflow: xor ax,ax mov 20[bp],ax mov 18[bp],ax mov 16[bp],ax mov 14[bp],ax jmp fexit overflow: or bx,7fffh mov 20[bp],bx or bx,8000h mov 18[bp],bx mov 16[bp],bx mov 14[bp],bx jmp fexit realmul: mov ax,20[bp] mov dx,ax ; copy for exp. mov cx,ax ; save the mantissa mov bx,12[bp] xor ax,bx ; find the result sign and ax,8000h  |; strip to the sign and dx,7ff0h ; strip to the exp and bx,7ff0h ; strip to the exp sub bx,4030h ; remove the bias add bx,dx ; produce the final exp js underflow ; addition went negative cmp bx,7ff0h ; check for overflow ja overflow or bx,ax ; force in the sign and cx,0fh ; remove the exponent or cx,10h ; add in the understood bit mov 20[bp],cx mov ax,12[bp] ; remove exponent b. and ax,0fh ; remove the exponent or ax,10h ; add in the understood bit mov 12[bp],ax xor ax,ax  |push ax push ax push ax push ax push ax push ax mov cx,13 ; loop through mult table mov si,offset mult mloop: mov di,cs:[si] ; get one multiplier address mov ax,[di+bp] ; get the multiplier or ax,ax ; test sign jz nextloop ; skip if zero mov di,cs:2[si] ; get the other multiplier mul word ptr [di+bp] ; unsigned multiply mov di,cs:4[si] ; the destination address add [di+bp],ax ; store the multiplied value inc di inc di adc [di+bp],dx ; add in the high word jnc nextloop ; done i |f no carry carryloop: inc di inc di inc word ptr [di+bp] ; put in the carry jz carryloop nextloop: add si,6 ; next table entry loop mloop lea sp,-14[bp] ; get the result string pop ax mov 14[bp],ax pop ax mov 16[bp],ax pop ax mov 18[bp],ax pop ax mov 20[bp],ax mov di,bx ; set up the exponent mov si,14 ; set up the return address call normalize@ jmp fexit mult dw 20,12,-8 dw 18,12,-10 dw 20,10,-10 dw 18,10,-12 dw 16,12,-12 dw 20,8,-12 dw 20,6,-14 dw 18,8,-14 dw 16,10,-14 dw | 14,12,-14 dw 16,8,-16 dw 14,10,-16 dw 18,6,-16 pop bp ret dmul@ endp C_dmulml ends end   s8 l+Op1es1Hcz L"p"""""""""X"z"""""%"A"^"""""" ""P"""""I"T"v""""%B[|*h >V( }o0jc0h.asmgar;licbtosclibjDjeΟdj~OKmc(4 }; Module c0h.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; code segment 'code' dgroup group data,const,memory,stack assume cs:code,ds:dgroup startx: mov ax,dgroup mov ds,ax call far ptr fProtectedMode mov bx,ds or ax,ax je realm mov ax,cs and ax,07h@ } or bx,ax realm: mov ss,bx mov sp,offset dgroup:stackTop call far ptr _main call far ptr exit code ends extrn exit:far extrn _main:far extrn fProtectedMode:far data segment 'data' data ends stack segment stack 'stack' db 8096 dup (?) stackTop label byte stack ends const segment 'const' const ends memory segment 'memory' memory ends end startx L ~b spushml.asmgar;licbtosclibFjedjOKm%X ~; Module spushml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; C_spushml segment byte 'code' assume cs:C_spushml public spush@ spush@ proc far push bp mov bp,sp pop bd ~p pop bx pop es sub sp,cx push bp mov bp,sp push si push di push ds mov ds,dx mov si,ax mov dx,es lea di,2[bp] mov ax,ss mov es,ax cld rep movsb pop ds pop di pop si pop bp push dx push bx ret spush@ endp C_spushml ends end  p ` p0_ @ 0@/`P0%@&O`,,O--// 01?`;<=/>?O6BPxp  overflow.asmgar;licbtosclibFyjedjOKm&| ; Module overflow.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name overflow prog segment byte public 'code' assume cs:prog public overflow@ overflow@: mov ax,400 push ax call far ptr ErrorExit prog ends extrn ErrorExit:far end  a# dasgm.asmgar;licbtosclib#ḞjedjOKm(  ; Module dasgm.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dasgml C_dasgml segment byte 'code' assume cs:C_dasgml public dasg@ dasg@ proc far pop ax pop cx pop word ptr [bx] pop word ptr 2[bx] pop word ptr 4[bx] pop word ptr 6[bx] ; pop the d  ouble off stack push cx push ax ret dasg@ endp public dload@ dload@ proc far pop ax pop cx push word ptr 6[bx] push word ptr 4[bx] push word ptr 2[bx] push word ptr [bx] ; push the double onto stack push cx push ax ret dload@ endp public dneg@ dneg@ proc far push bp mov bp,sp ; set up frame test word ptr 12[bp],7ff0h ; test the exponent jz iszero ; if zero, then number is zero xor byte ptr 13[bp],80h ; invert the sign iszero: pop bp ret ; done dneg@ endp C_dasgml ends end   \ daddh.asmgar;licbtosclibH$je(djOKm ; Module daddh.asm V010AM01 === 09/14/87 ; 06/08/87 rma - fix for low order bit error ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name daddh extrn _8087:byte extrn unpack@:far extrn normalize@:far C_daddh segment byte 'code' assume cs:C_daddh public dsub@ public dadd@ dsub@:  mov bx,sp ; get frame xor byte ptr ss:19[bx],80h ; invert sign to do subtraction dadd@ proc far push bp ; save the frame pointer mov ax,seg _8087 mov es,ax cmp es:_8087,0 jz emul mov bp,sp db 09bh db 0ddh,46h,0eh db 09bh db 0ddh,46h,06h db 09bh db 0deh,0c1h db 09bh db 0ddh,5eh,0eh db 09bh pop bp ret 8 emul: mov bp,sp ; set up a new frame push si ; save the register var push di test word ptr 12[bp],7ff0h ; lower operand zero? jz aexit ; yes: done test word ptr 20[bp],7ff0h  ; upper operand zero? jnz mustadd ; no: add them mov ax,6[bp] mov bx,8[bp] mov cx,10[bp] mov dx,12[bp] mov 14[bp],ax mov 16[bp],bx mov 18[bp],cx mov 20[bp],dx aexit: mov di,-4[bp] mov si,-2[bp] mov sp,bp ; restore stack pop bp ret 8 ; return and pop one double mustadd: mov si,14 ; upper operand call unpack@ mov dx,ax ; save exponent/sign mov di,si mov si,6 ; lower operand call unpack@ ; ; si points to lower operand ; di points to upper operand ; push dx ; save the upper s ign push ax ; save the lower sign and ax,07ff0h ; strip the sign and dx,07ff0h ; ditto mov cx,ax ; compare the exponents sub cx,dx jg silarger ; lower operand already larger jne doscale ; exponents same, no scaling xor ax,ax push ax jmp noscald doscale: xchg si,di ; exchange operands neg cx ; make exponent diff positive xchg ax,dx ; exchange exponents pop bx ; exchange signs xchg bx,-6[bp] push bx ; ; si points to larger exponent operand ; di points to smaller exponent opera nd ; cx contains difference (scaling amount). ; silarger: cmp ch,3 ; too great a difference? jbe scalwd ; no: scale by words first pop dx and dx,8000h ; strip to the sign or ax,dx ; combine afinish: mov di,14 mov cx,[si+bp] mov [di+bp],cx mov cx,2[si+bp] mov 2[di+bp],cx mov cx,4[si+bp] mov 4[di+bp],cx mov cx,6[si+bp] mov 6[di+bp],cx mov si,di mov di,ax call normalize@ ; pack up and exit jmp aexit scalwd: xor ax,ax push ax mov dx,6[di+bp] mov bx,2[di+bp] mov ax,[di+bp] push cx  mov cl,ch xor ch,ch jcxz scalwlend scalwloop: mov -10[bp],ah mov ax,bx mov bx,4[di+bp] mov 4[di+bp],dx xor dx,dx loop scalwloop scalwlend: pop cx xor ch,ch ; do the single word shift shr cx,1 shr cx,1 shr cx,1 shr cx,1 jcxz ascalend scale: shr dx,1 rcr word ptr 4[di+bp],1 rcr bx,1 rcr ax,1 ; shift fraction rcr byte ptr -10[bp],1 loop scale ; repeat for scale amount ascalend: mov 6[di+bp],dx mov 2[di+bp],bx mov [di+bp],ax noscald: mov bx,2[si+bp] mov cx,4[si+bp] mov dx,6[si +bp] mov ax,-8[bp] ; add or subtract? xor ax,-6[bp] ; combine the signs mov ax,[si+bp] js dosubtr ; we have to subtract ; clc ; test byte ptr -6[bp],80h NO - rma 6/8/87 ; jz anocarry ; stc ;anocarry: add [di+bp],ax ; was adc rma adc 2[di+bp],bx adc 4[di+bp],cx adc 6[di+bp],dx ; do the addition jmp short ncomm ; now normalize dosubtr: ; clc ; test byte ptr -6[bp],80h NO - rma 6/8/87 ; jz snocarry ; stc ;snocarry: sub [di+bp],ax ; was sbb rma sbb 2[di+bp],bx sbb 4[di+bp],cx sbb 6[di+b  p],dx ; do the subtraction jge norm ; positive, normalize xor ax,ax ; force a zero not word ptr 2[di+bp] not word ptr 4[di+bp] not word ptr 6[di+bp] not word ptr [di+bp] add word ptr [di+bp],1 adc 2[di+bp],ax adc 4[di+bp],ax adc 6[di+bp],ax ; hard negation (gross). jmp short ncomm norm: xor byte ptr -7[bp],80h ; invert the sign ncomm: mov si,di ; save the result address pop ax pop ax jmp afinish dadd@ endp C_daddh ends end  6M cvtdl.asmgar;licbtosclibHۆjedjOKmx&$  ; Module cvtdl.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name cvtdl prog segment byte public 'code' assume cs:prog public cvtdl@ public cvtdul@ public cvtld@ public cvtuld@ extrn unpack@:near extrn normalize@:near cvtld@: pop cx pop ax pop dx 0"  sub sp,8 push cx mov cx,dx or cx,cx jns cvtcom not dx not ax add ax,1 adc dx,0 jmp short cvtcom cvtuld@: pop cx pop ax pop dx sub sp,8 push cx xor cx,cx cvtcom: push bp push si push di mov bp,sp mov di,cx mov si,8 ; get address of long xor cx,cx mov [bp+si],ax mov 2[bp+si],dx mov 4[bp+si],cx mov 6[bp+si],cx and di,8000h ; strip to the sign or di,4330h ; store the unnormalized exponent call normalize@ mov sp,bp pop di pop si pop bp ret cvtdl@: cvtdul@: push bp push s<$ i mov bp,sp mov si,6 call unpack@ ; open up the double mov cx,ax and ax,7ff0h and cx,8000h lower: cmp ax,4230h ; the right exponent? jge higher ; maybe shr word ptr 6[bp+si],1 rcr word ptr 4[bp+si],1 rcr word ptr 2[bp+si],1 add ax,10h jmp lower higher: cmp ax,4230h ; right exponent yet? jle cdone shl word ptr [bp+si],1 rcl word ptr 2[bp+si],1 rcl word ptr 4[bp+si],1 sub ax,10h jmp higher cdone: mov dx,4[bp+si] ; fetch the long bits mov ax,2[bp+si] or cx,cx ; check the sign jH& z cexit not dx not ax add ax,1 adc dx,0 ; negate the long cexit: mov sp,bp pop si pop bp ret 8 prog ends end T(  fasgm.asmgar;licbtosclibJjedjOKm'`) ; Module fasgm.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name fasgml C_fasgml segment byte 'code' assume cs:C_fasgml public fasg@ fasg@ proc far pop cx pop ax pop word ptr [bx] pop word ptr 2[bx] push ax push cx ret fasg@ endp public fload@ l+ fload@ proc far pop cx pop ax push word ptr 2[bx] push word ptr [bx] ; push the double onto stack push ax push cx ret fload@ endp C_fasgml ends end x- n daddml.asmgar;licbtosclibnJjeПdjOKm(. ; Module daddml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; 06/08/87 rma - fix for low order bit error ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name daddml dgroup group data data segment byte public 'data' ex0 trn _8087:byte data ends extrn unpack@:far extrn normalize@:far C_daddml segment byte 'code' assume cs:C_daddml,ds:dgroup public dsub@ public dadd@ dsub@ proc far push bp mov bp,sp pop bp mov bx,sp ; get frame xor byte ptr ss:19[bx],80h ; invert sign to do subtraction jmp far ptr dadd@ ret ;dummy for overlay manager dsub@ endp dadd@ proc far push bp ; save the frame pointer mov bp,sp cmp _8087,0 jz emul db 09bh db 0ddh,46h,0eh db 09bh db 0ddh,46h,06h db 09bh db 0deh,0c1h db 09bh2  db 0ddh,5eh,0eh db 09bh pop bp ret 8 emul: push si ; save the register var push di test word ptr 12[bp],7ff0h ; lower operand zero? jz aexit ; yes: done test word ptr 20[bp],7ff0h ; upper operand zero? jnz mustadd ; no: add them mov ax,6[bp] mov bx,8[bp] mov cx,10[bp] mov dx,12[bp] mov 14[bp],ax mov 16[bp],bx mov 18[bp],cx mov 20[bp],dx aexit: mov di,-4[bp] mov si,-2[bp] mov sp,bp ; restore stack pop bp ret 8 ; return and pop one double mustadd: mov si,14 ; upper operand4  call unpack@ mov dx,ax ; save exponent/sign mov di,si mov si,6 ; lower operand call unpack@ ; ; si points to lower operand ; di points to upper operand ; push dx ; save the upper sign push ax ; save the lower sign and ax,07ff0h ; strip the sign and dx,07ff0h ; ditto mov cx,ax ; compare the exponents sub cx,dx jg silarger ; lower operand already larger jne doscale ; exponents same, no scaling xor ax,ax push ax jmp noscald doscale: xchg si,di ; exchange operands neg cx ; 6 make exponent diff positive xchg ax,dx ; exchange exponents pop bx ; exchange signs xchg bx,-6[bp] push bx ; ; si points to larger exponent operand ; di points to smaller exponent operand ; cx contains difference (scaling amount). ; silarger: cmp ch,3 ; too great a difference? jbe scalwd ; no: scale by words first pop dx and dx,8000h ; strip to the sign or ax,dx ; combine afinish: mov di,14 mov cx,[si+bp] mov [di+bp],cx mov cx,2[si+bp] mov 2[di+bp],cx mov cx,4[si+bp] mov 4[di+bp],8 cx mov cx,6[si+bp] mov 6[di+bp],cx mov si,di mov di,ax call normalize@ ; pack up and exit jmp aexit scalwd: xor ax,ax push ax mov dx,6[di+bp] mov bx,2[di+bp] mov ax,[di+bp] push cx mov cl,ch xor ch,ch jcxz scalwlend scalwloop: mov -10[bp],ah mov ax,bx mov bx,4[di+bp] mov 4[di+bp],dx xor dx,dx loop scalwloop scalwlend: pop cx xor ch,ch ; do the single word shift shr cx,1 shr cx,1 shr cx,1 shr cx,1 jcxz ascalend scale: shr dx,1 rcr word ptr 4[di+bp],1 rcr bx,1 rcr ax,1 ; s: hift fraction rcr byte ptr -10[bp],1 loop scale ; repeat for scale amount ascalend: mov 6[di+bp],dx mov 2[di+bp],bx mov [di+bp],ax noscald: mov bx,2[si+bp] mov cx,4[si+bp] mov dx,6[si+bp] mov ax,-8[bp] ; add or subtract? xor ax,-6[bp] ; combine the signs mov ax,[si+bp] js dosubtr ; we have to subtract ; clc ; test byte ptr -6[bp],80h NO - rma 6/8/87 ; jz anocarry ; stc ;anocarry: add [di+bp],ax ; was adc rma adc 2[di+bp],bx adc 4[di+bp],cx adc 6[di+bp],dx ; do the addition jmp sho< rt ncomm ; now normalize dosubtr: ; clc ; test byte ptr -6[bp],80h NO - rma 6/8/87 ; jz snocarry ; stc ;snocarry: sub [di+bp],ax ; was sbb rma sbb 2[di+bp],bx sbb 4[di+bp],cx sbb 6[di+bp],dx ; do the subtraction jge norm ; positive, normalize xor ax,ax ; force a zero not word ptr 2[di+bp] not word ptr 4[di+bp] not word ptr 6[di+bp] not word ptr [di+bp] add word ptr [di+bp],1 adc 2[di+bp],ax adc 4[di+bp],ax adc 6[di+bp],ax ; hard negation (gross). jmp short ncomm norm: xor byte ptr >  -7[bp],80h ; invert the sign ncomm: mov si,di ; save the result address pop ax pop ax jmp afinish ret ;dummy for overlay manager dadd@ endp C_daddml ends end k} i L:lP:lT:lX:l\:l`:ld:lh:ll:lp:lt:lx:l|:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l:l &,28>DJPV\bhntz@ QAc0l.asmgar;licbtosclibALjeNdjOKm5A ; Module c0l.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - satisfy overlay mgr call/ret conventions ; 03/11/88 010F01 rma - set BP for overlay manager ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; code segment 'code' dgroup group stack,datD a,bss assume cs:code,ds:dgroup startx: push bp ;ovly mgr mov bp,sp ;ovly mgr mov ax,dgroup mov ds,ax call far ptr fProtectedMode mov bx,ds or ax,ax je realm mov ax,cs and ax,07h or bx,ax realm: mov ss,bx mov bp,offset dgroup:stackTop ;3/11/88 mov sp,bp call far ptr _main call far ptr exit ret ;ovly mgr code ends extrn exit:far extrn _main:far extrn fProtectedMode:far data segment para public 'stack' data ends bss segment byte public 'stack' bss ends stack segment stack 'stack' db 809F 6 dup (?) stackTop label byte stack ends end startx E ! 0F I/ r CNCLL{LLLi,[9 X X X 5X UX X   M  s+ + + + o >Cq# KKKKJKKK+KK ?$?<?T?l?N??? ????2? ? ? N x    [     ]   H `ddiv.asmgar;licbtosclib`LjefdjOKm  ,I ; Module ddiv.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name ddiv ; ; Double precision divide using Knuth's division algorithm ; D given in section 4.3.1 (Volume 2 first edition) of The ; Art of Computer Programming. ; ; The division does an arbitrary pr8K ecision divide of the ; fractional parts of the floating point numbers. The ; exponent and sign are handled separately. ; dgroup group data data segment byte public 'data' extrn _8087:byte data ends prog segment byte public 'code' assume cs:prog,ds:dgroup public ddiv@ extrn normalize@:near ddiv@: push bp cmp _8087,0 jz emul mov bp,sp db 9bh ;wait db 0ddh,046h,04h db 9bh ;wait db 0ddh,46h,12 db 9bh ;wait db 0deh,0f9h db 9bh ;wait db 0ddh,05eh,12 ; fld qword ptr 4[bp] ; fdiv qword ptr 12[bp]DM  ; fstp qword ptr 12[bp] pop bp db 9bh ;wait ret 8 emul: push si push di mov bp,sp ; set up a full frame mov ax,7ff0h ; look at the exponent test ax,22[bp] ; second op zero? jz overflow ; done test ax,14[bp] ; first op zero? jnz realdiv ; nope, have to divide underflow: xor ax,ax mov 22[bp],ax mov 20[bp],ax mov 18[bp],ax mov 16[bp],ax fexit: mov sp,bp ; clean up stack pop di pop si pop bp ret 8 ; pop lowest operand overflow: mov ax,12[bp] ; use sign of op 1 or ax,7fffh ;PO  set high mov 22[bp],ax or ax,8000h ; force all bits for mantissa mov 20[bp],ax mov 18[bp],ax mov 16[bp],ax jmp fexit realdiv: mov ax,22[bp] mov dx,ax ; copy for exp. mov di,ax ; save the mantissa mov bx,14[bp] xor ax,bx ; find the result sign and ax,8000h ; strip to the sign and dx,7ff0h ; strip to the exp and bx,7ff0h ; strip to the exp sub dx,3fb0h ; remove the bias neg dx add dx,bx ; produce the final exp js underflow ; addition went negative cmp dx,7ff0h ; check for ov\Q erflow jg overflow or dx,ax ; force in the sign push dx and di,0fh ; remove the exponent mov dx,14[bp] mov cx,12[bp] mov bx,10[bp] mov ax,8[bp] call dnorm mov si,-3 push dx push cx push bx push ax xor ax,ax push ax push ax push ax push ax mov 22[bp],ax ; clear upper bits mov dx,di mov cx,20[bp] mov bx,18[bp] mov ax,16[bp] call dnorm mov 14[bp],dx mov 12[bp],cx mov 10[bp],bx mov 8[bp],ax d2: ; Knuth step d2 mov cx,8 ; set up repeat count mov di,23 ; set up for quotienhS t address d3: mov ax,-1[bp+si] cmp ah,14[bp] ; if Uj >= V1 jb qhatx mov bl,255 ; qhat = 255 mov bh,al ; remember pseudo remainder jmp short setrhat qhatx: div byte ptr 14[bp] ; qhat = (Ujb + Uj+1) / V1 mov bx,ax ; remember quotient and remainder jmp short tstqhat decqhat: dec bl ; qhat-- setrhat: add bh,14[bp] jc d4 tstqhat: mov al,13[bp] ; V2 mul bl ; V2 * qhat cmp ah,bh jb d4 ja decqhat cmp al,-2[bp+si] ja decqhat d4: ; Knuth step d4 push di ; save quotient address mov di,8 tU  ; multiply back push cx sub si,7 ; find the addition position mov cx,7 ; do 7 multiplies xor dx,dx ; byte carry mulloop: mov al,[bp+di] mul bl ; qhat * Vi add ax,dx ; add in the carry byte mov dl,ah ; save the carry byte sub [bp+si],al ; do the subtraction adc dx,0 ; combine in the carry for next byte inc di inc si loop mulloop ; loop until done sub [bp+si],dl ; final subtraction pop cx ; restore outer loop count d5: ; Knuth step d5 pop di ; restore quotient address mov [bp+W di],bl ; store qhat as quotient digit jnc d7 ; test for borrow in sub above d6: ; Knuth step d6 dec byte ptr [bp+di] ; Qj-- push di ; save quotient address again sub si,7 ; back up U push cx mov cx,7 ; repeat 7 times mov di,8 clc addback: mov al,[bp+di] adc [bp+si],al ; add back inc si inc di loop addback pop cx pop di adc byte ptr [bp+si],0 d7: dec di dec si loop d3 d8: ; Knuth step d8 - we do nothing norm: ; now normalize the result mov di,-2[bp] ; retrieve the sign/expoY  nent mov si,16 ; quotient pointer call normalize@ jmp fexit ; done dnorm: shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 xor dh,dh or dl,80h ; force proper fraction ret prog ends end [  overflml.asmgar;licbtosclibLwjedjOKm&\ ; Module overflml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name overflml p_overflow segment byte 'code' assume cs:p_overflow public overflow@ overflow@: push bp m^ ov bp,sp mov ax,400 push ax call far ptr ErrorExit ret ;dummy for overlay manager p_overflow ends extrn ErrorExit:far end @Л _ /O  p ` p0_ @ 0@/`P0%@&O`,,O--// 01?`;<=/>?O6BPx` ico ddivh.asmgar;licbtoscliboLjeџdjOKm(a ; Module ddivh.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; ; ; Double precision divide using Knuth's division algorithm ; D given in section 4.3.1 (Volume 2 first edition) of The ; Art of Computer Programming. ; ; The division does an arbitrary precision dic vide of the ; fractional parts of the floating point numbers. The ; exponent and sign are handled separately. ; name ddivh extrn _8087:byte extrn normalize@:far C_ddivh segment byte 'code' assume cs:C_ddivh public ddiv@ dnorm proc near shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 xor dh,dh or dl,80h ; force proper fraction ret dnorm endp ddiv@ proc far push bp mov ax,seg _8087 mov es,ax cmp es:_8087,0 jz emul mov bpe ,sp db 09bh db 0ddh,46h,06h db 09bh db 0ddh,46h,0eh db 09bh db 0deh,0f9h db 09bh db 0ddh,5eh,0eh db 09bh pop bp ret 8 emul: mov bp,sp ; set up a full frame push si push di mov ax,7ff0h ; look at the exponent test ax,20[bp] ; second op zero? jz overflow ; done test ax,12[bp] ; first op zero? jnz realdiv ; nope, have to divide underflow: xor ax,ax mov 20[bp],ax mov 18[bp],ax mov 16[bp],ax mov 14[bp],ax fexit: mov di,-4[bp] mov si,-2[bp] mov sp,bp ; clean up stack pop bp g ret 8 ; pop lowest operand overflow: mov ax,12[bp] ; use sign of op 1 or ax,7fffh ; set high mov 20[bp],ax or ax,8000h ; force all bits for mantissa mov 18[bp],ax mov 16[bp],ax mov 14[bp],ax jmp fexit realdiv: mov ax,20[bp] mov dx,ax ; copy for exp. mov di,ax ; save the mantissa mov bx,12[bp] xor ax,bx ; find the result sign and ax,8000h ; strip to the sign and dx,7ff0h ; strip to the exp and bx,7ff0h ; strip to the exp sub dx,3fb0h ; remove the bias neg dx add dx,bx ; pri oduce the final exp js underflow ; addition went negative cmp dx,7ff0h ; check for overflow jg overflow or dx,ax ; force in the sign push dx and di,0fh ; remove the exponent mov dx,12[bp] mov cx,10[bp] mov bx,8[bp] mov ax,6[bp] call dnorm mov si,-7 push dx push cx push bx push ax xor ax,ax push ax push ax push ax push ax mov 20[bp],ax ; clear upper bits mov dx,di mov cx,18[bp] mov bx,16[bp] mov ax,14[bp] call dnorm mov 12[bp],dx mov 10[bp],cx mov 8[bp],bx mov 6[bp],ax dl 2: ; Knuth step d2 mov cx,8 ; set up repeat count mov di,21 ; set up for quotient address d3: mov ax,-1[si+bp] cmp ah,12[bp] ; if Uj == V1 jb qhatx mov bl,255 ; qhat = 255 mov bh,al ; remember pseudo remainder jmp short setrhat qhatx: div byte ptr 12[bp] ; qhat = (Ujb + Uj+1) / V1 mov bx,ax ; remember quotient and remainder jmp short tstqhat decqhat: dec bl ; qhat-- setrhat: add bh,12[bp] jc d4 tstqhat: mov al,11[bp] ; V2 mul bl ; V2 * qhat cmp ah,bh jb d4 ja decqhat cmp al,-2n [si+bp] ja decqhat d4: ; Knuth step d4 push di ; save quotient address mov di,6 ; multiply back push cx sub si,7 ; find the addition position mov cx,7 ; do 7 multiplies xor dx,dx ; byte carry mulloop: mov al,[di+bp] mul bl ; qhat * Vi add ax,dx ; add in the carry byte mov dl,ah ; save the carry byte sub [si+bp],al ; do the subtraction adc dx,0 ; combine in the carry for next byte inc di inc si loop mulloop ; loop until done sub [si+bp],dl ; final subtraction pop cx ; restore p outer loop count d5: ; Knuth step d5 pop di ; restore quotient address mov [di+bp],bl ; store qhat as quotient digit jnc d7 ; test for borrow in sub above d6: ; Knuth step d6 dec byte ptr [di+bp] ; Qj-- push di ; save quotient address again sub si,7 ; back up U push cx mov cx,7 ; repeat 7 times mov di,6 clc addback: mov al,[di+bp] adc [si+bp],al ; add back inc si inc di loop addback pop cx pop di adc byte ptr [si+bp],0 d7: dec di dec si loop d3 d8: ; Knuth step d8 - we do (r  nothing norm: ; now normalize the result mov di,-6[bp] ; retrieve the sign/exponent mov si,14 ; quotient pointer call normalize@ jmp fexit ; done ddiv@ endp C_ddivh ends end 4t akc0m.asmgar;licbtosclibkNjeΟdjOKm(@u ; Module c0m.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; code segment byte 'code' dgroup group data,dend,stack assume cs:code,ds:dgroup startx: mov ax,dgroup mov ds,ax mov es,ax call far ptr fProtectedMode mov bx,ds or ax,ax je realm mov ax,cs anLw d ax,07h or bx,ax realm: mov ss,bx mov sp,offset dgroup:stackTop call far ptr _main call far ptr exit code ends extrn exit:far extrn _main:far extrn fProtectedMode:far data segment para public 'stack' public _brklvl _brklvl dw dgroup:edataTop data ends bss segment byte public 'stack' bss ends dend segment word public 'stack' edataTop label byte dend ends stack segment stack 'stack' db 8096 dup (?) stackTop label byte stack ends end startx Xy `lrsh.asmgar;licbtosclibPV)m:l Sc0s.asmgar;licbtosclibZgjedjOKmx ; Module c0s.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; extrn exit:far extrn fProtectedMode:far prog segment byte public 'code' dgroup group data,dend,stack assume cs:prog,ds:dgroup extrn _main:near startx: mov ax,dgroup mov ds,ax mov es,ax call  far ptr fProtectedMode mov bx,ds or ax,ax je realm mov ax,cs and ax,07h or bx,ax realm: mov ss,bx mov sp,offset dgroup:stackTop call near ptr _main call far ptr exit prog ends data segment para public 'stack' public _brklvl _brklvl dw dgroup:edataTop data ends bss segment byte public 'stack' bss ends dend segment word public 'stack' edataTop label byte dend ends stack segment stack 'stack' db 8096 dup (?) stackTop label byte stack ends end startx   ldiv.asmgar;licbtosclib\jedjOKm ' ; Module ldiv.asm V010AM01 === 09/14/87 ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name ldiv prog segment byte public 'code' assume cs:prog public ldiv@ public ludiv@ public lmod@ public lumod@ ldiv@: xor bx,bx ; signed divide jmp short lcommon ludiv@: mov bx,1 ; uns igned divide jmp short lcommon lmod@: mov bx,2 ; signed remainder jmp short lcommon lumod@: mov bx,3 ; unsigned remainder ; ; bx now contains a two bit control value. The low order ; bit (test mask of 1) is on if the operation is unsigned, ; signed otherwise. The next bit (test mask of 2) is on if ; the operation returns the remainder, quotient otherwise. ; lcommon: push bp push si push di mov bp,sp ; set up frame mov di,bx ; ; dividend is pushed last, therefore the first in the args ;  divisor next. ; mov ax,8[bp] ; get the first low word mov dx,10[bp] ; get the first high word mov bx,12[bp] ; get the second low word mov cx,14[bp] ; get the second high word test di,1 ; signed divide? jnz positive ; no: skip ; ; Signed division should be done. Convert negative ; values to positive and do an unsigned division. ; Store the sign value in the next higher bit of ; di (test mask of 4). Thus when we are done, testing ; that bit will determine the sign of the result. ; or dx, dx ; test sign of dividend jns onepos neg dx neg ax sbb dx,0 ; negate dividend or di,4 onepos: or cx,cx ; test sign of divisor jns positive neg cx neg bx sbb cx,0 ; negate divisor test di,2 ; divide? ** jz adjustflag ; yes, adjust sign flag ** or dx,dx ; no, test sign of dividend ** jns positive ; dividend pos, skip sign flag ** adjustflag: xor di,4 positive: mov bp,32 ; shift counter xchg bp,cx push di ; save the flags ; ; Now the stack looks something like this: ; ; 14̲ [bp]: divisor (high word) ; 12[bp]: divisor (low word) ; 10[bp]: dividend (high word) ; 8[bp]: dividend (low word) ; 6[bp]: return IP ; 4[bp]: previous BP ; 2[bp]: previous SI ; [bp]: previous DI ; -2[bp]: control bits ; xor di,di ; fake a 64 bit dividend xor si,si ; xloop: shl ax,1 ; shift dividend left one bit rcl dx,1 rcl si,1 rcl di,1 cmp di,bp ; dividend larger? jb nosub ja subtract cmp si,bx ; maybe jb nosub subtract: sub si,bx sbb di,bp ; subtract the divisor iش nc ax ; build quotient nosub: loop xloop ; ; When done with the loop the four register value look like: ; ; | di | si | dx | ax | ; | remainder | quotient | ; pop bx ; get control bits test bx,2 ; remainder? jz usequo mov ax,si mov dx,di ; use remainder usequo: test bx,4 ; needs negative jz finish neg dx neg ax sbb dx,0 ; negate finish: pop di pop si pop bp ret 8 prog ends end  A packml.asmgar;licbtosclib^jedjOKm% ; Module packml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name packml C_packml segment byte 'code' assume cs:C_packml public unpack@ public normalize@ unpack@ proc  far push bp mov bp,sp pop bp mov ax,6[si+bp] ; fetch the exponent part mov bx,ax and ax,0fff0h ; strip the mantissa and bx,0fh ; remove exponent and sign or bx,10h ; put in understood bit mov 6[si+bp],bx ; replace in number ret unpack@ endp normalize@ proc far push bp mov bp,sp pop bp mov dx,6[si+bp] mov cx,4[si+bp] mov bx,2[si+bp] mov ax,[si+bp] or ax,bx or ax,cx or ax,dx ; any non-zero bits? jnz donorm ; nope ret donorm: mov ax,[si+bp] ; set up number push di and di ,7fffh ; clear the sign shftright: cmp dx,1fh ; too small? jbe higher ; yes shr dx,1 ; shift fraction right rcr cx,1 rcr bx,1 rcr ax,1 adc ax,0 adc bx,0 adc cx,0 adc dx,0 ; round fraction add di,10h ; increase exponent jl overflow jmp shftright overflow: pop di or di,7fffH mov 6[si+bp],di or di,8000H mov 4[si+bp],di mov 2[si+bp],di mov [si+bp],di ret underflow: pop di xor ax,ax mov 6[si+bp],ax mov 4[si+bp],ax mov 2[si+bp],ax mov [si+bp],ax ret higher: cmp dx,0fh ;  correct size? ja ndone ; yes: done shl ax,1 rcl bx,1 rcl cx,1 rcl dx,1 sub di,10h ; adjust exponent jle underflow jmp higher ndone: and dx,0fh ; clear for exponent or dx,di ; insert exponent pop di ; fetch the sign and di,8000h ; reduce to sign or dx,di ; insert it mov 6[si+bp],dx mov 4[si+bp],cx mov 2[si+bp],bx mov [si+bp],ax ; store it back ret ; done normalize@ endp C_packml ends end JH2RFsssG7  - cvtdfml.asmgar;licbtosclib^je7?mOKm_%(,  ; Module cvtdfml.asm V011IM01 === 06/13/90 ; ; 06/13/90 011I01 sbw - Move return code just prior to endp's to satisfy ; requirements of virtual code (overlay) manager. ; Eliminates CALL/RET convention warning from the ; Linker. ; ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA.8  ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1990 UNISYS CORPORATION ; name cvtdfml C_cvtdfml segment byte 'code' assume cs:C_cvtdfml public cvtdf@ public cvtfd@ cvtfd@ proc far push bp mov bp,sp pop bp pop cx ; save the return value pop es ; save return segment pop dx pop ax ; fetch the float xor bx,bx ; more low bits push cx mov cx,3 ; 3 bit shift ashifter: sar ax,1 rcr dx,1 rcr bx,1 loop ashifter pop cx and ax,8fffh ; clear the excess exp bits jnz nonzeroD  push ax push ax push ax ; force zero in all bits push ax jmp cvtret nonzero: add ax,3800h ; adjust exponent push ax push dx push bx xor ax,ax push ax cvtret: push es mov ax,ds mov es,ax push cx db 0cbh ; far return cvtfd@ endp cvtdf@ proc far push bp mov bp,sp ; get frame address push di mov ax,12[bp] ; get the sign/exponent mov dx,ax ; copy for sign and ax,7fffh ; strip to exponent cmp ax,3800h ; too low? jl underflow ; yes: underflow cmp ax,47f0h ; too large? jgP e overflow ; yes: overflow sub dx,3800h ; adjust to float exp jns nosign or dh,10h ; put in a new sign nosign: mov di,10[bp] ; get the mantissa mov ax,8[bp] ; more of it mov cx,3 ; left shift 3 bits shifter: shl ax,1 rcl di,1 rcl dx,1 ; do a single bit shift loop shifter ; and repeat jmp fexit ; return overflow underflow: xor dx,dx xor di,di jmp fexit ; return zero on underflow overflow: or dx,7fffh ; force high value mov di,0ffffh fexit: mov 12[bp],dx mov 10[bp],di ; sto\ re the float pop di pop bp ret 4 ; pop the unneeded words cvtdf@ endp C_cvtdfml ends end h  dasgml.asmgar;licbtosclib^݆jedjOKm?&t ; Module dasgml.asm V010GM01 === 04/13/88 ; 04/13/88 010G01 rma - fix for overlay mgr ; 09/14/87 010A01 rma - initial submittal ; ; PROPRIETARY PROGRAM MATERIAL ; REPRODUCTION OR DISCLOSURE IS PROHIBITED WITHOUT WRITTEN AUTHORIZATION ; OF THE PATENT DIVISION OF UNISYS CORPORATION, DETROIT, MICHIGAN 48232, USA. ; COPYRIGHT (C) 1987 BORLAND INTERNATIONAL ; COPYRIGHT (C) 1987 UNISYS CORPORATION ; name dasgml C_dasgml segment byte 'code' assume cs:C_dasgml public dasg@ public ddsasg@ public dssasg@ da sg@ proc far push bp mov bp,sp pop bp pop ax pop cx pop word ptr es:[bx] pop word ptr es:2[bx] pop word ptr es:4[bx] pop word ptr es:6[bx] ; pop the double off stack push cx push ax ret dasg@ endp ddsasg@ proc far push bp mov bp,sp pop bp pop ax pop cx pop word ptr [bx] pop word ptr 2[bx] pop word ptr 4[bx] pop word ptr 6[bx] ; pop the double off stack push cx push ax ret ddsasg@ endp dssasg@ proc far push bp mov bp,sp pop bp pop ax pop cx pop word ptr ss:[bx] pop word ptr s s:2[bx] pop word ptr ss:4[bx] pop word ptr ss:6[bx] ; pop the double off stack push cx push ax ret dssasg@ endp public dload@ public ddsload@ public dssload@ dload@ proc far push bp mov bp,sp pop bp pop ax pop cx push word ptr es:6[bx] push word ptr es:4[bx] push word ptr es:2[bx] push word ptr es:[bx] ; push the double onto stack push cx push ax ret dload@ endp ddsload@ proc far push bp mov bp,sp pop bp pop ax pop cx push word ptr 6[bx] push word ptr 4[bx] push word ptr 2[bx]  push word ptr [bx] ; push the double onto stack push cx push ax ret ddsload@ endp dssload@ proc far push bp mov bp,sp pop bp pop ax pop cx push word ptr ss:6[bx] push word ptr ss:4[bx] push word ptr ss:2[bx] push word ptr ss:[bx] ; push the double onto stack push cx push ax ret dssload@ endp public dneg@ dneg@ proc far push bp mov bp,sp ; set up frame test word ptr 12[bp],7ff0h ; test the exponent jz iszero ; if zero, then number is zero xor byte ptr 13[bp],80h ; invert the sig n iszero: pop bp ret ; done dneg@ endp C_dasgml ends end 0 r D X + 8 o ]Kx ? GfVt  Kq ".s s 3 !!@!$ cV clibhmake.subgar;licbtosclib 8jedjOKm) copy [kbd] cflags.tmp y-g -zBdata -zCclibc -zDdata -zTdata -a -1 -Z -O -I[SYS] -mhfCcompiler @cflags.tmp abs.cCcompiler @cflags.tmp asctime.cCcompiler @cflags.tmp atof.cCcompiler @cflags.tmp atoi.cCcompiler -S @cflags.tmp brk.cassemble brk.asm [nul]delete brk.asm Ccompiler @cflags.tmp bsearch.cCcompiler @cflags.tmp calloc.cassemble chk87h.asm [nul]Ccompiler @cflags.tmp closea.cCcompiler @cflags.tmp creat.cCcompiler @cflags.tmp ctime.cCcompiler @cflags.tmp   ctosio.cCcompiler @cflags.tmp ctype.cassemble cvtdfml.asm [nul]assemble cvtdlml.asm [nul]assemble cvtpfml.asm [nul]assemble daddh.asm [nul]assemble dasgml.asm [nul]assemble dcmpml.asm [nul]assemble ddivh.asm [nul]assemble dmulh.asm [nul]Ccompiler @cflags.tmp ecvt.cCcompiler @cflags.tmp exit.cCcompiler @cflags.tmp exita.cassemble fasgml.asm [nul]Ccompiler @cflags.tmp fclose.cCcompiler @cflags.tmp fflush.cCcompiler @cflags.tmp fgetc.c Ccompiler @cflags.tmp fgets.cCcompiler @cflags.tmp filbuf.cCcompiler @cflags.tmp flsbuf.cCcompiler @cflags.tmp fopen.cCcompiler @cflags.tmp fprintf.cCcompiler @cflags.tmp fputc.cCcompiler @cflags.tmp fputs.cCcompiler @cflags.tmp fread.cCcompiler @cflags.tmp fseek.cCcompiler @cflags.tmp ftell.cCcompiler @cflags.tmp fwrite.cCcompiler @cflags.tmp gcvt.cCcompiler @cflags.tmp gets.cCcompiler @cflags.tmp getw.cCcompiler @cflags.tmp heap.cCcompiler @cflags.tmp index. cCcompiler -S @cflags.tmp init8087.cassemble init8087.asm [nul]delete init8087.asm Ccompiler -S @cflags.tmp inport.cassemble inport.asm [nul]delete inport.asm assemble ldivml.asm [nul]Ccompiler -S @cflags.tmp longjmp.cassemble longjmp.asm [nul]delete longjmp.asm assemble lrshml.asm [nul]Ccompiler @cflags.tmp lsearch.cassemble lxmulml.asm [nul]Ccompiler @cflags.tmp mainu.cCcompiler @cflags.tmp malloc.cCcompiler @cflags.tmp mem.cCcompiler @cflags.tmp   merrno.cCcompiler -S @cflags.tmp movmem.cassemble movmem.asm [nul]delete movmem.asm Ccompiler -S @cflags.tmp myds.cassemble myds.asm [nul]delete myds.asm Ccompiler @cflags.tmp opena.cCcompiler -S @cflags.tmp outport.cassemble outport.asm [nul]delete outport.asm assemble overflml.asm [nul]assemble packml.asm [nul]Ccompiler @cflags.tmp peek.cassemble pointer.asm [nul]Ccompiler @cflags.tmp poke.cCcompiler @cflags.tmp printf.cCcompiler @cflags.tmp pri ntfa.cCcompiler @cflags.tmp puts.cCcompiler @cflags.tmp putw.cCcompiler @cflags.tmp qsort.cCcompiler @cflags.tmp rand.cCcompiler @cflags.tmp reada.cCcompiler @cflags.tmp realloc.cCcompiler @cflags.tmp scanf.cassemble scopyml.asm [nul]Ccompiler -S @cflags.tmp segread.cassemble segread.asm [nul]delete segread.asm Ccompiler @cflags.tmp setbuf.cCcompiler @cflags.tmp setvbuf.cCcompiler @cflags.tmp sprintf.cassemble spushml.asm [nul]Ccompiler @cflags.tmp ssign al.cCcompiler @cflags.tmp ssort.cCcompiler @cflags.tmp stime.cCcompiler @cflags.tmp strcat.cCcompiler @cflags.tmp strchr.cCcompiler -S @cflags.tmp strcmp.cassemble strcmp.asm [nul]delete strcmp.asm Ccompiler @cflags.tmp strcpy.cCcompiler @cflags.tmp strcspn.cCcompiler -S @cflags.tmp strlen.cassemble strlen.asm [nul]delete strlen.asm Ccompiler -S @cflags.tmp strncmp.cassemble strncmp.asm [nul]delete strncmp.asm Ccompiler @cflags.tmp strpbrk.cCcompiler @cflags .tmp strtok.cCcompiler @cflags.tmp swab.cCcompiler @cflags.tmp time.cCcompiler @cflags.tmp tolower.cCcompiler @cflags.tmp ungetc.cCcompiler @cflags.tmp unlink.cCcompiler @cflags.tmp writea.cCcompiler @cflags.tmp version.ccopy [kbd] clibobj.fls yabs.obj asctime.obj atof.obj atoi.obj brk.obj bsearch.obj calloc.obj chk87h.obj closea.obj creat.obj ctime.obj ctosio.obj ctype.obj cvtdfml.obj cvtdlml.obj cvtpfml.obj daddh.obj dasgml.obj dcmpml.obj ddivh.obj dmulh.obj ecvt.obj exit.obj exita  .obj fasgml.obj fclose.obj fflush.obj fgetc.obj fgets.obj filbuf.obj flsbuf.obj fopen.obj fprintf.obj fputc.obj fputs.obj fread.obj fseek.obj ftell.obj fwrite.obj gcvt.obj gets.obj getw.obj heap.obj index.obj init8087.obj inport.obj ldivml.obj longjmp.obj lrshml.obj lsearch.obj lxmulml.obj mainu.obj malloc.obj mem.obj merrno.obj movmem.obj myds.obj opena.obj outport.obj overflml.obj packml.obj peek.obj pointer.obj poke.obj printf.obj printfa.obj puts.obj putw.obj qsort.obj rand.obj reada.obj realloc.obj sca(  nf.obj scopyml.obj segread.obj setbuf.obj setvbuf.obj sprintf.obj spushml.obj ssignal.obj ssort.obj stime.obj strcat.obj strchr.obj strcmp.obj strcpy.obj strcspn.obj strlen.obj strncmp.obj strpbrk.obj strtok.obj swab.obj time.obj tolower.obj ungetc.obj unlink.obj writea.obj version.objdelete clibh.liblibrarian clibh.lib @clibobj.fls yappend Legalese clibh.libCcompiler @cflags.tmp asin.cCcompiler @cflags.tmp atan.cCcompiler @cflags.tmp ceil.cCcompiler @cflags.tmp exp.cCcompiler @cflags.tm4  p fabs.cCcompiler @cflags.tmp fmod.cCcompiler @cflags.tmp frexp.cCcompiler @cflags.tmp hugeval.cCcompiler @cflags.tmp ldexp.cCcompiler -S @cflags.tmp log.cassemble log.asm [nul]delete log.asm Ccompiler @cflags.tmp modf.cCcompiler -S @cflags.tmp pow.cassemble pow.asm [nul]delete pow.asm Ccompiler @cflags.tmp sin.cCcompiler @cflags.tmp sinh.cCcompiler -S @cflags.tmp sqrt.cassemble sqrt.asm [nul]delete sqrt.asm Ccompiler @cflags.tmp tan.cCcompiler @cflags.t@  mp tanh.ccopy [kbd] mathobj.fls yasin.obj atan.obj ceil.obj exp.obj fabs.obj fmod.obj frexp.obj hugeval.obj ldexp.obj log.obj modf.obj pow.obj sin.obj sinh.obj sqrt.obj tan.obj tanh.objdelete mathh.liblibrarian mathh.lib @mathobj.fls yappend Legalese mathh.libL  cliblmake.subgar;licbtosclib(‡jedjOKm'X copy [kbd] cflags.tmp y-1 -Z -a -O -w -I[SYS] -mlf Ccompiler @cflags.tmp abs.cCcompiler @cflags.tmp asctime.cCcompiler @cflags.tmp atof.cCcompiler @cflags.tmp atoi.cCcompiler -S @cflags.tmp brk.cassemble brk.asm [nul]delete brk.asmCcompiler @cflags.tmp bsearch.cCcompiler @cflags.tmp calloc.cassemble chk87ml.asm [nul]Ccompiler @cflags.tmp closea.cCcompiler @cflags.tmp creat.cCcompiler @cflags.tmp ctime.cCcompiler @cflags.tmp ctosio.cCcompiler @cflags.tmpd  ctype.cassemble cvtdfml.asm [nul]assemble cvtdlml.asm [nul]assemble cvtpfml.asm [nul]assemble daddml.asm [nul]assemble dasgml.asm [nul]assemble dcmpml.asm [nul]assemble ddivml.asm [nul]assemble dmulml.asm [nul]Ccompiler @cflags.tmp ecvt.cCcompiler @cflags.tmp exit.cCcompiler @cflags.tmp exita.cassemble fasgml.asm [nul]Ccompiler @cflags.tmp fclose.cCcompiler @cflags.tmp fflush.cCcompiler @cflags.tmp fgetc.cCcompiler @cflags.tmp fgetp s.cCcompiler @cflags.tmp filbuf.cCcompiler @cflags.tmp flsbuf.cCcompiler @cflags.tmp fopen.cCcompiler @cflags.tmp fprintf.cCcompiler @cflags.tmp fputc.cCcompiler @cflags.tmp fputs.cCcompiler @cflags.tmp fread.cCcompiler @cflags.tmp fseek.cCcompiler @cflags.tmp ftell.cCcompiler @cflags.tmp fwrite.cCcompiler @cflags.tmp gcvt.cCcompiler @cflags.tmp gets.cCcompiler @cflags.tmp getw.cCcompiler @cflags.tmp heap.cCcompiler @cflags.tmp index.cCcompiler -S @cflags.tmp | init8087.cassemble init8087.asm [nul]delete init8087.asmCcompiler -S @cflags.tmp inport.cassemble inport.asm [nul]delete inport.asmassemble ldivml.asm [nul]Ccompiler -S @cflags.tmp longjmp.cassemble longjmp.asm [nul]delete longjmp.asmassemble lrshml.asm [nul]Ccompiler @cflags.tmp lsearch.cassemble lxmulml.asm [nul]Ccompiler @cflags.tmp mainu.cCcompiler @cflags.tmp malloc.cCcompiler @cflags.tmp mem.cCcompiler @cflags.tmp merrno.cCcompiler -S @cflags. tmp movmem.cassemble movmem.asm [nul]delete movmem.asmCcompiler -S @cflags.tmp myds.cassemble myds.asm [nul]delete myds.asmCcompiler @cflags.tmp opena.cCcompiler -S @cflags.tmp outport.cassemble outport.asm [nul]delete outport.asmassemble overflml.asm [nul]assemble packml.asm [nul]Ccompiler @cflags.tmp peek.cassemble pointer.asm [nul]Ccompiler @cflags.tmp poke.cCcompiler @cflags.tmp printf.cCcompiler @cflags.tmp printfa.cCcompiler @cflags.tmp puts .cCcompiler @cflags.tmp putw.cCcompiler @cflags.tmp qsort.cCcompiler @cflags.tmp rand.cCcompiler @cflags.tmp reada.cCcompiler @cflags.tmp realloc.cCcompiler @cflags.tmp scanf.cassemble scopyml.asm [nul]Ccompiler -S @cflags.tmp segread.cassemble segread.asm [nul]delete segread.asmCcompiler @cflags.tmp setbuf.cCcompiler @cflags.tmp setvbuf.cCcompiler @cflags.tmp sprintf.cassemble spushml.asm [nul]Ccompiler @cflags.tmp ssignal.cCcompiler @cflags.tmp ssort.c Ccompiler @cflags.tmp stime.cCcompiler @cflags.tmp strcat.cCcompiler @cflags.tmp strchr.cCcompiler -S @cflags.tmp strcmp.cassemble strcmp.asm [nul]delete strcmp.asmCcompiler @cflags.tmp strcpy.cCcompiler @cflags.tmp strcspn.cCcompiler -S @cflags.tmp strlen.cassemble strlen.asm [nul]delete strlen.asmCcompiler -S @cflags.tmp strncmp.cassemble strncmp.asm [nul]delete strncmp.asmCcompiler @cflags.tmp strpbrk.cCcompiler @cflags.tmp strtok.cCcompiler @cflags.tmp  swab.cCcompiler @cflags.tmp time.cCcompiler @cflags.tmp tolower.cCcompiler @cflags.tmp ungetc.cCcompiler @cflags.tmp unlink.cCcompiler @cflags.tmp writea.cCcompiler @cflags.tmp version.ccopy [kbd] clibobj.fls yabs.obj asctime.obj atof.obj atoi.obj brk.obj bsearch.obj calloc.obj chk87ml.obj closea.obj creat.obj ctime.obj ctosio.obj ctype.obj cvtdfml.obj cvtdlml.obj cvtpfml.obj daddml.obj dasgml.obj dcmpml.obj ddivml.obj dmulml.obj ecvt.obj exit.obj exita.obj fasgml.obj fclose.obj fflush.o  bj fgetc.obj fgets.obj filbuf.obj flsbuf.obj fopen.obj fprintf.obj fputc.obj fputs.obj fread.obj fseek.obj ftell.obj fwrite.obj gcvt.obj gets.obj getw.obj heap.obj index.obj init8087.obj inport.obj ldivml.obj longjmp.obj lrshml.obj lsearch.obj lxmulml.obj mainu.obj malloc.obj mem.obj merrno.obj movmem.obj myds.obj opena.obj outport.obj overflml.obj packml.obj peek.obj pointer.obj poke.obj printf.obj printfa.obj puts.obj putw.obj qsort.obj rand.obj reada.obj realloc.obj scanf.obj scopyml.obj segread.obj setb  uf.obj setvbuf.obj sprintf.obj spushml.obj ssignal.obj ssort.obj stime.obj strcat.obj strchr.obj strcmp.obj strcpy.obj strcspn.obj strlen.obj strncmp.obj strpbrk.obj strtok.obj swab.obj time.obj tolower.obj ungetc.obj unlink.obj writea.obj version.objdelete clibl.liblibrarian clibl.lib @clibobj.fls yappend Legalese clibl.libCcompiler @cflags.tmp asin.cCcompiler @cflags.tmp atan.cCcompiler @cflags.tmp ceil.cCcompiler @cflags.tmp exp.cCcompiler @cflags.tmp fabs.cCcompiler @cflags.tmp f  mod.cCcompiler @cflags.tmp frexp.cCcompiler @cflags.tmp hugeval.cCcompiler @cflags.tmp ldexp.cCcompiler -S @cflags.tmp log.cassemble log.asm [nul]delete log.asm Ccompiler @cflags.tmp modf.cCcompiler -S @cflags.tmp pow.cassemble pow.asm [nul]delete pow.asm Ccompiler @cflags.tmp sin.cCcompiler @cflags.tmp sinh.cCcompiler -S @cflags.tmp sqrt.cassemble sqrt.asm [nul]delete sqrt.asm Ccompiler @cflags.tmp tan.cCcompiler @cflags.tmp tanh.ccopy [kbd] mathobj.fls y  asin.obj atan.obj ceil.obj exp.obj fabs.obj fmod.obj frexp.obj hugeval.obj ldexp.obj log.obj modf.obj pow.obj sin.obj sinh.obj sqrt.obj tan.obj tanh.objdelete mathl.liblibrarian mathl.lib @mathobj.fls yappend Legalese mathl.lib   clibmmake.subgar;licbtosclib*je-djOKm  copy [kbd] cflags.tmp y-1 -Z -a -O -w -I[SYS] -mmf Ccompiler @cflags.tmp abs.cCcompiler @cflags.tmp asctime.cCcompiler @cflags.tmp atof.cCcompiler @cflags.tmp atoi.cCcompiler -S @cflags.tmp brk.cassemble brk.asm [nul]delete brk.asmCcompiler @cflags.tmp bsearch.cCcompiler @cflags.tmp calloc.cassemble chk87ml.asm [nul]Ccompiler @cflags.tmp closea.cCcompiler @cflags.tmp creat.cCcompiler @cflags.tmp ctime.cCcompiler @cflags.tmp ctosio.cCcompiler @cflags.tmp   ctype.cassemble cvtdfml.asm [nul]assemble cvtdlml.asm [nul]assemble cvtpfml.asm [nul]assemble daddml.asm [nul]assemble dasgml.asm [nul]assemble dcmpml.asm [nul]assemble ddivml.asm [nul]assemble dmulml.asm [nul]Ccompiler @cflags.tmp ecvt.cCcompiler @cflags.tmp exit.cCcompiler @cflags.tmp exita.cassemble fasgm.asm [nul]Ccompiler @cflags.tmp fclose.cCcompiler @cflags.tmp fflush.cCcompiler @cflags.tmp fgetc.cCcompiler @cflags.tmp fgets  .cCcompiler @cflags.tmp filbuf.cCcompiler @cflags.tmp flsbuf.cCcompiler @cflags.tmp fopen.cCcompiler @cflags.tmp fprintf.cCcompiler @cflags.tmp fputc.cCcompiler @cflags.tmp fputs.cCcompiler @cflags.tmp fread.cCcompiler @cflags.tmp free.cCcompiler @cflags.tmp fseek.cCcompiler @cflags.tmp ftell.cCcompiler @cflags.tmp fwrite.cCcompiler @cflags.tmp gcvt.cCcompiler @cflags.tmp gets.cCcompiler @cflags.tmp getw.cCcompiler @cflags.tmp heap.cCcompiler @cflags.tmp index .cCcompiler -S @cflags.tmp init8087.cassemble init8087.asm [nul]delete init8087.asmCcompiler -S @cflags.tmp inport.cassemble inport.asm [nul]delete inport.asmassemble ldivml.asm [nul]Ccompiler -S @cflags.tmp longjmp.cassemble longjmp.asm [nul]delete longjmp.asmassemble lrshml.asm [nul]Ccompiler @cflags.tmp lsearch.cassemble lxmulml.asm [nul]Ccompiler @cflags.tmp mainu.cCcompiler @cflags.tmp malloc.cCcompiler @cflags.tmp mem.cCcompiler @cflags.tmp m$ errno.cCcompiler -S @cflags.tmp movmem.cassemble movmem.asm [nul]delete movmem.asmCcompiler -S @cflags.tmp myds.cassemble myds.asm [nul]delete myds.asmCcompiler @cflags.tmp opena.cCcompiler -S @cflags.tmp outport.cassemble outport.asm [nul]delete outport.asmassemble overflml.asm [nul]assemble packml.asm [nul]Ccompiler @cflags.tmp peek.cassemble pointerm.asm [nul]Ccompiler @cflags.tmp poke.cCcompiler @cflags.tmp printf.cCcompiler @cflags.tmp printfa0 .cCcompiler @cflags.tmp puts.cCcompiler @cflags.tmp putw.cCcompiler @cflags.tmp qsort.cCcompiler @cflags.tmp rand.cCcompiler @cflags.tmp reada.cCcompiler @cflags.tmp realloc.cCcompiler @cflags.tmp scanf.cassemble scopyml.asm [nul]Ccompiler -S @cflags.tmp segread.cassemble segread.asm [nul]delete segread.asmCcompiler @cflags.tmp setbuf.cCcompiler @cflags.tmp setvbuf.cCcompiler @cflags.tmp sprintf.cassemble spushml.asm [nul]Ccompiler @cflags.tmp ssignal.c< Ccompiler @cflags.tmp ssort.cCcompiler @cflags.tmp stime.cCcompiler @cflags.tmp strcat.cCcompiler @cflags.tmp strchr.cCcompiler -S @cflags.tmp strcmp.cassemble strcmp.asm [nul]delete strcmp.asmCcompiler @cflags.tmp strcpy.cCcompiler @cflags.tmp strcspn.cCcompiler -S @cflags.tmp strlen.cassemble strlen.asm [nul]delete strlen.asmCcompiler -S @cflags.tmp strncmp.cassemble strncmp.asm [nul]delete strncmp.asmCcompiler @cflags.tmp strpbrk.cCcompiler @cflags.tmp stH rtok.cCcompiler @cflags.tmp swab.cCcompiler @cflags.tmp time.cCcompiler @cflags.tmp tolower.cCcompiler @cflags.tmp ungetc.cCcompiler @cflags.tmp unlink.cCcompiler @cflags.tmp writea.cCcompiler @cflags.tmp version.ccopy [kbd] clibobj.fls yabs.obj asctime.obj atof.obj atoi.obj brk.obj bsearch.obj calloc.obj chk87ml.obj closea.obj creat.obj ctime.obj ctosio.obj ctype.obj cvtdfml.obj cvtdlml.obj cvtpfml.obj daddml.obj dasgml.obj dcmpml.obj ddivml.obj dmulml.obj ecvt.obj exit.obj exita.objT  fasgm.obj fclose.obj fflush.obj fgetc.obj fgets.obj filbuf.obj flsbuf.obj fopen.obj fprintf.obj fputc.obj fputs.obj fread.obj free.obj fseek.obj ftell.obj fwrite.obj gcvt.obj gets.obj getw.obj heap.obj index.obj init8087.obj inport.obj ldivml.obj longjmp.obj lrshml.obj lsearch.obj lxmulml.obj mainu.obj malloc.obj mem.obj merrno.obj movmem.obj myds.obj opena.obj outport.obj overflml.obj packml.obj peek.obj pointerm.obj poke.obj printf.obj printfa.obj puts.obj putw.obj qsort.obj rand.obj reada.obj realloc.ob`  j scanf.obj scopyml.obj segread.obj setbuf.obj setvbuf.obj sprintf.obj spushml.obj ssignal.obj ssort.obj stime.obj strcat.obj strchr.obj strcmp.obj strcpy.obj strcspn.obj strlen.obj strncmp.obj strpbrk.obj strtok.obj swab.obj time.obj tolower.obj ungetc.obj unlink.obj writea.obj version.objdelete clibm.liblibrarian clibm.lib @clibobj.fls yappend Legalese clibm.libCcompiler @cflags.tmp asin.cCcompiler @cflags.tmp atan.cCcompiler @cflags.tmp ceil.cCcompiler @cflags.tmp exp.cCcompiler @cflal  gs.tmp fabs.cCcompiler @cflags.tmp fmod.cCcompiler @cflags.tmp frexp.cCcompiler @cflags.tmp hugeval.cCcompiler @cflags.tmp ldexp.cCcompiler -S @cflags.tmp log.cassemble log.asm [nul]delete log.asm Ccompiler @cflags.tmp modf.cCcompiler -S @cflags.tmp pow.cassemble pow.asm [nul]delete pow.asm Ccompiler @cflags.tmp sin.cCcompiler @cflags.tmp sinh.cCcompiler -S @cflags.tmp sqrt.cassemble sqrt.asm [nul]delete sqrt.asm Ccompiler @cflags.tmp tan.cCcompiler @cflx!  ags.tmp tanh.ccopy [kbd] mathobj.fls yasin.obj atan.obj ceil.obj exp.obj fabs.obj fmod.obj frexp.obj hugeval.obj ldexp.obj log.obj modf.obj pow.obj sin.obj sinh.obj sqrt.obj tan.obj tanh.objdelete mathm.liblibrarian mathm.lib @mathobj.fls yappend Legalese mathm.lib# &+m clibovmake.subgarlicbtosclibm *:gdjOKm&$ copy [kbd] cflags.tmp y-t -Y -r -g -zCC_cliblo -1 -Z -a -O -w -I[SYS] -mlf Ccompiler @cflags.tmp abs.cCcompiler -S @cflags.tmp asctime.cassemble asctime.asm [nul]delete asctime.asmCcompiler -S @cflags.tmp atof.cassemble atof.asm [nul]delete atof.asmCcompiler -S @cflags.tmp atoi.cassemble atoi.asm [nul]delete atoi.asmCcompiler -S @cflags.tmp brk.cassemble brk.asm [nul]delete brk.asmCcompiler -S @cflags.tmp bsearch.cassemble bsearch.asm [nul]delete bsear& ch.asmCcompiler -S @cflags.tmp calloc.cassemble calloc.asm [nul]delete calloc.asmassemble chk87ml.asm [nul]Ccompiler -S @cflags.tmp closea.cassemble closea.asm [nul]delete closea.asmCcompiler -S @cflags.tmp creat.cassemble creat.asm [nul]delete creat.asmCcompiler -S @cflags.tmp ctime.cassemble ctime.asm [nul]delete ctime.asmCcompiler -S @cflags.tmp ctosio.cassemble ctosio.asm [nul]delete ctosio.asmCcompiler -S @cflags.tmp ctype.cassemble ctype.asm [( nul]delete ctype.asmassemble cvtdfml.asm [nul]assemble cvtdlml.asm [nul]assemble cvtpfml.asm [nul]assemble daddml.asm [nul]assemble dasgml.asm [nul]assemble dcmpml.asm [nul]assemble ddivml.asm [nul]assemble dmulml.asm [nul]Ccompiler -S @cflags.tmp ecvt.cassemble ecvt.asm [nul]delete ecvt.asmCcompiler -S @cflags.tmp exit.cassemble exit.asm [nul]delete exit.asmCcompiler -S @cflags.tmp exita.cassemble exita.asm [nul]delete exita.asmas* semble fasgml.asm [nul]Ccompiler -S @cflags.tmp fclose.cassemble fclose.asm [nul]delete fclose.asmCcompiler -S @cflags.tmp fflush.cassemble fflush.asm [nul]delete fflush.asmCcompiler -S @cflags.tmp fgetc.cassemble fgetc.asm [nul]delete fgetc.asmCcompiler -S @cflags.tmp fgets.cassemble fgets.asm [nul]delete fgets.asmCcompiler -S @cflags.tmp filbuf.cassemble filbuf.asm [nul]delete filbuf.asmCcompiler -S @cflags.tmp flsbuf.cassemble flsbuf.asm [nul]del, ete flsbuf.asmCcompiler -S @cflags.tmp fopen.cassemble fopen.asm [nul]delete fopen.asmCcompiler -S @cflags.tmp fprintf.cassemble fprintf.asm [nul]delete fprintf.asmCcompiler -S @cflags.tmp fputc.cassemble fputc.asm [nul]delete fputc.asmCcompiler -S @cflags.tmp fputs.cassemble fputs.asm [nul]delete fputs.asmCcompiler -S @cflags.tmp fread.cassemble fread.asm [nul]delete fread.asmCcompiler -S @cflags.tmp fseek.cassemble fseek.asm [nul]delete fseek.asmCcomp. iler -S @cflags.tmp ftell.cassemble ftell.asm [nul]delete ftell.asmCcompiler -S @cflags.tmp fwrite.cassemble fwrite.asm [nul]delete fwrite.asmCcompiler -S @cflags.tmp gcvt.cassemble gcvt.asm [nul]delete gcvt.asmCcompiler -S @cflags.tmp gets.cassemble gets.asm [nul]delete gets.asmCcompiler -S @cflags.tmp getw.cassemble getw.asm [nul]delete getw.asmCcompiler -S @cflags.tmp heap.cassemble heap.asm [nul]delete heap.asmCcompiler -S @cflags.tmp index.cassem0 ble index.asm [nul]delete index.asmCcompiler -S @cflags.tmp init8087.cassemble init8087.asm [nul]delete init8087.asmCcompiler -S @cflags.tmp inport.cassemble inport.asm [nul]delete inport.asmassemble ldivml.asm [nul]Ccompiler -S @cflags.tmp longjmp.cassemble longjmp.asm [nul]delete longjmp.asmassemble lrshml.asm [nul]Ccompiler -S @cflags.tmp lsearch.cassemble lsearch.asm [nul]delete lsearch.asmassemble lxmulml.asm [nul]Ccompiler -S @cflags.tmp ma2 inu.cassemble mainu.asm [nul]delete mainu.asmCcompiler -S @cflags.tmp malloc.cassemble malloc.asm [nul]delete malloc.asmCcompiler -S @cflags.tmp mem.cassemble mem.asm [nul]delete mem.asmCcompiler -S @cflags.tmp merrno.cassemble merrno.asm [nul]delete merrno.asmCcompiler -S @cflags.tmp movmem.cassemble movmem.asm [nul]delete movmem.asmCcompiler -S @cflags.tmp myds.cassemble myds.asm [nul]delete myds.asmCcompiler -S @cflags.tmp opena.cassemble opena.asm 4  [nul]delete opena.asmCcompiler -S @cflags.tmp outport.cassemble outport.asm [nul]delete outport.asmassemble overflml.asm [nul]assemble packml.asm [nul]Ccompiler -S @cflags.tmp peek.cassemble peek.asm [nul]delete peek.asmassemble pointer.asm [nul]Ccompiler -S @cflags.tmp poke.cassemble poke.asm [nul]delete poke.asmCcompiler -S @cflags.tmp printf.cassemble printf.asm [nul]delete printf.asmCcompiler -S @cflags.tmp printfa.cassemble printfa.asm [6  nul]delete printfa.asmCcompiler -S @cflags.tmp puts.cassemble puts.asm [nul]delete puts.asmCcompiler -S @cflags.tmp putw.cassemble putw.asm [nul]delete putw.asmCcompiler -S @cflags.tmp qsort.cassemble qsort.asm [nul]delete qsort.asmCcompiler -S @cflags.tmp rand.cassemble rand.asm [nul]delete rand.asmCcompiler -S @cflags.tmp reada.cassemble reada.asm [nul]delete reada.asmCcompiler -S @cflags.tmp realloc.cassemble realloc.asm [nul]delete realloc.asmCcomp9  iler -S @cflags.tmp scanf.cassemble scanf.asm [nul]delete scanf.asmassemble scopyml.asm [nul]Ccompiler -S @cflags.tmp segread.cassemble segread.asm [nul]delete segread.asmCcompiler -S @cflags.tmp setbuf.cassemble setbuf.asm [nul]delete setbuf.asmCcompiler -S @cflags.tmp setvbuf.cassemble setvbuf.asm [nul]delete setvbuf.asmCcompiler -S @cflags.tmp sprintf.cassemble sprintf.asm [nul]delete sprintf.asmassemble spushml.asm [nul]Ccompiler -S @cflags.tmp ;  ssignal.cassemble ssignal.asm [nul]delete ssignal.asmCcompiler -S @cflags.tmp ssort.cassemble ssort.asm [nul]delete ssort.asmCcompiler -S @cflags.tmp stime.cassemble stime.asm [nul]delete stime.asmCcompiler -S @cflags.tmp strcat.cassemble strcat.asm [nul]delete strcat.asmCcompiler -S @cflags.tmp strchr.cassemble strchr.asm [nul]delete strchr.asmCcompiler -S @cflags.tmp strcmp.cassemble strcmp.asm [nul]delete strcmp.asmCcompiler -S @cflags.tmp strcpy.cas =  semble strcpy.asm [nul]delete strcpy.asmCcompiler -S @cflags.tmp strcspn.cassemble strcspn.asm [nul]delete strcspn.asmCcompiler -S @cflags.tmp strlen.cassemble strlen.asm [nul]delete strlen.asmCcompiler -S @cflags.tmp strncmp.cassemble strncmp.asm [nul]delete strncmp.asmCcompiler -S @cflags.tmp strpbrk.cassemble strpbrk.asm [nul]delete strpbrk.asmCcompiler -S @cflags.tmp strtok.cassemble strtok.asm [nul]delete strtok.asmCcompiler -S @cflags.tmp swab.cass,? emble swab.asm [nul]delete swab.asmCcompiler -S @cflags.tmp time.cassemble time.asm [nul]delete time.asmCcompiler -S @cflags.tmp tolower.cassemble tolower.asm [nul]delete tolower.asmCcompiler -S @cflags.tmp ungetc.cassemble ungetc.asm [nul]delete ungetc.asmCcompiler -S @cflags.tmp unlink.cassemble unlink.asm [nul]delete unlink.asmCcompiler -S @cflags.tmp writea.cassemble writea.asm [nul]delete writea.asmCcompiler -S @cflags.tmp version.cassemble version8A .asm [nul]delete version.asmcopy [kbd] clibobj.fls yabs.obj asctime.obj atof.obj atoi.obj brk.obj bsearch.obj calloc.obj chk87ml.obj closea.obj creat.obj ctime.obj ctosio.obj ctype.obj cvtdfml.obj cvtdlml.obj cvtpfml.obj daddml.obj dasgml.obj dcmpml.obj ddivml.obj dmulml.obj ecvt.obj exit.obj exita.obj fasgml.obj fclose.obj fflush.obj fgetc.obj fgets.obj filbuf.obj flsbuf.obj fopen.obj fprintf.obj fputc.obj fputs.obj fread.obj fseek.obj ftell.obj fwrite.obj gcvt.obj gets.obj getw.obj heap.obj index.obDC j init8087.obj inport.obj ldivml.obj longjmp.obj lrshml.obj lsearch.obj lxmulml.obj mainu.obj malloc.obj mem.obj merrno.obj movmem.obj myds.obj opena.obj outport.obj overflml.obj packml.obj peek.obj pointer.obj poke.obj printf.obj printfa.obj puts.obj putw.obj qsort.obj rand.obj reada.obj realloc.obj scanf.obj scopyml.obj segread.obj setbuf.obj setvbuf.obj sprintf.obj spushml.obj ssignal.obj ssort.obj stime.obj strcat.obj strchr.obj strcmp.obj strcpy.obj strcspn.obj strlen.obj strncmp.obj strpbrk.obj strtokPE .obj swab.obj time.obj tolower.obj ungetc.obj unlink.obj writea.obj version.objdelete clibl.liblibrarian clibl.lib @clibobj.fls yappend Legalese clibl.libCcompiler -S @cflags.tmp asin.cassemble asin.asm [nul]delete asin.asmCcompiler -S @cflags.tmp atan.cassemble atan.asm [nul]delete atan.asmCcompiler -S @cflags.tmp ceil.cassemble ceil.asm [nul]delete ceil.asmCcompiler -S @cflags.tmp exp.cassemble exp.asm [nul]delete exp.asmCcompiler -S @cflags.tmp fabs.cassemble\G  fabs.asm [nul]delete fabs.asmCcompiler -S @cflags.tmp fmod.cassemble fmod.asm [nul]delete fmod.asmCcompiler -S @cflags.tmp frexp.cassemble frexp.asm [nul]delete frexp.asmCcompiler -S @cflags.tmp hugeval.cassemble hugeval.asm [nul]delete hugeval.asmCcompiler -S @cflags.tmp ldexp.cassemble ldexp.asm [nul]delete ldexp.asmCcompiler -S @cflags.tmp log.cassemble log.asm [nul]delete log.asm Ccompiler -S @cflags.tmp modf.cassemble modf.asm [nul]delete modfhI .asmCcompiler -S @cflags.tmp pow.cassemble pow.asm [nul]delete pow.asm Ccompiler -S @cflags.tmp sin.cassemble sin.asm [nul]delete sin.asmCcompiler -S @cflags.tmp sinh.cassemble sinh.asm [nul]delete sinh.asmCcompiler -S @cflags.tmp sqrt.cassemble sqrt.asm [nul]delete sqrt.asm Ccompiler -S @cflags.tmp tan.cassemble tan.asm [nul]delete tan.asmCcompiler -S @cflags.tmp tanh.cassemble tanh.asm [nul]delete tanh.asmcopy [kbd] mathobj.fls yasin.obj atan.obj ceitK l.obj exp.obj fabs.obj fmod.obj frexp.obj hugeval.obj ldexp.obj log.obj modf.obj pow.obj sin.obj sinh.obj sqrt.obj tan.obj tanh.objdelete mathl.liblibrarian mathl.lib @mathobj.fls yappend Legalese mathl.libcassemble qsort.asm [nul]delete qsort.asmCcompiler -S @cflags.tmp rand.cassemble rand.asm [nul]delete rand.asmCcompiler -S @cflags.tmp reada.cassemble reada.asm [nul]delete reada.asmCcompiler -S @cflags.tmp realloc.cassemble realloc.asm [nul]delete realloc.asmCcompM O clibsmake.subgar;licbtosclib6jedjOKm'N copy [kbd] cflags.tmp y-1 -Z -a -O -w -I[SYS] -msf Ccompiler @cflags.tmp abs.cCcompiler @cflags.tmp asctime.cCcompiler @cflags.tmp atof.cCcompiler @cflags.tmp atoi.cCcompiler -S @cflags.tmp brk.cassemble brk.asm [nul]delete brk.asmCcompiler @cflags.tmp bsearch.cCcompiler @cflags.tmp calloc.cassemble chk87.asm [nul]Ccompiler @cflags.tmp closea.cCcompiler @cflags.tmp creat.cCcompiler @cflags.tmp ctime.cCcompiler @cflags.tmp ctosio.cCcompiler @cflags.tmp P ctype.cassemble cvtdf.asm [nul]assemble cvtdl.asm [nul]assemble cvtpf.asm [nul]assemble dadd.asm [nul]assemble dasg.asm [nul]assemble dcmp.asm [nul]assemble ddiv.asm [nul]assemble dmul.asm [nul]Ccompiler @cflags.tmp ecvt.cCcompiler @cflags.tmp exit.cCcompiler @cflags.tmp exita.cassemble fasg.asm [nul]Ccompiler @cflags.tmp fclose.cCcompiler @cflags.tmp fflush.cCcompiler @cflags.tmp fgetc.cCcompiler @cflags.tmp fgets.cCcompiler @cflaR gs.tmp filbuf.cCcompiler @cflags.tmp flsbuf.cCcompiler @cflags.tmp fopen.cCcompiler @cflags.tmp fprintf.cCcompiler @cflags.tmp fputc.cCcompiler @cflags.tmp fputs.cCcompiler @cflags.tmp fread.cCcompiler @cflags.tmp free.cCcompiler @cflags.tmp fseek.cCcompiler @cflags.tmp ftell.cCcompiler @cflags.tmp fwrite.cCcompiler @cflags.tmp gcvt.cCcompiler @cflags.tmp gets.cCcompiler @cflags.tmp getw.cCcompiler @cflags.tmp heap.cCcompiler @cflags.tmp index.cCcompiler -S @cT flags.tmp init8087.cassemble init8087.asm [nul]delete init8087.asmCcompiler -S @cflags.tmp inport.cassemble inport.asm [nul]delete inport.asmassemble ldiv.asm [nul]Ccompiler -S @cflags.tmp longjmp.cassemble longjmp.asm [nul]delete longjmp.asmassemble lrsh.asm [nul]Ccompiler @cflags.tmp lsearch.cassemble lxmul.asm [nul]Ccompiler @cflags.tmp mainu.cCcompiler @cflags.tmp malloc.cCcompiler @cflags.tmp mem.cCcompiler @cflags.tmp merrno.cCcompiler -S @cfV lags.tmp movmem.cassemble movmem.asm [nul]delete movmem.asmCcompiler -S @cflags.tmp myds.cassemble myds.asm [nul]delete myds.asmCcompiler @cflags.tmp opena.cCcompiler -S @cflags.tmp outport.cassemble outport.asm [nul]delete outport.asmassemble overflow.asm [nul]assemble pack.asm [nul]Ccompiler @cflags.tmp peek.cassemble pointerc.asm [nul]Ccompiler @cflags.tmp poke.cCcompiler @cflags.tmp printf.cCcompiler @cflags.tmp printfa.cCcompiler @cflags.tmp X puts.cCcompiler @cflags.tmp putw.cCcompiler @cflags.tmp qsort.cCcompiler @cflags.tmp rand.cCcompiler @cflags.tmp reada.cCcompiler @cflags.tmp realloc.cCcompiler @cflags.tmp scanf.cassemble scopy.asm [nul]Ccompiler -S @cflags.tmp segread.cassemble segread.asm [nul]delete segread.asmCcompiler @cflags.tmp setbuf.cCcompiler @cflags.tmp setvbuf.cCcompiler @cflags.tmp sprintf.cassemble spush.asm [nul]Ccompiler @cflags.tmp ssignal.cCcompiler @cflags.tmp ssort.cZ Ccompiler @cflags.tmp stime.cCcompiler @cflags.tmp strcat.cCcompiler @cflags.tmp strchr.cCcompiler -S @cflags.tmp strcmp.cassemble strcmp.asm [nul]delete strcmp.asmCcompiler @cflags.tmp strcpy.cCcompiler @cflags.tmp strcspn.cCcompiler -S @cflags.tmp strlen.cassemble strlen.asm [nul]delete strlen.asmCcompiler -S @cflags.tmp strncmp.cassemble strncmp.asm [nul]delete strncmp.asmCcompiler @cflags.tmp strpbrk.cCcompiler @cflags.tmp strtok.cCcompiler @cflags.tmp \ swab.cCcompiler @cflags.tmp time.cCcompiler @cflags.tmp tolower.cCcompiler @cflags.tmp ungetc.cCcompiler @cflags.tmp unlink.cCcompiler @cflags.tmp writea.cCcompiler @cflags.tmp version.ccopy [kbd] clibobj.fls yabs.obj asctime.obj atof.obj atoi.obj brk.obj bsearch.obj calloc.obj chk87.obj closea.obj creat.obj ctime.obj ctosio.obj ctype.obj cvtdf.obj cvtdl.obj cvtpf.obj dadd.obj dasg.obj dcmp.obj ddiv.obj dmul.obj ecvt.obj exit.obj exita.obj fasg.obj fclose.obj fflush.obj fgetc.obj fgets.o^  bj filbuf.obj flsbuf.obj fopen.obj fprintf.obj fputc.obj fputs.obj fread.obj free.obj fseek.obj ftell.obj fwrite.obj gcvt.obj gets.obj getw.obj heap.obj index.obj init8087.obj inport.obj ldiv.obj longjmp.obj lrsh.obj lsearch.obj lxmul.obj mainu.obj malloc.obj mem.obj merrno.obj movmem.obj myds.obj opena.obj outport.obj overflow.obj pack.obj peek.obj pointerc.obj poke.obj printf.obj printfa.obj puts.obj putw.obj qsort.obj rand.obj reada.obj realloc.obj scanf.obj scopy.obj segread.obj setbuf.obj setvbuf.obj s`  printf.obj spush.obj ssignal.obj ssort.obj stime.obj strcat.obj strchr.obj strcmp.obj strcpy.obj strcspn.obj strlen.obj strncmp.obj strpbrk.obj strtok.obj swab.obj time.obj tolower.obj ungetc.obj unlink.obj writea.obj version.objdelete clibs.liblibrarian clibs.lib @clibobj.fls yappend Legalese clibs.libCcompiler @cflags.tmp asin.cCcompiler @cflags.tmp atan.cCcompiler @cflags.tmp ceil.cCcompiler @cflags.tmp exp.cCcompiler @cflags.tmp fabs.cCcompiler @cflags.tmp fmod.cCcompiler @cflac  gs.tmp frexp.cCcompiler @cflags.tmp hugeval.cCcompiler @cflags.tmp ldexp.cCcompiler -S @cflags.tmp log.cassemble log.asm [nul]delete log.asm Ccompiler @cflags.tmp modf.cCcompiler -S @cflags.tmp pow.cassemble pow.asm [nul]delete pow.asm Ccompiler @cflags.tmp sin.cCcompiler @cflags.tmp sinh.cCcompiler -S @cflags.tmp sqrt.cassemble sqrt.asm [nul]delete sqrt.asm Ccompiler @cflags.tmp tan.cCcompiler @cflags.tmp tanh.ccopy [kbd] mathobj.fls yasin.obj atan.obj ceie  l.obj exp.obj fabs.obj fmod.obj frexp.obj hugeval.obj ldexp.obj log.obj modf.obj pow.obj sin.obj sinh.obj sqrt.obj tan.obj tanh.objdelete maths.liblibrarian maths.lib @mathobj.fls yappend Legalese maths.libg  count.subgarlicbtosclibB}-g~djOKm(h Screen Setup Y yDelete Reportfiles * n count.fls n 1 run [Sys]c.run1 append *.LineCount Reportdelete *.linecountScreen Setup Y7g3 3 3 3 3 3 3 3 G3 3 3 3 3 3 !.Ϙ.0_Е0O` p0@ЬOгO po ?@/   o #- `.?084j LegalesethistlebtosclibD=ke5&&&LJ&LJ3]_^IVV'V-V4VCVJVOVVVdVkVxVVĄV̇VȓVĚVġV^tcreat BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(g̎+ CREATEFILEERRNOOPEN@STRLENUNLINK CREATkVWUvv VF RPRPYYPjjjjj&&>tjvv ]_^! VV3V9V?VBVIV\Vxtctime BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(SH"SPUSH@ASCTIMEEXPANDDATETIMEN DAYS+ CTIME0 GMTIME LOCALTIMEVWU3ҋ]_^VWVW^ ‹ùFP_^F2F2F F23F2 FF2;|~r FuF2 F2F2_^VWUvv DRP]_^x|.V:VG O X \ f p v{ Ė Ğ Ħ Į ı ȴȿVntctosio BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA( jH<CHANGEFILELENGTH CLOSEFILE GETFILESTATUSOPENFILEREADFILE SETFILESTATUS WRITEFILEERRNOMALLOCSTRLENMOVMEMFREEM _READBLK_@  _WRITEBLK_ /&_FDESC__BUF_BLOCBFD% OPEN@ READ@# WRITE@ LSEEK Q CLOSE@P K FDTOFH  TRUNCFILE* sVW~FF3^&t tmmrmVWFPVF RPRPYYPjjjW_^&&>u^F^&G&G&VWPjVRPj_^,F F9Vs^u9FsT&_^VW ~F k ؉N^~ |~  ^&u&uF^&W&G&+&WVF39V |9Fs~^&W&% u u^&W&%VFRP&w &>~&>u34^&+F؉N^^&+F+;sVvvvv v^&W&RP3[YQS^XZ&W&+FsHVW^&wVFRPV&w&7ҍFRP_^&&>&>tw FF VYVF~u ~uVW^&wVFRPV&w&7ҍFRP_^&&>Vvvvv 9Vu9FtvvYY^&G&W&&>DF^&W&VFFVFVFF;rVW^&wRPvvvҍFRP_^&&>~vvvP FFF3FVVFF%JV [VcViVlVsV̢VijȶVVVVɖVŝVɦVŭVV XV`VfViVpVyVƀVʒƗΝV VVVVVV $V 4?BEVLVǒ˕ϬV˴VǺV˽VVV \;ww+FFl^&GVFRPF3[Y+ʉ^&W&RPF3[YQS^XZ&W&F;t FFFF+F vn^&w&7&w&>~K&>t;WvvP ~^&W&RP3[YQS^XZ&W&F_^VW ~F k ؉N^~ |~  ^&u&#F^&W&G&+&WVF39V~{|9Fst^&W&RP3[YʉN^VW^&wыF%RP_^VW^&wjҍFRPj_^VF^&W&G^&W&% u u^&W&%VFRP&w(&>~0&>u3M^&+F؉N^^&+F+;sVvvvv a&>~v^&W&RP3[YQS^XZ&W&+Fs;VW^&wVFRPV&w&7ҍFRP_^&&>&>t9w FF VYVF~u ~uVvvvv VW^&wVFRPV&w&7ҍFRP_^&9Vu9FtvvYY^&G&W&&>xF^&W&VFM48ȓVĚVȥVĬVĺ̾V   .V5VͩVV V'V0V7VKNzV ʅVƌVVVVV VVV/4:V bV ύV˕VǛVǞˡϴV VVfFVFVFF;rvPvv VW^&wRPvvvҍFRP_^&&>~FFF3FVVFF;ww+FFl^&GVFRPF3[Y+ʉ^&W&RPF3[YQS^XZ&W&F;t FFFF+F w~^&w&7&w&&>1&>tPWPvv &>~*~^&W&RP3[YQS^XZ&W&F_^VWv k ؉N^ | ^&u&hF=wT.VF^&W&F^&W&FV&W&-^&W&GFV&W&& ^&W&_^VWUv |k ؃u&.VWk _^&&>t&k ؋k LJ;>u3]_^VW6RPh66FP&&>u~t &_^VWv ;6uVF ;u;t`6VF VWVRPhvv FP_^&&>u!~t& &_^VWv k س *V <?VV^VdVgVnVĭ&V-V3V:VBLV WV^VɛŬɯVV    7V>V\x~VƅVƗΜVʤVƪVʭVƴV VV!V$V+V8V?VLYekq{~DžˈϝV˥VǫVˮVǵVVVVVU N^ | ^&u&^&G_^VW~ k ؉N^ | ^&u&*VW^&wjj_^ t&6^&G&G&G&3_^˶0V!V:KNlVsV̊VȚVġV#tctype BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(3H  _CTYPEv !! !  (t cvtdfmlCTAsm II-1.0.2??SEG??SEG C_cvtdfmlcodeh cvtdf@3cvtfd@A7U]YZX3QY%uPPPP 8PRS3P؎QP3UWF %=8|"=G}$8y~ F33V ~ _] cvtdlmlCTAsm II-1.0.2??SEG??SEG C_cvtdlmlcodeh 6-cvtuld@Ecvtdl@|cvtdul@cvtld@ normalize@unpack@AIU]Y[XZSQW y UV 3ɉRJJ0C^]_ ;V=V;EU][YXZQSW3UV 3ɉRJJ0C^]_ -V/Va|U]UVW%=0B}jZZ=0B~ "RR-RB t ~^] VVaU]UVW%=0B}jZZ=0B~"RR-RB t ~^] VV cvtpfmlCTAsm II-1.0.2??SEG??SEGC_cvtpfcodeh T cvtpf@AXU]6Wʁ8|1G}18y6G6O6W633daddhCTAsm II-1.0.2??SEG??SEGC_daddhcodeh ]dsub@dadd@ normalize@_8087unpack@Aa6wU&>tFF^]VWF tFu$F^N V F^NV~v]ЋRP%+u3Pْ[^Sv+Z ¿ JKJKJK3PS[Q2fË[S3Y2[^S[ZJRF3Fx [KS,)[KS}3SSSCCCvXXE! VVeVgVqVsVVVdasgmlCTAsm II-1.0.2??SEG??SEGC_dasgmlcodeh Mddsasg@dssload@pdneg@dasg@dssasg@,dload@Dddsload@\AU]XY&&G&G&GQPU]XYGGGQP,U]XY66G6G6GQPDU]XY&w&w&w&7QP\U]XYwww7QPpU]XY6w6w6w67QPUF tv ]dcmpmlCTAsm II-1.0.2??SEG??SEGC_dcmpmlcodeh  dcmp@AUFtfV tm x+ x;uF9F uF9FuF9Fr2t:] y#%;uF 9Fu܋F9FuԋF9F̸F t9F |;|]ddivhCTAsm II-1.0.2??SEG??SEGC_ddivhcodeh p ddiv@ normalize@_8087A"2ʀVU&>tFF^]VWFtF u13FFFF~v]F F FFF݋FЋ^ 3%?x RV N ^F?RQSP3PPPPF׋N^F!V N ^FB:f r v ~ rF :rw:BwWQ3ҊŠ(GF(Y_s WQFGY_ON⏋~V VKVMVdmulhCTAsm II-1.0.2??SEG??SEGC_dmulhcodeh _ dmul@N normalize@_8087Ac        U&>tFFɛ^]VWFtF uJFFFFF FF F~v]3FFFF^^^^΋FЋȋ^ 3%0@xw ؁NF % F 3PPPPPP .< t.|#.|GGsGGtڍfXFXFXFXF<PVWV]XVZVecvt BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(DHiYDNEG@DSUB@CVTLD@CVTDL@DADD@DMUL@DLOAD@DSSASG@DCMP@DSSLOAD@DDSLOAD@7$DECROUNDDFREXPCVTCOMM9POWTABFPOWTABHDPOWG10DPOWL10DBUFFER FCVT7 ECVT$@Y@@חA7yACnF?O8M30HwZ?sOu?{Gz?-C6?:0yE>ؗҜ<2#I9V FVORlVtV yV́Vėģ̆V ̯V ̴VV V V V V V !V)V .V ;CVKV PVXV}ͅV͍V ͒V şͧVͯV ʹVͼVV V V V V VVV !-0V 8V =V MRafsV xVΏVΗV ΜVΤVƩάV δV ιVVV V V !V &V.VIV dV|V džˉ˔ǝϠV ϨV ϭV ϿV VVV VLvvFPFHP^ PSQR PSQRFH^&_^˛V >A-texit BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(; _FILESFCLOSECLOSE@_EXIT\ EXIT@?VWU3kQSVYF|v Y]_^לVVV"V1Vtexita BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA( ERROREXIT _EXITĠVWUF P]_^oV.tfasgmlCTAsm II-1.0.2??SEG??SEGC_fasgmlcodeh fload@fasg@AU]YX&&GPQYX&w&7PQfclose BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(eΎFFLUSHFREE_CLOSE FCLOSEiVWU^ &uKvv ^ &t&w&w^ &G&G^ &&GPY3]_^Μ V5VYVAtfflush BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(lƎ+ CHECKPOINTBS_OPENFD _FSEEKEOF_WRITE FFLUSH_FFLUSHepVWU^ &%=t&W &G &;Wsw &;Gw^ &G &W+‹&tjjvS u2V^ &w&w&GP^ &W&G&W &G ;~ ^ &-VW^ &G&&RP_^3]_^VWU^ &%=t&W &G &;Wspw&;Gvh^ &G &W+‹&tjjvS u2V^ &w&w&GP^ &W&G&W &G ;~ ^ &3]_^8!RVoVȬVijVĸV̿VV9VDtfgetc BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(K _FILBUFK FGETCOVWU^ &W &G &;Wru&;Grvv ^ &W &G &G ؎&2]_^&Vtfgets BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(U _FILBUFK FGETSVWVF VF3N^&W &G &;Wru&;GrvvYY^&W &G &G ؎&2t; t6u#^&@tVF ;Vu;FuN ^ &F tuVF ;Vu ;Fu3ҋ u ^ &F ^ &VF_^˅=Vtfilbuf BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(_FILESFFLUSH_READ3_FILBUFB#VW^ &%=t&^ &'&&t9FFFh9Vwr9Fs^&tvSYY^ &w&w&w&GP S^ &@u4 } ^ & &W&G&W &G &W&G&W&G^ & ^ &':^ &W&G&W &G &W&G&W&G&W &G &G ؎&2_^ˏ4V9VBVEVbV̀Vtflsbuf BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA( _FFLUSH;_FLSBUF8VWU^ &%=t4&&t&W&G&W &G 3VF ^ &W &G ^ &vS^ &t^ &G&_&G2]_^4UVtfopen BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(HI4FCLOSEFSEEKMALLOCERRNOFREESTRCMP_OPEN GETFPtPARSARGS _FILES\, FOPENFREOPENq_OPENFD!_KBDFLAG [kbd][kbd]| VWeVF u uvvFPvv u&mvvvvv ^&G&|H&Pvv  u^&@^&%=u.jjjvS t^&w&wYY3ҋVF_^VWvvYY=uvvFPvv u^&GhY^&W&G&u &u^&W&G&W &G &W&G&W&Gvvvvv ^&G&|H&Pvv  u^&@^&%=u.jjjvS t^&w&wYY3ҋVF_^VWU^&^ &?ru ^&^ &?wt &?at3=^ &?au^&^ &+u^&m^& ^ &^&]_^VWFF\^&tF9Vru9Fr9Vw2r9Fs+^&GhY^&W&G&u &u3ҋ(^&W&G&W &G &W&G&W&GV_^לupipe.file2[Sys]<$>pipe.filerawwp&qq&pp&q<.runr[sys].run[Sys]<$>pipe.file[Sys]<$>pipe.file2ŠVWFFFVċF‰VFFFVFVFVW_^FFFVWv_^FFF;F|F@PYVF u u FFFVFVFVWv_^FFyVWvvҍFRP_^F@PYVΉF u u1V΋F^&W&FvvvRP ~u ~t ^&?V΋F@RPVF u t'~u ~uVF;Vvr;FrV΋F@VĉF^&?>uV΋@VFnu^&?|ulP^&w&7 uVFFV+»HF^&unF@;FuFFF^&GFF;F}|FF;F}SFV+»F~t FFF^&G&PvvšVމFܸ&F u(~u"VWvVċFRPRPYYP_^^&?>u PFVFRPVډFPvvVډFظ&F~u5~u/vvܚYYVWvVFRPRPYYP_^VċF;Vu;FujjPPVF;Vu;FujjPPPvvV։FԸ&F uB~uVUV _V{VVσV˟VǣVϧVǰ;ϺVVVVV(VFRPRPYYP_^jjvvԚvvv~usPPYYVWVWjjjj_^P_^VWVWj_^P_^P^&w&7 udždž dždždžVWVWҍRP_^P_^VWVWj_^P_^vvPPRPPYYVWVWҍRP_^P_^F@F]F^&W&F^&w&7YYVWVWҍRP_^P_^FF;F|PF^&w&74PRPP4PV҉F uD u@PF^&w&7P4PRPRP vvКYYVWVW4P4PYYPPjhjj_^P_^'PPYYPYYPYYjY_^VWU~~^&^ &F FN^ &]_^ó V V(V9VJVNVRViV tV̆V̑VĚ=̨VȷĽAEV VV VI%V/VEV `V kVͨV V VKVVPV2]IRSV]VgVwVΐV ƙbΨVγVʽVVVcVuVVltmalloc BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(H  ALLOCMEMORYSL QUERYMEMAVAILtMORECOREcBASEALLOCPq FREE= MALLOCVVWVF VFVFM^&W&9Vr.u;r(VF;Vw[u;FwT^&W&9VrEu9Fr>^&W&VFVF;Vrw;Fv^&W&9Vvr9Fr^&GkNQS^XZ&;Wu/&;u*^&&G^&G^&&W&^&W&^&W&^&W&^&GkN;Nu);^u$^&G^&G^&W&^&W&VF^&W&VF_^VW ~ *VWkPҍFRP_^ t5;u3ҋTVWҍFRP_^F3;}뭋VFVF^&GRPYY_^VW~ vF 3FVF u( u$FF^&W&VFVFVF^&W&VF^&G;rQ&G;u&W&^&W&^&)G&GkFƋ^&GVFVF5VF;tw;tnVgYVF t\ tU3ҋ_^7 Y\g͈VͪV 38;>BEILPtmem BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(sMOVMEMSETMEM MEMCPY MEMSET'i MEMCMPMO MEMCHRVWUvvv vvVF ]_^VWUFPvvv VF ]_^VWU~v1N^ &^&:}^ &^&:~ F F3]_^VWU~v^ &:FuV NF 3ҋ]_^+ VulVWVFRP_^VWVFRPVF RPRPYYPjjjmPVFRPh_^&&>tvvYY9Pvv &VF&&_^wV V(V9V@VKV_VfV̂V Ğ̨V VVVVVVV2VVV^VdVgVnVzVŇ͑V əVŠVɮVŵVźVt outportCTAsm II-1.0.2??SEG??SEGclibccodeh($outportboutportA(VWUV F]_^VWUV F]_^ overflmlCTAsm II-1.0.2??SEG??SEG p_overflowcodeh  overflow@ ErrorExitAU츐P V VpackmlCTAsm II-1.0.2??SEG??SEGC_packmlcodeh  normalize@unpack@AU]B%ZU]RJZ uˋWv?|_zzz:_3BBB˃w҃~ _ ׉RJZpeek BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(*  PEEK: PEEKB.VWUF ^&]_^VWUF ^&2]_^Ȋt pointerCTAsm II-1.0.2??SEG??SEG C_pointercodeh Kpadd@pcmp@"pdea@pada@Upsbp@Npina@psub@psba@AЊ%у 20"UWFбV%^ ~ ;u;_]9NUWVFV~ v ڋ Ã+^_]1UFV^ N }u-srT]0UFV^ N }H+sF+(]AUW~F &&U^ N }=s&&U_]@UW~F &&U^ N }+s+&&U_]AUUW~F &&U^ N }=sz&&U_]@UW~F &&U^ N }^+s\+>&&U_]poke BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(. POKE0 POKEBՠ2VWUF F^&]_^VWUF F^&]_^tprintf BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(hˎ_FILESFPUTC_PRINTF PRINTFVPRINTF:lVWҍFVFFPvv PPRP_^VWUvvvv PPRP]_^˸)V"V&V)V.VMVQVUVXV]Vt printfa BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(l H6؎LUDIV@LUMOD@LURSH@LDIV@LMOD@DNEG@DCMP@DSSLOAD@DDSLOAD@DSSASG@DLOAD@ATOI_CTYPESETJMPLONGJMPECVTFCVTSTRLEN:OUTBYTECONDITIONALPAD3 EOUT FOUTOUTSTR ;yNEGFLAG4POSFLAG2BLNKFLAG0PNDFLAG.ZEROF,WIDTH* PRECISION(OUTFUNC$OUTARG RESULTEXITBUF_PRINTFCJVWU66F 2PujP]_^VW$VF VFPYY t ^&?u&?%t &PdYFFF^&?-u^&?+u^&? u^&?#u^&?0uF>u^&ظ&t+vvYY^&ظ&t)F^&?*u^&W&&؎&F^&?.umFF^&ظ&t+vvYYF^&ظ&t)F^&?*u^&W&&؎&FFҍFVFN^&^&?lu~~^&?NuF3^&?FuF^&.;tCC'.EGPXcdefgopsux~~t!^&W&&؎&W&VF^&W&&؎&3҉VF~uF>u>qFi^&W&&؎&^ܚ~uF^ܚs^ܚ^ܚ3^&.;tCC.%EGPXcdefgopsux~t!^&W&&؎&0   $(04V<GW$Z$d g kquVĢ4Ĩ2Į0Ĺ,Ŀ.*420 .4",0V 7V CV J*VV ]V ņ*ɦV ŭV ͹V V V Tgƃ ƅ ƇƉƋƍƏ Ƒ Ɠ ƕƗƙƛƝ((,**((6V >V J(T(WZV bVgVtVyVρV ǔxv}v+@}W&VF^&W&&؎&VF~%|~sFVFVFFF Ft@jj vvN }ƀ0^&jj vvVF븃~tF-!>tF+>tF F~uvvjSvYxF Ft(NF0^&VFVFЃ>u>^&?0u2N^&0%F FuNjj vv0^&jj vvVFËF FtINF%F= ~^&?xuFW F7F0F^&VFVF믃>uvvjPj0Y^&P Yk3Wu N^&:NF%F= ~^&?puFW F7F0F^&VFVFF t;|j0vvFPFPj^ܚ~~+F;" ~)V^&P^ܚ V^&P^ܚ >u>~ j Y^&W&&؎&7Y>~fj Y^&W&&؎&W&VFRPYYF;F }Fj vv j%Y F_^VW FPFP6^ VFN~fu>tRPYYVFVFF;ƜmV̖Vı2Ŀ0V#.]VuVV.NVΊVΏVơ(ƫ(κV(V4****%*QV[(j(ǐ˛ǯ(ϵVϺV.V(Ϡ}vF| F@FVF;Vrw;Fv^&0uN^&ËV+‹+v  ;6H>G~u>u>tG~~~>u>tG>u>u;~ j VY~tj-DY>tj+5Y >tj &Y>t;~ j0Y~}j0Y(~|"^&?tF&PYj0YN؃>u>tj.Y~}>tj0YF>~2~ft ^&?t#^&?tF&PwYj0oYǃ>t)>>~ j JY_^VW FPFP@P^ VF^ u3vN>t~gt ~GtvvYYN^؉N^VF;Vrw;Fv^&0uN^&ËV+;+HFV+ u^&0&GF3>~u>u>tG }=d}O>u>u;~ j Y~tj-Y>tj+Y >tj Y>t;~ j0Y^&PYF>u>t^&?tj.Y^&?t>t&PYFރ>~ j0iY~GuFE ~guFeFPHY }j->Y؋j+0Yd|ƻd0PYƻdƻ # ((T(\(d(h(s2z0ċ.Ē(Ě4ġ,ħ*ĵ*20,**5.<(O(\(e({(Ş4ť*Ũ(Ŭ*Ű*ŷ*(VVV VV.6V{(ƅ(ƕ(ư(ƽ204,** 20),/*=*R.Y(x(Nj(Ǒ(ǘ(| 0PYƻ 0RY>t)>>~ j Y_^VWU~ vv ;6}6>u;~ j Y)>)>]_^VWv v YY>u?>t~ u;}ƉF;~ƉF;F~ j Y~0u;~FPY~ u>O t^ F &PY;6}FPY>u~ u>~ j Y_^4%*)*0*CTV`(f(j4p*~*Ą*Ĉ(ȓ̢VĬ4ij(Ŀ((**(( *('*<(K(O*U4b*i*otputs BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA( )_FILES_FLSBUF` PUTS VWU^ &?uy&&&&&&&&;ru&9rPP&&G2F t~r&&&؎& &&&&9ru&9rPP&&G2u3]_^VV"V'V/V6V:V=VDVGVTVYV]VaVlVsVȌVēVėVĜVȧVĮVIJVȵVļVȿVVVVVVVVztputw BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(` _FLSBUFA PUTWVWU~ ǀ^P&W &G &G ؎X&^&W&G&G&9W ru&9G rvv^&_ &G2t_^P&W &G &G ؎X&^&W&G&G&9W ru&9G rvv^&_ &G2u]_^Μ JV̩V"tqsort BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(GHIQSORTCSWAPSTRAEWIDTHFCMP\ QSORTĠVWU~r-FVFFHfN^ QSQv ]_^VWV F VFVFVFVF;Vvr;FrVF;Vw'r;Fs v v vv=}F΋VF;Vw'u;Fw vvv v =})F΋VF;Vvvr;FrlvvvvF)FNvvv v  ~vvv v hVF;V r w;F v)FV F ;Vwr;Fsvvv v VF;Vwr;Fsvvvv_^VWU6NF F ~^ &^&^ &^&]_^Çd"GWģĮ+YɯŸtrand BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(NH  LXMUL@ SEED; SRAND RANDURVWUF 3҉]_^VWغZ5N™%_^H9 ,03V?B]treada BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(?H 1 READBSRECORDERRNO_OPENFD_KBDFLAG_WRITEӐ _READVNVWv &u&&> u&>tjPjVW&&RPVFRPvFP_^&&u5&>u(&> u&>tvvvj&u &>t&>}F_^uVVV$V,V5;VKVRVWVnVvV|VVĆVȌVēVșVĠVĨV̹VVVVVVV"t realloc BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(wFREEMALLOCMOVMEMREALLOCW{VW~VF VF^&GkWYVF u u3ҋ2;sPvvvv vv YYVF_^ 'VXVfVtscanf BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA( \H:DNEG@DSUB@DADD@CVTLD@DDSLOAD@DMUL@DLOAD@LXMUL@CVTDF@DASG@DSSLOAD@DSSASG@_FILESFGETCFGETSGETS_CTYPETOLOWERSTRCAT6kINABYTEUNFBYTE7INBYTEhUNBYTE_SCANF$ SKIPWHITE_MATCHSATOF CVTINT_SCALE8 WFEOFERRFLAGINFUNCUNFUNCINARG RESULTCOUNTPOWTABFPOWTABJc SCANF> FSCANF SSCANF VSCANFw"VFSCANFSVSSCANFw $@Y@@חA7yACnF?O8M30HwZ?sOu?{Gz?-C6?:0yE>ؗҜ<2#I9t66YY=u_^VWUF =tF ^&O &_ &2]_^VWU^ &&?t^ &W&&؎&]_^VWU^&]_^VW ҍFVF&@tpPPhP u usPPҍFPvv PRPRP)FPvv PPRPRP_^VWȄ&@tPFPYY u uaҍF~|vvvv |PRPRPH*vvvv PPRPRP_^VWҍFVFFPvvvv RPRP_^VWUvvvvvv RPRP]_^VWҍFVFFPvvF PRPRP`_^VWUvvvvF PRPRP)]_^VW޸&u_^VWVFV F VF^&?uL&? t &? t&? u ~u'66V^&?%t;S^&;utvvV^>tF^&?*u Fۜ -;lȢȸV V V V V V25:h=hUV YV ]7`7eVhV{ɄV ŋV ͗VhhV V 77VV97<7AVDVWq7t7yV|VʎƲʵƺhʽhhhVV(2>AKNX[_ǐǔǙFF3^&ظ&tk ^P&ZЃЋF^&?lt&?Lu FF^&?huFF^&=[t#=ctu>t0-^&.;tCC . %DEFIOX[cdefiosx%uFF "FFFF FFvWV{VF>tx~ti~t#^RP&W&&؎&XZ&W&F^P&W&&؎&X&FWVPSQR^>t~t~t(^^&W&&؎&&(^XZ^RP&W&&؎&XZ&W&~u^&W&&؎&W&VF u~u ^&FOu.u~t@^&2&t~u ^&vvV^ u~u^&W&&؎&W&VFO|(vv^ YYu~u^&FՃ~tFVFVF^&?^uFVFVF ^&?tkF^&?]u~u!^&W&&؎&W&VF FF uWvvvvvv uF_^VW3~)u~t >u3 VVćĠ !#?ͮV ŴV V V V ƈʎVƕVƩV F VF^&;tFVF;Vru;Fr^ &^uVF;VrEu;Fr>VF;Vw1r;Fs*NF FtF^&FG~tU~ t ^&66V_^VWv ~FFF~ uF d+t-u t uN -uF u10u)N mxtXuN ~V u &t!u 0|7u*&u66V3ҋ&uud&tW&t&uVY0ǙN^RPƙ[YʉN^N tt66V~tVFVFVF_^VWv tV }FF؋ FF t.t ^&^ ^ F΍^ ZY[X_^VWv ~ ^F^FFF u-t+uO-uF&tEƙRP^^OD.u]O9|&tEƙRP^^FOetEujOkĒĝġĦȷDVKVeVlVsw|ŃɏVŖVɡVŨVɮVŵVɻVVVV DZJ_JlqΈVΐV ΕVΝV έV ʾVV VV -V4V:=VGVLOVWV \VaVfVnV tˏVǖVǝǢϥVϯVǴϷVϿV VVVV  -uOF+u O&tFk FO׃~tF؉F ~t66VvFP^ PSQR^ PSQR^~t^^^ZY[X_^E'V.V5cgl~V ̐V ̕V̧V ̵V ̺VV V (t scopymlCTAsm II-1.0.2??SEG??SEG C_scopymlcodeh(, scopy@A0UVWv~ ،;w;w _^]NO segreadCTAsm II-1.0.2??SEG??SEGclibccodeh(segreadA"VWUv &L&T&\&]_^setbuf BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(FREEF SETBUFVWU^ &t&w&w~u2~u,VF ^ &W&G&W&G&W &G &G'VF^ &W&G&W &G &W&G&G^ &']_^˵V#t setvbuf BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(FREEMALLOCSETVBUF:VWUvF=v. uF Ft#^ &t&w&w^ &'9VYVF u u^ &t&w&w^ &VF^ &W&G&W&G&W &G &GH^ &t&w&wVF ^ &W&G&W&G&W &G &G&'3]_^ϜW/!#%')+-QVcV̌VVt sprintf BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA( _PRINTF0PUTBYTE*SPRINTF>VSPRINTF|_VW^&W&VFF ^&F^&^&W&F _^VWҍFVF^ &FPvvF PRP_^VWU^ &vvvvF PRP]_^L%hkpVěḤ̌Vt spushmlCTAsm II-1.0.2??SEG??SEG C_spushmlcodeh % spush@A)U][+UVWڋ~Ў_^]RS ssignal BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(~H@Ύ SIGTBLSSIGNALHGSIGNALPDVWv |~3ҋ,VFVFVF_^VWv |2-VF u =u&~u ~u3LJLJV^Y_^DC&*?CTptġħtssort BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(u SSORT VW~sv ƻ v}~+ofN^ ؉N^f^ ؉N^QSvv^ |u"v&&>tv3_^71V+V1V7V:VAVMVSVYV\VcVtVNtwritea BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(]֎ WRITEBSRECORDERRNO_OPENFD _WRITEqaVWVW^ &&RPVFRPvFP_^t uF &6_^6VVV4VLVSVxt version BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(3HVERSIONBTOS C 1.1.4 06/13/90vt?Y0TOJ'+:5D"_MEMCPYWGSIGNALcvtdul@strlenpsbp@asetmemYSTRNCATstrcmpsprintf_ALLOCPE TRUNCFILEfgets!3scanf!yprintf!d init8087!G$`o[A-eKU7UGC+_P'/ZLi_FFLUSH0ddsload@"creatTOUPPERFREETdsub@ unlink LOCALTIMEctimescopy@ftell?unpack@_padd@asetvbufindex!Ffclose!/ctosio!calloc! FV4<7&K/AQ*!\FCVT'_FILES6inportbHRINDEXFpina@a_OPENFD6FSCANFyabslursh@Kcreat!inport!Hstrchr!tolower!fputs!;strncmp!'e}K/#k>G4`CTOtoyY9+cvtld@ overflow@^asctimeLSEEKdcmp@#READ@VSCANFy_CLOSE FDTOFHWRITE@fputs;fputc:_8087Gspush@MEMCHRW normalize@_fopen!6realloc!xatof!movmem!Ychk87h! time!version!ftell!?putw!rcvtdlml!@_.3H$<DMS8Z )eifread<fload@._OPEN[ldiv@Icvtdl@cvtfd@_FILBUF4fclose/pcmp@aputspputwr_MAINNstrpbrk_KBDFLAG6 coreminleft ldivml!Ipointer!amyds!ZIN:t(p@"-X\T1Ega5lycvtuld@VFPRINTF9ecvt'VSPRINTFCLOSE@getwDgetsCtolowerinit8087Gsegreadecvt!'fgetc!2spushml!brk! rand!uctime!lxmulml!Mpackml!_gets!Cabs!fflush!0\C:#XH,R?50'MalsearchLcoreleft VSSCANFypdea@a_FLSBUF5mydsZSTRRCHRfflush0fprintf9dmul@&stime!dasgml!"strcpy!strpbrk!mem!Wfilbuf!4-)%SbgWr\Aw2Im0yE>Z :U^; 6L@ڦ,C 9dN$@g浽K濺+>dGOz@DVwsY|b@n7$VW ^ PSQR^^w^v&!ZY[X&+Fj^ PSQR^j^PSQR PSQR^IF^s^ZY[XZ^^^^^^^^^^^^^^^^^^^ZY[X_^VWj^ j PSQR^^^&>!uZY[X8^ s^^^ZY[X_^VWj^ PSQR^&>!uZY[X^ s8^ZY[X6^ V V $V) ,V4V 9VC(FVNV SVZV aV f0iVuV |V ćČ@̏V̗V Ĝ8̟V̤V̩V̮V ̽VV V VV VHVV VV "V *V /V7V<p?VGV LVQhTVYVaV fVk`nVsV{V ̀VŅX͈V͍V͕V ͚VşP͢VͧVͯV ʹVͼVV VVV VVVV VVV V VVV'V ,V1x4V9VAVIV QV VV^V cVkV pVʁΏV ΡVƧƮαVιV ƿVVVVV V VVV VV V"V*V ;IV [V`V gV mpV|VχV όVǔǛϞVϦV Ǭdz϶VϻVVV VVVV4 ZY[X_^}tatan BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(H\DNEG@DSUB@DMUL@DADD@DDIV@DCMP@DDSLOAD@DSSASG@DSSLOAD@ERRNOFABSFREXP’COMMONQ= ATANgҐ ATAN2;bs-8R?-DT!?gs-8R???O͞^&?Yl???LXz?>0yE>Q`+4dj\? z꿤ļ|D@m U@أ 2 M@JI .@-DT!-DT!?-DT!-DT!?$-DT! @ΠVW^ PSQR^ ^ v"^ ^ 3^ v_^ ^ ^ ^ F^ PSQRw*^ ^ ^^^^^^^^^^^^^^ ^ ^ ~^ ^ ^ ZY[X_^VW^ PSQR^^ s^^^ZY[X_^VW ^ug^ u&!ZY[Xh^ sZY[XBZY[X3FP^ FP^ F+F=~5^ sZY[XZY[X^^ u^'^YV V $V) ,V4V 9VCV H(KVPVXVd0gVoV tV~V ăP̆V̋V̓V ĘH̛VĠ@̣V̫V İ8̳V̸V̽VVVVVXVV V VV V VVx V(V -V2p5V:VBV GVLhOVTV\V aVf`iVnVvV~V Ń͆V͋V͓V ͘Vŝ͠VͥVͭV ͲVŷͺVͿVV VVVVV V V VV V VV V%V2V 7V?VGV RUVZVkwV ΉVƎΑVΙV ΞVΨV έVεVνV VV VVV VV V V #V+V 0V7:VFIV]V bV rV wV NJύVϕV ϚVǡϤVǰϳVǿVV V VVVVV ܠ^ PSQR^^s^^^ s^^^ZY[X_^ȜZV VV #V+V 0V:V ?BVGVOVTWV_V dVnV sV{ṼV ztceil BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA([טH8֎3DNEG@DADD@DSSASG@DCMP@DSSLOAD@DDSLOAD@| CEILB FLOOR+<??Ġ_VW^ uZY[XҍF VF^&w }=^ s^ ^ 4|34+Ƌ^&?t^&F}^&#&;t^&7 t4^ v^ ^ ^ ZY[X_^VWU^ PSQRZY[X]_^˂ VVV$'VTWV_VdVknVvV~ ́V̉V(VVV0V VVVV/:V?VNVڊtexp BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(kƘHxdDDIV@DSUB@CVTDL@DSSASG@DADD@DMUL@DCMP@DSSLOAD@DDSLOAD@FLOORFABSLDEXPERRNOڒQ UINFINITYUHALFUC1UC2UP0 UP1(UP20UQ18UQ2@UR0H EXPt|?0? a\+?op|?XoR>QBqq? 8o?@?+eG?@@@n?=oVW0^ v&"ZY[X(^ s&"ZY[X^ PSQRsZY[X^ PSQR^^^ PSQR^^^^ ^^^^^^К^^К^К^^К^К^ؚ^^ؚ^^ @P^ PSQRZY[X_^ˣ PV VV$V +V 03V ?XBV JVOVVV ]V b`eV qhtV |V́V ̍VĔp̗V ģ̦V īḪV ̶V̻VVV VVVVV VV VVV$V)V.1V 9V>VFVKVPVUV]VeVmVrVzV͂VŇ ͊V ͒Vŗ(͚V ͢Vŧ0ͪV ͯVʹV͹V;VVVV V8V V@V VVVVVVV$V,V1V69V >VFVRVWV 6tfabs BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(, DSSLOAD@ FABSC0VWҍF VF^&g^ ZY[X_^˜Vtfmod BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(HHGDSUB@DMUL@DSSASG@DDIV@DCMP@DSSLOAD@DDSLOAD@FLOORCEIL FMOD9JVW^u^ ZY[X^^ ^^sA^^^ PSQR^ ZY[X?^^^ PSQR^ ZY[X_^ˮ VVV'V6V>VCVKVPSV[V`VjVrVzVV̄V ̐V̘V̝V̫V̳V̻VVVVVV9tfrexp BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(H#DMUL@DCMP@DSSLOAD@DDSLOAD@ؐ FREXPؠ?#VW^ u^&ZY[XIҍF VF^&G%^&^&g&O?^ ZY[X_^x7 VVV,/VjmVuVzVst hugeval BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(H DDSLOAD@% _HUGE_VAL VWػZY[X_^  Vtldexp BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(H#DCMP@DSSLOAD@DDSLOAD@ERRNOĐ LDEXPBVWv^ uZY[XQҍF VF^&G% }&"ZY[X^&g& w^ ZY[X_^˔;VV V'*VSVZV_bV}V1tlogCTAsm II-1.0.2"??SEG??SEGdatadataclibccodehHx(log@log10^dssload@dsub@frexp_8087errnodadd@dcmp@ddiv@dssasg@cvtld@dmul@ddsload@|?;f?0? a\+ѶP Jb0@)VDw ~&s@gKA?&{?VWRX^ w&!ZY[X`^ uhZY[X`&>t.^ ^F^^ZY[X%FP^ PSQR^Fn^^ޚ^v/^ޚ^ޚ^^N^ޚ^n^^^^ޚ^֚^֚^֚^Κ8^Κ0^Κ(^ƚ^ΚP^ΚACT _V V VVVV$V+V0_3V 5V ?_BV DV JVLVOVQVV_YV [V eVlVuVwV}V V ĔVȖVĨVȪVĭVȯVļV ȾV _V V VVVVV V _V V VVVV_V V V V VVV V VV$V &V 1V3V9V ;V B_EV GV MVOVRVTVZV \V bVdVjVlVoVqVwV yV VɁVŇVɉVŌV ɎV ŔV ɖV ř_ŜV ɞV ŤVɦVũV ɫV Ů_űV ɳV ŶVɸVžVVV V _V V VVV V VV_V V VVVVV H^Κ@^^^ƚ^Κ^֚^֚^FRP^^^ ^ZY[X_^VWU^  PSQRpZY[X]_^V _V V V VVVV V _ V "V %V'V-V /V 5V7V=V?VEVGVJV LV OVQVWVYV\V ^V dVfViVkVqV sV |V ~V ĄV ȆV ČVȎVđ_ĔV ȖV ęV țV ġVȣVĦ_ĩV ȫV ĮV ȰV ĶVȸVĻVȽVVVTVV_V V V V modf BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(H?DSUB@DLOAD@DASG@DCMP@DSSLOAD@DDSLOAD@FLOORCEIL MODF9 RVWU^ v ^ PSQR^&^ PSQR^&^&^ ZY[X]_^ɜ= VVV&V+Vul^ ^FtڅtsɅt؛^ s^^ZY[X }#^ ^ ؋^ uDs^ ^^ t^ ^ ^ 뼍^ZY[XK^ u ZY[X%(^ r^VF^vvudVF% t^ ^ 0^ uD t8ZY[X@ZY[X} &!PSQRZY[XZ^ PSQR^PSQR^ t^ ACTVVVVV %V /V1V7V9VV HVOV[V]VcV eV ĠVȢVĥ_ĨVȪVĭV ȯV ķVȹVVV_VVV V V V _VVV V V VVVVVV V (V*V0V2V5V7V=V ?V GVIVS_VVXV^V`VcV eV j_mVoVy_|V~VńVɆVʼnV ɋV ŖVɘVśV ɝV ũVɫVŴVɶVŹV ɻV VVVVV V _VVVVV V _V V_VV$V +V 0V2V9V;VGVIVLVNV[V]V`VbVeVgVtV vV ƀVʂVƅV^ ^ ZY[X_^VV V VVsin BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(XHveDNEG@DSUB@DSSASG@CVTLD@CVTDL@DADD@DMUL@DCMP@DSSLOAD@DDSLOAD@ERRNOFABSFLOOR SINCOSR SINV COS렜@UUUUUſ?>*`$>]KEZjh<=I jߓi<A?|m0_??" @K>0yE>-DT!?VW(^v&!ZY[X^ǙRP^tF؉F~t^^^ PSQR^^^PSQR^^^PSQR^^PSQRw^^^^ؚ1^^ؚ^ؚN }ˍ^ؚ^^^~}^^^ZY[X_^VWU^ s(jj^ ^ PSQRZY[X!jj^ ^ PSQRZY[X]_^VWUjj^ PSQR^ 6PSQRZY[X]_^  @V V V$V +V 0H3V ?XBV JV OVTPWV \VaVmVuVĎ`̑V ̙V ̞V̦V̮V ̳V VpV V VV V V hV V VV V !V&V+V0V8V=x@V HV MV YVfV nV sV{VŃ͆V ͎V͘V ţͦV ͮV ͳV͸VVV V VV VVV V VV #+.V 6V ;VIV NVVV qV yV ʓƟ΢V ΪV ίV λVV 8tsinh BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(d̘HvZDNEG@DDIV@DADD@DMUL@DSSASG@DSUB@DCMP@DSSLOAD@DDSLOAD@ERRNOFABSEXP^SINCOSH@ SINHI COSH1@@`.?@@u<7~>?@?@?>0yE>4SVyo•=cAxdoDg@^#W@Ɂ[q hVW^ w^ ^^v&"ZY[X^PSQR^^^ZY[X^ PSQR^~t5^^ZY[X3^^ZY[X_^VW(^ PSQR^^vNj^k PSQR^^ rb^^J^s^ ^ ^ ^ ^^^^^^^^^ؚ^ؚ^^^^^ ^ ^^ZY[X_^VWUj^ PSQRPSQRZY[X]_^ˍ- V VV'*V 2V7V?VDGV OVTV[V bV gjV yV~V ̍V̕VĚ ̝V ̢V̪V̯V̾VV V0V V(V VVVV@V V"8%V *V2V7Vt+^ ^F^^ZY[X ^ u^ ZY[X^ s&!ZY[XFP^ PSQR^^( ^3/^^^^nF|Ft ^^FFP^ PSQRZY[X_^/ACT VVVV%V 'V 9V;VE_HV JV PVRVUVWV_VaVk_nV pV vVxV{V}VȂVĉVĎ_đV ȓV ĥVȧVĪVȬVĹV ȻV VV_V V V V _V V VVV V VVVVVVVV V VV V '_*V ,V 2V4V7V 9V ?V AV PVRVUVWVtan BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(HxlDNEG@DDIV@DSUB@CVTLD@CVTDL@DADD@DMUL@DCMP@DDSLOAD@DSSASG@DSSLOAD@ERRNOFABSFLOOR- TAN~|A?m0_?"?KҾ>0yE>dkl*of?2 |}c߾?]4!ݿU?m[R+VW0^ PSQR^^v&!ZY[X)^ ƙRP^^^ PSQR^ ^^ PSQR^^PSQRs0u^ZY[X@&"ZY[X%^^^К^К^К^К^^^^К^К^К^ؚu^ؚ^ZY[X^^ؚZY[X_^AV V $V ),V 4V 9V@V GV LOV [^V fV kVpsV xV}V̉V̑V Ė(̙V ̡V ̦V̮V ̳VV  V V VV VVVVVV 0V V V (V8V DV KV P8SV bV jV oVwV |PV ͇V ͌VőH͔V ͙V͡V ͦVū@ͮV ͳVͻV V VVV VV pV V VhV V V V`V V&V +V0X3V 8V@V NV VV [ViV nVvV {VZttanh BTOS C V1.1.3XCLIBCCODEDATADGROUPDATA(& HpSDNEG@DMUL@DSUB@DDIV@DADD@DCMP@DDSLOAD@DSSASG@DSSLOAD@FABSEXP TANH4t #2@? z????>0yE>ɥ5\uX(NW<@Ms@/\@*VW ^ PSQR^^v^^vp^^PSQR^^^^^w^^^^^^^^^^^^^^^^^ s^^^ZY[X_^ V V $V),V4V 9V@CVKVSVV^V cVj(mVuV }V ̂V̇V ̓VĘ ̛V̠Vĥ̨V̭V̵V̽V V VV0VV VV V V VHVV !V&@)V.V6V ;V@8CVHVPVXV ]``VeVmV rVwXzVV͇V ͌VőP͔V͙V͡VͩV ͱV ͶV;V VV VV VVhVV VV VVV QtYL]e<"@iD*H.84PmT&arsinh#modftanh,exp frexpATAN2fabs _HUGE_VALsqrt'ldexpceil! fmod!sinh!#modf!tanh!,exp! frexp!asin!sin!tan!)atan!sqrt!'ldexp!6MCQI2'?<#.9+UFLOOR ceil COSH#log@fmodlog10COSACOSasinsintan)powatanhugeval!log!pow!fabs! COPYRIGHT 1987, 1991 Borland International. All Rights Reserved COPYRIGHT 1987, 1991 Unisys Corporation THIS SOFTWARE IS PROPRIETARY TO UNISYS AND IS NOT TO BE REPRODUCED, USED OR DISCLOSED EXCEPT IN ACCORDANCE WITH PROGRAM LICENSE OR UPON WRITTEN AUTHORIZATION OF THE PATENT DIVISION OF: Unisys Corporation Detroit, Michigan 48232 VERSION: 1.2.A (monday march 11, 1991, 10:13)Fileheaders.sysMfd.sysLog.sys SysImage.sys BadBlk.sys CrashDump.sys fdSys.Version?V@ B25CE1-3@ B @ D 6 > 9 j9|P^Sys< Unisys 9|HFileheaders.sysSys< lD l^Mfd.sysSys< B iLog.sysSys< @ ] SysImage.sysgarlicSys< P BadBlk.sysSys< & CrashDump.sysSys< @ : fdSys.VersiongarlicSys< 4 librarysrc.01garlicUnisys ؙؙXmn clibh.libgarlicUnisys  ٙ㙎㙎WtX$ mathh.libgarlicUnisys  䙎ꙎꙎef.p -o ,n +m*l)k(j'i&h%g$f#e"d!c b|9{HFileheaders.sysSys< lD l^Mfd.sysSys< B iLog.sysSys< @ ] SysImage.sysgarlicSys< P BadBlk.sysSys< & CrashDump.sysSys< @ : fdSys.VersiongarlicSys< 4 librarysrc.01garlicUnisys ؙؙXmn clibh.libgarlicUnisys  ٙ㙎㙎WtX$ mathh.libgarlicUnisys  䙎ꙎꙎef.p -o ,n +m*l)k(j'i&h%g$f#e"d!c b| librarysrc.01 clibh.lib mathh.lib