xref: /original-bsd/lib/libc/vax/sys/brk.s (revision c3e32dec)
1/*
2 * Copyright (c) 1983, 1993
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 */
7
8#if defined(SYSLIBC_SCCS) && !defined(lint)
9	.asciz "@(#)brk.s	8.1 (Berkeley) 06/04/93"
10#endif /* SYSLIBC_SCCS and not lint */
11
12#include "SYS.h"
13
14#define	SYS_brk		17
15
16	.globl	curbrk
17	.globl	minbrk
18ENTRY(_brk)
19	jbr	ok
20
21ENTRY(brk)
22	cmpl	4(ap),minbrk
23	bgeq	ok
24	movl	minbrk,4(ap)
25ok:
26	chmk	$SYS_brk
27	jcs	err
28	movl	4(ap),curbrk
29	clrl	r0
30	ret
31err:
32	jmp	cerror
33