1: /old = sbrk(increment);
   2: /
   3: /sbrk gets increment more core, and returns a pointer
   4: /	to the beginning of the new core area
   5: /
   6: .globl  _sbrk,_end, cerror
   7: 
   8: _sbrk:
   9:         mov     r5,-(sp)
  10:         mov     sp,r5
  11:         mov     nd,0f
  12:         add     4(r5),0f
  13:         sys     0; 9f
  14:         bec     1f
  15:         jmp     cerror
  16: 1:
  17:         mov     nd,r0
  18:         add     4(r5),nd
  19:         mov     (sp)+,r5
  20:         rts     pc
  21: 
  22: .globl  _brk
  23: / brk(value)
  24: / as described in man2.
  25: / returns 0 for ok, -1 for error.
  26: 
  27: _brk:
  28:         mov     r5,-(sp)
  29:         mov     sp,r5
  30:         mov     4(r5),0f
  31:         sys     0; 9f
  32:         bec     1f
  33:         jmp     cerror
  34: 1:
  35:         mov     4(r5),nd
  36:         clr     r0
  37:         mov     (sp)+,r5
  38:         rts     pc
  39: 
  40: .data
  41: 9:
  42:         sys     break; 0:..
  43: nd:     _end

Defined functions

_brk declared in line 22; defined in line 27; used 8 times

Defined variables

nd defined in line 43; used 4 times
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 681
Valid CSS Valid XHTML 1.0 Strict