Commit | Line | Data |
---|---|---|
1f673d7a SL |
1 | /* |
2 | * Copyright (c) 1983 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
6 | ||
7 | #ifdef SYSLIBC_SCCS | |
8 | _sccsid:.asciz "@(#)brk.s 5.1 (Berkeley) %G%" | |
9 | #endif SYSLIBC_SCCS | |
10 | ||
11 | #include "SYS.h" | |
12 | ||
13 | #define SYS_brk 17 | |
14 | ||
15 | .globl curbrk | |
16 | .globl minbrk | |
17 | ||
18 | ENTRY(brk) | |
19 | cmpl 4(fp),minbrk | |
20 | bgeq ok | |
21 | movl minbrk,4(fp) | |
22 | ok: | |
23 | kcall $SYS_brk | |
24 | jcs err | |
25 | movl 4(fp),curbrk | |
26 | clrl r0 | |
27 | ret | |
28 | err: | |
29 | jmp cerror |