aboutsummaryrefslogtreecommitdiff
path: root/unix/portkit/zsvjmp.s.HP800
blob: ce98ff195d68cbdb11eb7595a3d3ace87242167e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
;