home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / condor40.zip / CONDOR / src / ckpt_lib / registers.c < prev    next >
C/C++ Source or Header  |  1989-09-25  |  3KB  |  85 lines

  1. /* 
  2. ** Copyright 1986, 1987, 1988, 1989 University of Wisconsin
  3. ** 
  4. ** Permission to use, copy, modify, and distribute this software and its
  5. ** documentation for any purpose and without fee is hereby granted,
  6. ** provided that the above copyright notice appear in all copies and that
  7. ** both that copyright notice and this permission notice appear in
  8. ** supporting documentation, and that the name of the University of
  9. ** Wisconsin not be used in advertising or publicity pertaining to
  10. ** distribution of the software without specific, written prior
  11. ** permission.  The University of Wisconsin makes no representations about
  12. ** the suitability of this software for any purpose.  It is provided "as
  13. ** is" without express or implied warranty.
  14. ** 
  15. ** THE UNIVERSITY OF WISCONSIN DISCLAIMS ALL WARRANTIES WITH REGARD TO
  16. ** THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  17. ** FITNESS. IN NO EVENT SHALL THE UNIVERSITY OF WISCONSIN  BE LIABLE FOR
  18. ** ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19. ** WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  20. ** ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  21. ** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22. ** 
  23. ** Authors:  Allan Bricker and Michael J. Litzkow,
  24. **              University of Wisconsin, Computer Sciences Dept.
  25. ** 
  26. */ 
  27.  
  28.  
  29. main( argc, argv )
  30. int argc;
  31. char **argv;
  32. {
  33.     /*
  34.     extern int DebugFlags;
  35.  
  36.     DebugFlags = -1;
  37.     */
  38.  
  39.     foo( 0, 0, 0, 0, 0, 0, 0, 0 );
  40. }
  41.  
  42. foo( arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 )
  43. register int    arg0;
  44. register int    arg1;
  45. register int    arg2;
  46. register int    arg3;
  47. register int    arg4;
  48. register int    arg5;
  49. register int    arg6;
  50. register int    arg7;
  51. {
  52.     register int    local0;
  53.     register int    local1;
  54.     register int    local2;
  55.     register int    local3;
  56.     register int    local4;
  57.     register int    local5;
  58.     register int    local6;
  59.     register int    local7;
  60.  
  61.     if( arg0 > 34 ) {
  62.         printf( "About to checkpoint\n" );
  63.         ckpt();
  64.         printf( "Returned from checkpoint\n" );
  65.         printf( "args: %d %d %d %d %d %d %d %d\n",
  66.                 arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
  67.         return;
  68.     }
  69.     local0 = -(arg0 +1);
  70.     local1 = -(arg1 +1);
  71.     local2 = -(arg2 +1);
  72.     local3 = -(arg3 +1);
  73.     local4 = -(arg4 +1);
  74.     local5 = -(arg5 +1);
  75.     local6 = -(arg6 +1);
  76.     local7 = -(arg7 +1);
  77.     foo( -local0, -local1, -local2, -local3,
  78.          -local4, -local5, -local6, -local7 );
  79.  
  80.     printf( "args: %d %d %d %d %d %d %d %d\n",
  81.             arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
  82.     printf( "locals: %d %d %d %d %d %d %d %d\n\n",
  83.           local0, local1, local2, local3, local4, local5, local6, local7 );
  84. }
  85.