Annotation of 42BSD/lib/libc/vax/compat-4.1/reset.c, revision 1.1.1.1

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