Diff for /gforth/Attic/main.c between versions 1.3 and 1.4

version 1.3, 1994/05/05 17:05:35 version 1.4, 1994/05/07 14:56:01
Line 27 Line 27
 /* image file format:  /* image file format:
  *   size of image with stacks without tags (in bytes)   *   size of image with stacks without tags (in bytes)
  *   size of image without stacks and tags (in bytes)   *   size of image without stacks and tags (in bytes)
  *   size of data and FP stack (in bytes)   *   size of return, FP and locals stack (in bytes, just one entry)
    *       !! have a different number for each one!
  *   pointer to start of code   *   pointer to start of code
  *   data (size in image[1])   *   data (size in image[1])
  *   tags (1 bit/data cell)   *   tags (1 bit/data cell)
Line 103  int* loader(const char* filename) Line 104  int* loader(const char* filename)
               imagefile);                imagefile);
         fclose(imagefile);          fclose(imagefile);
   
         relocate(image,(char *)image+header[0],header[1],engine(0,0,0,0));          relocate(image,(char *)image+header[0],header[1],engine(0,0,0,0,0));
   
         return(image);          return(image);
 }  }
Line 112  int go_forth(int *image, int stack, Cell Line 113  int go_forth(int *image, int stack, Cell
 {  {
         Cell* rp=(Cell*)((void *)image+image[0]);          Cell* rp=(Cell*)((void *)image+image[0]);
         double* fp=(double*)((void *)rp-image[2]);          double* fp=(double*)((void *)rp-image[2]);
         Cell* sp=(Cell*)((void *)fp-image[2]);          Address lp=(Address)((void *)fp-image[2]);
           Cell* sp=(Cell*)((void *)lp-image[2]);
         Cell* ip=(Cell*)(image[3]);          Cell* ip=(Cell*)(image[3]);
   
         for(;stack>0;stack--)          for(;stack>0;stack--)
Line 120  int go_forth(int *image, int stack, Cell Line 122  int go_forth(int *image, int stack, Cell
   
         install_signal_handlers(); /* right place? */          install_signal_handlers(); /* right place? */
   
         return((int)engine(ip,sp,rp,fp));          return((int)engine(ip,sp,rp,fp,lp));
 }  }
   
 int main(int argc, char **argv, char **env)  int main(int argc, char **argv, char **env)

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>