home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / source / _xcovf.a < prev    next >
Encoding:
Text File  |  1996-12-24  |  832 b   |  40 lines

  1.         IDNT    "xcovf.o"
  2. ***
  3. *
  4. *          Copyright © 1992 SAS Institute, Inc.
  5. *
  6. * name          xcovf
  7. *
  8. * description   this function is called when a stack overflow is
  9. *               detected. It resets the stack pointer and calls
  10. *               the overflow handler
  11. *
  12. ***
  13.  
  14.         section text,CODE
  15.  
  16.         xref    _StackPtr
  17.         xdef    _XCOVF
  18.       IFD OENTRY
  19.         xdef    _xcovf
  20.       ENDC
  21.  
  22.         xref    _CXOVF
  23.         xref    @__exit
  24. _XCOVF:
  25. _xcovf:
  26.  
  27.    ** Set the stack to somewhere where we know we have
  28.    ** room, AND have not killed the autos from __main.
  29.       IFD NOBASER
  30.     move.l  _StackPtr,d0             ; reset stack pointer
  31.       ELSE
  32.     move.l  _StackPtr(A4),d0         ; reset stack pointer
  33.       ENDC
  34.       sub.w     #500,d0
  35.       move.l    d0,a7
  36.       
  37.       
  38.         jmp     _CXOVF(PC)
  39.         end
  40.