|
|
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 r2 - r12, 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: storer $0x1ffc, (r0) ! 23: movl (fp),44(r0) # fp ! 24: moval 4(fp),48(r0) # sp ! 25: movl -8(fp),52(r0) # pc ! 26: clrl r0 ! 27: ret ! 28: ! 29: ENTRY(reset) ! 30: movl 4(fp),r0 # returned value ! 31: movab setsav,r1 ! 32: loadr $0x1ffc,(r1) ! 33: movl 44(r1),fp ! 34: movl 48(r1),sp ! 35: jmp *52(r1) ! 36: ! 37: .data ! 38: setsav: .space 14*4
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.