devctl.h: update for POSIX-1.2024
[newlib-cygwin.git] / newlib / libc / sys / sysvnecv70 / sbrk.S
blob1d5f9242a809ba9534529716e5f8683dfc963de0
2         .globl  _sbrk
3         .globl  __sbrk
4 _sbrk:
5 __sbrk:
6         mov.w     tptr,r0
7          test.w   [ap]
8          je        justreport 
9          add.w    r0,[ap]
10          push     [ap]
11          mov.w    ap,r3
12          mov.w    sp,ap
13          chlvl    #0x0,#0x11
14          jnl     ok 
15          add.w    #0x4,sp
16          jmp      cerror
17 ok:      add.w    #0x4,sp
18          mov.w    tptr,r0
19          mov.w    [r3],tptr
20 justreport:
21         ret       #0x0
23         .globl  _brk
24         .globl  __brk
25 __brk:
26 _brk:    chlvl    #0x0,#0x11
27          jnl     ok1
28          jmp     cerror 
29 ok1:     mov.w    [ap],63
30          xor.w    r0,r0
31          ret      #0x0
32         
33                 .data
34 tptr:   .word   _end