Annotation of 43BSDReno/lib/libc/hp300/sys/brk.s, revision 1.1.1.1

1.1       root        1: /*-
                      2:  * Copyright (c) 1990 The Regents of the University of California.
                      3:  * All rights reserved.
                      4:  *
                      5:  * This code is derived from software contributed to Berkeley by
                      6:  * the Systems Programming Group of the University of Utah Computer
                      7:  * Science Department.
                      8:  *
                      9:  * Redistribution and use in source and binary forms are permitted
                     10:  * provided that: (1) source distributions retain this entire copyright
                     11:  * notice and comment, and (2) distributions including binaries display
                     12:  * the following acknowledgement:  ``This product includes software
                     13:  * developed by the University of California, Berkeley and its contributors''
                     14:  * in the documentation or other materials provided with the distribution
                     15:  * and in all advertising materials mentioning features or use of this
                     16:  * software. Neither the name of the University nor the names of its
                     17:  * contributors may be used to endorse or promote products derived
                     18:  * from this software without specific prior written permission.
                     19:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     20:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     21:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     22:  */
                     23: 
                     24: #if defined(LIBC_SCCS) && !defined(lint)
                     25:        .asciz "@(#)brk.s       5.1 (Berkeley) 5/12/90"
                     26: #endif /* LIBC_SCCS and not lint */
                     27: 
                     28: #include "SYS.h"
                     29: 
                     30: #define        SYS_brk         17
                     31: 
                     32:        .globl  curbrk
                     33:        .globl  minbrk
                     34: ENTRY(brk)
                     35:        movl    minbrk,d0
                     36:        cmpl    sp@(4),d0
                     37:        jle     ok
                     38:        movl    d0,sp@(4)
                     39: ok:
                     40:        movl    #SYS_brk,d0
                     41:        trap    #0
                     42:        jcs     err
                     43:        movl    sp@(4),curbrk
                     44:        clrl    d0
                     45:        rts
                     46: err:
                     47:        jmp     cerror

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.