|
|
1.1 ! root 1: # C library -- reset, setexit ! 2: ! 3: # reset(x) ! 4: # will generate a "return" from ! 5: # the last call to ! 6: # setexit() ! 7: # by restoring r6 - r12, ap, fp ! 8: # and doing a return. ! 9: # The returned value is x; on the original ! 10: # call the returned value is 0. ! 11: # ! 12: # useful for going back to the main loop ! 13: # after a horrible error in a lowlevel ! 14: # routine. ! 15: ! 16: .globl _setexit ! 17: .globl _reset ! 18: ! 19: .align 1 ! 20: _setexit: ! 21: .word 0x0000 ! 22: movab setsav,r0 ! 23: movq r6,(r0)+ ! 24: movq r8,(r0)+ ! 25: movq r10,(r0)+ ! 26: movq 8(fp),(r0)+ # ap, fp ! 27: movab 4(ap),(r0)+ # sp ! 28: movl 16(fp),(r0) # pc ! 29: clrl r0 ! 30: ret ! 31: ! 32: .align 1 ! 33: _reset: ! 34: .word 0x0000 ! 35: movl 4(ap),r0 # returned value ! 36: movab setsav,r1 ! 37: movq (r1)+,r6 ! 38: movq (r1)+,r8 ! 39: movq (r1)+,r10 ! 40: movq (r1)+,r12 ! 41: movl (r1)+,sp ! 42: jmp *(r1) ! 43: ! 44: .data ! 45: setsav: .space 10*4
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.