152723Sbostic/*- 252723Sbostic * Copyright (c) 1991 The Regents of the University of California. 352723Sbostic * All rights reserved. 452723Sbostic * 552723Sbostic * This code is derived from software contributed to Berkeley by 652723Sbostic * Ralph Campbell. 752723Sbostic * 852723Sbostic * %sccs.include.redist.c% 952723Sbostic */ 1052723Sbostic 1152723Sbostic#include "SYS.h" 1252723Sbostic 1352723Sbostic#if defined(LIBC_SCCS) && !defined(lint) 14*58280Sralph ASMSTR("@(#)brk.s 5.3 (Berkeley) 02/26/93") 1552723Sbostic#endif /* LIBC_SCCS and not lint */ 1652723Sbostic 1752723Sbostic#define SYS_brk 17 1852723Sbostic 1952723SbosticLEAF(brk) 20*58280Sralph lw v0, minbrk 2152723Sbostic bgeu a0, v0, _brk 2257858Sralph move a0, v0 # dont allow break < minbrk 2352723SbosticALEAF(_brk) 2452723Sbostic li v0, SYS_brk 2552723Sbostic syscall 2652723Sbostic bne a3, zero, 1f 27*58280Sralph sw a0, curbrk 2852723Sbostic move v0, zero 2952723Sbostic j ra 3052723Sbostic1: 3152723Sbostic j _cerror 3252723SbosticEND(brk) 33