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 "@(#)sbrk.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 _end 17 .globl minbrk 18 .globl curbrk 19 20 .data 21minbrk: .long _end 22curbrk: .long _end 23 .text 24 25ENTRY(sbrk) 26 addl3 curbrk,4(ap),-(sp) 27 pushl $1 28 movl ap,r3 29 movl sp,ap 30 chmk $SYS_brk 31 jcs err 32 movl curbrk,r0 33 addl2 4(r3),curbrk 34 ret 35err: 36 jmp cerror 37