Annotation of 43BSD/lib/libc/vax/compat-4.1/reset.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1980 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: #ifdef LIBC_SCCS
        !             7: _sccsid:.asciz "@(#)reset.c    5.4 (Berkeley) 3/9/86"
        !             8: #endif LIBC_SCCS
        !             9: 
        !            10: /*
        !            11:  * C library -- reset, setexit
        !            12:  *
        !            13:  *     reset(x)
        !            14:  * will generate a "return" from
        !            15:  * the last call to
        !            16:  *     setexit()
        !            17:  * by restoring r6 - r12, ap, fp
        !            18:  * and doing a return.
        !            19:  * The returned value is x; on the original
        !            20:  * call the returned value is 0.
        !            21:  *
        !            22:  * useful for going back to the main loop
        !            23:  * after a horrible error in a lowlevel
        !            24:  * routine.
        !            25:  */
        !            26: #include "DEFS.h"
        !            27: 
        !            28: ENTRY(setexit)
        !            29:        movab   setsav,r0
        !            30:        movq    r6,(r0)+
        !            31:        movq    r8,(r0)+
        !            32:        movq    r10,(r0)+
        !            33:        movq    8(fp),(r0)+             # ap, fp
        !            34:        movab   4(ap),(r0)+             # sp
        !            35:        movl    16(fp),(r0)             # pc
        !            36:        clrl    r0
        !            37:        ret
        !            38: 
        !            39: ENTRY(reset)
        !            40:        movl    4(ap),r0        # returned value
        !            41:        movab   setsav,r1
        !            42:        movq    (r1)+,r6
        !            43:        movq    (r1)+,r8
        !            44:        movq    (r1)+,r10
        !            45:        movq    (r1)+,r12
        !            46:        movl    (r1)+,sp
        !            47:        jmp     *(r1)
        !            48: 
        !            49:        .data
        !            50: setsav:        .space  10*4

unix.superglobalmegacorp.com

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