xref: /csrg-svn/lib/libc/vax/sys/brk.s (revision 34391)
121786Sdist/*
221786Sdist * Copyright (c) 1983 Regents of the University of California.
3*34391Sbostic * All rights reserved.
4*34391Sbostic *
5*34391Sbostic * Redistribution and use in source and binary forms are permitted
6*34391Sbostic * provided that this notice is preserved and that due credit is given
7*34391Sbostic * to the University of California at Berkeley. The name of the University
8*34391Sbostic * may not be used to endorse or promote products derived from this
9*34391Sbostic * software without specific written prior permission. This software
10*34391Sbostic * is provided ``as is'' without express or implied warranty.
1121786Sdist */
129421Smckusick
13*34391Sbostic#if defined(SYSLIBC_SCCS) && !defined(lint)
14*34391Sbostic_sccsid:.asciz	"@(#)brk.s	5.4 (Berkeley) 05/20/88"
15*34391Sbostic#endif /* SYSLIBC_SCCS and not lint */
1621786Sdist
179421Smckusick#include "SYS.h"
189421Smckusick
199421Smckusick#define	SYS_brk		17
209421Smckusick
219421Smckusick	.globl	curbrk
2214126Smckusick	.globl	minbrk
2315174SlayerENTRY(_brk)
2415174Slayer	jbr	ok
259421Smckusick
2614126SmckusickENTRY(brk)
2714126Smckusick	cmpl	4(ap),minbrk
2814126Smckusick	bgeq	ok
2914126Smckusick	movl	minbrk,4(ap)
3014126Smckusickok:
3114126Smckusick	chmk	$SYS_brk
3214126Smckusick	jcs	err
339421Smckusick	movl	4(ap),curbrk
349421Smckusick	clrl	r0
359421Smckusick	ret
3614126Smckusickerr:
3714126Smckusick	jmp	cerror
38