1: /* Copyright (c) 1982, Regents, University of California */
   2: 
   3: struct sdot { long I; struct sdot *CDR; };
   4: struct vl   { long high; long low; };
   5: 
   6: long dodiv(top,bottom)
   7: long *top, *bottom; /* top least significant; bottom most */
   8: {
   9:     struct vl work;
  10:     char error;
  11:     long rem = 0, ediv();
  12:     register long *p = bottom;
  13: 
  14:     for(;p <= top;p++)
  15:     {
  16:         emul(0x40000000,rem,*p,&work);
  17:         *p = ediv(&work,1000000000,&error);
  18:         rem = work.high;
  19:     }
  20:     return(rem);
  21: }
  22: 
  23: long dsneg(top,bottom)
  24: long *top, *bottom;
  25: {
  26:     register long *p = top;
  27:     register carry = 0;
  28:     register digit;
  29: 
  30:     while(p >= bottom)
  31:     {
  32:         digit = carry - *p;
  33:         /* carry = digit >> 30; is slow on 68K */
  34:         if(digit < 0) carry = -2;
  35:         if(digit & 0x40000000) carry += 1;
  36:         *p-- = digit & 0x3fffffff;
  37:     }
  38: }

Defined functions

dodiv defined in line 6; never used
dsneg defined in line 23; never used

Defined struct's

sdot defined in line 3; used 2 times
  • in line 3(2)
vl defined in line 4; used 2 times
  • in line 9(2)
Last modified: 1985-08-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 751
Valid CSS Valid XHTML 1.0 Strict