home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntlib25.zoo / purec / stkover.s < prev    next >
Text File  |  1992-06-27  |  378b  |  23 lines

  1. ; Pure C calls this, if stack checking fails: 
  2. ; report stack overflow and abort
  3. ; 17-6-92 um
  4.  
  5. .globl _StkOver
  6. .globl _StkLim
  7. .globl abort
  8.  
  9. .text
  10.  
  11. _StkOver:
  12.     movea.l _StkLim, a7    ; get some stack...
  13.     pea.l _overflow_message
  14.     move.w #9, -(a7)
  15.     trap #1                ; Cconws
  16.     addq.l #6, a7        ; well...
  17.     jmp abort
  18.  
  19. .data
  20.  
  21. _overflow_message:
  22.     .asciiz "Stack overflow\r\n"
  23.