aboutsummaryrefslogtreecommitdiff
path: root/unix/portkit/zsvjmp.s.HP800
diff options
context:
space:
mode:
Diffstat (limited to 'unix/portkit/zsvjmp.s.HP800')
-rw-r--r--unix/portkit/zsvjmp.s.HP80048
1 files changed, 48 insertions, 0 deletions
diff --git a/unix/portkit/zsvjmp.s.HP800 b/unix/portkit/zsvjmp.s.HP800
new file mode 100644
index 00000000..ce98ff19
--- /dev/null
+++ b/unix/portkit/zsvjmp.s.HP800
@@ -0,0 +1,48 @@
+; ZSVJMP.S -- Routine written by Jim Dillon of HP Software Evaluation and
+; Migration Center, Cupertino, CA, 2/3/88.
+;
+mem
+ .BLOCK 0
+ .ALIGN 8
+ .IMPORT mem,DATA
+ .EXPORT mem
+;
+ .code
+;
+; This routine calls setjmp without the allocation of a
+; stack frame for the calling routine, ie zsvjmp. This allows
+; the zsvjmp routine to be part of the iraf kernel and
+; be functionally equivalent to versions of zsvjmp under other
+; host systems.
+;
+;
+; savejump(jmpbuf, status)
+; jmp_buf jmpbuf;
+; int status;
+; saves the caller's jump-buf, not yours;
+; we may be called from Fortran.
+
+ .proc
+ .import setjmp
+ .export zsvjmp
+ .callinfo
+zsvjmp
+;
+; save address to status word in jmp_buf[0]
+;
+ stw arg1,0(0,arg0)
+ ldi 0,1
+ stws 1,0(0,arg1)
+;
+; call setjmp with jmp_buf[1]..jmp_buf[51]
+;
+ addi 4,arg0,arg0
+ b setjmp
+ nop
+;
+; setjmp will return directly to the caller of zsvjmp at this
+; point, so the next statement will never be reached.
+;
+ nop
+ .procend
+;