BSD 4_3_Tahoe release
[unix-history] / usr / src / lib / libc / vax / sys / brk.s
CommitLineData
cd2c584c
DF
1/*
2 * Copyright (c) 1983 Regents of the University of California.
b094f5ae
KB
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
50c7758a
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
cd2c584c
DF
16 */
17
b094f5ae 18#if defined(SYSLIBC_SCCS) && !defined(lint)
ca67e7b4 19 .asciz "@(#)brk.s 5.5 (Berkeley) 6/27/88"
b094f5ae 20#endif /* SYSLIBC_SCCS and not lint */
e2a0e449
KM
21
22#include "SYS.h"
23
24#define SYS_brk 17
25
26 .globl curbrk
dc09cd7b 27 .globl minbrk
b1ae656c
KL
28ENTRY(_brk)
29 jbr ok
e2a0e449 30
dc09cd7b
KM
31ENTRY(brk)
32 cmpl 4(ap),minbrk
33 bgeq ok
34 movl minbrk,4(ap)
35ok:
36 chmk $SYS_brk
37 jcs err
e2a0e449
KM
38 movl 4(ap),curbrk
39 clrl r0
40 ret
dc09cd7b
KM
41err:
42 jmp cerror