home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / CLISP-1.LHA / CLISP960530-sr.lha / amiga / jchlib / misc / setjmp.s < prev    next >
Encoding:
Text File  |  1996-04-15  |  461 b   |  22 lines

  1. | GCC Library
  2. | Jörg Höhle, 6-Jul-94
  3. | Translated to MIT Syntax from GCCBuRP project
  4.  
  5. .text
  6.     .even
  7. .globl _setjmp
  8. _setjmp:
  9.     movel sp@(4),a0        | jmp_buf
  10.     movel sp@,a1        | a1 is setjmp() caller's return address
  11.     moveml #0xfefc,a0@    | a7-a1,d7-d2
  12.     moveq #0,d0
  13.     rts
  14.  
  15. .globl _longjmp
  16. _longjmp:
  17.     movel sp@(4),a0        | jmp_buf
  18.     movel sp@(8),d0        | value
  19.     moveml a0@,#0xfefc    | a7-a1,d7-d2, a1 is return address
  20.     movel a1,sp@        | set saved setjmp() caller's return address
  21.     rts
  22.