/	Copyright (c) 1984, 1986, 1987, 1988 AT&T
/	  All Rights Reserved

/	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
/	The copyright notice above does not evidence any
/	actual or intended publication of such source code.
	.file	"libg.s"

/       Copyright (c) 1984 AT&T
/         All Rights Reserved

/       THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
/       The copyright notice above does not evidence any
/       actual or intended publication of such source code.

	.ident	"@(#)libg:i386/libg.s	1.1.1.1"

/ Caller fills these words as follows:
/	Address of subroutine to call
/	Size of argument list below
/	Arguments (last one pushed)
/	...
/	Arguments (first one pushed)
	.data
	.globl	__dbargs
__dbargs:
	.=.+512
	.text

	.globl	__dbsubc
__dbsubc:
	movl	$__dbargs,%eax
	movl	4(%eax),%ecx		/ number of argument words
	movl	%ecx,%edx		/ convert to byte offset in array
	shll	$2,%edx
	addl	$8,%edx			/ skip the address and the size
					/ eax+edx points after last arg in list
	jcxz	.calllb			/ in case there are zero args to call
.looplb:
	subl	$4,%edx
	pushl	(%edx,%eax)
	loop	.looplb
.calllb:
	call	*(%eax)

	.globl	__dbsubn
__dbsubn:
	int	$3
	jmp	__dbsubc		/ If they continue or single-step
					/ after creating a pid from nothing,
					/ do it again.
	.data
