code: 9ferno

ref: 600bbfe4aaa9ad0f73d8d73eef1b7670e5f7d3a3
dir: /emu/9front/asm-386.s/

View raw version

TEXT	tramp(SB),$0
	MOVL	nsp+0(FP), BX		/* new stack */
	MOVL	fn+4(FP), CX		/* func to exec */
	MOVL	arg+8(FP),DX

	LEAL	-8(BX), SP		/* new stack */
	PUSHL	DX
	CALL	*CX
	POPL	AX

	PUSHL	$0
	CALL	_exits(SB)
	POPL	AX
	RET

TEXT	vstack(SB),$0
	MOVL	arg+0(FP), AX
	MOVL	ustack(SB), SP
	PUSHL	AX
	CALL	exectramp(SB)
	POPL	AX			/* dammit ken! */
	RET

TEXT	FPsave(SB), 1, $0
	MOVL	fpu+0(FP), AX
	FSTENV	0(AX)
	RET

TEXT	FPrestore(SB), 1, $0
	MOVL	fpu+0(FP), AX
	FLDENV	0(AX)
	RET