1: /*
   2:  * Copyright (c) 1987 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: <@(#)brk.s	2.6 (2.11BSD GTE) 1995/05/08\0>
   9:         .even
  10: #endif SYSLIBC_SCCS
  11: 
  12: /*
  13:  * XXX - this routine can't use SYSCALL!!!
  14:  */
  15: #include "SYS.h"
  16: 
  17: .globl  curbrk, minbrk
  18: 
  19: ENTRY(brk)
  20:         cmp     2(sp),minbrk    / break request too low?
  21:         bhis    1f
  22:         mov     minbrk,2(sp)    / yes, knock the request up to minbrk
  23: 1:
  24:         SYS(sbrk)               / ask for break
      /
      /   trap 69 -> [kernel] -> syscall() -> via sysent[] -> handler: sbrk
      /
  25:         bes     2f
  26:         mov     2(sp),curbrk    /   and remember it if it succeeded
  27:         rts     pc
  28: 2:
  29:         jmp     x_error
Last modified: 1995-05-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2164
Valid CSS Valid XHTML 1.0 Strict