setjmp.s,v

来自「用TCP/IP进行网际互连这本书得源代码,偶得,希望大家喜欢.推荐下载」· S,V 代码 · 共 69 行

S,V
69
字号
head	1.1;access;symbols;locks	dls:1.1; strict;comment	@# @;1.1date	97.09.21.19.27.40;	author dls;	state Dist;branches;next	;desc@@1.1log@pre-3e code@text@|setjmp, longjmp||	longjmp(a, v)|causes a "return(v)" from the|last call to||	setjmp(v)|by restoring all the registers and|adjusting the stack||jmp_buf is set up as:||	_________________|	|	pc	||	-----------------|	|	d2	||	-----------------|	|	...	||	-----------------|	|	d7	||	-----------------|	|	a2	||	-----------------|	|	...	||	-----------------|	|	a7	||	-----------------	.globl setjmp, longjmp	.textsetjmp:	movl	sp@@(4),a0	|pointer to jmp_buf	movl	sp@@,a0@@		|pc	moveml	#0xFCFC,a0@@(4)	|d2-d7, a2-a7	clrl	d0		|return 0	rtslongjmp:	movl	sp@@(4),a0	|pointer to jmp_buf	movl	sp@@(8),d0	|value returned	moveml	a0@@(4),#0xFCFC	|restore d2-d7, a2-a7	movl	a0@@,sp@@		|restore pc of call to setjmp to stack	rts@

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?