setjmp.s 650 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # 1 "setjmp.S"
  2. .global setjmp
  3. .global longjmp
  4. setjmp :
  5. moveal %sp @(4), %a0
  6. movel %sp @(0), %a0 @(12)
  7. movel %sp , %a0 @(8)
  8. moveml %d2 - %d7 / %a2 - %a6 , %a0 @(20)
  9. clrl %d0
  10. rts
  11. longjmp :
  12. moveal %sp @(4), %a0
  13. movel %sp @(8), %d0
  14. bne 1f
  15. movel #1, %d0
  16. 1:
  17. moveml %a0 @(20), %d2 - %d7 / %a2 - %a6
  18. moveal %a0 @(8), %sp
  19. movel %a0 @(12), %sp @
  20. rts
  21. # 88 "setjmp.S"