1*6795Srrh.data 0 2*6795Srrh .asciz " compat.s 1.1 82/05/12 " 3*6795Srrh.text 4*6795Srrh .globl _regs 5*6795Srrh .globl _psl 6*6795Srrh .globl _pc 7*6795Srrh .globl _compat 8*6795Srrh_compat: 9*6795Srrh .word 0x0000 10*6795Srrh# fixup stack by doing rets from compat and the function 11*6795Srrh# which called it but modifying frame pc's to stay here 12*6795Srrh moval l0,16(fp) # fix first return address 13*6795Srrh ret 14*6795Srrhl0: moval l1,16(fp) # fix first return address 15*6795Srrh ret 16*6795Srrhl1: moval l2,16(fp) # fix next return address 17*6795Srrh ret 18*6795Srrhl2: movl _psl,4(sp) 19*6795Srrh movl _pc,(sp) 20*6795Srrh# copy back saved register values 21*6795Srrh movw _regs,r0 22*6795Srrh movw _regs+02,r1 23*6795Srrh movw _regs+04,r2 24*6795Srrh movw _regs+06,r3 25*6795Srrh movw _regs+010,r4 26*6795Srrh movw _regs+012,r5 27*6795Srrh movw _regs+014,r6 28*6795Srrh# go to compatability mode with rei assuming correct psl is setup 29*6795Srrh rei 30*6795Srrh .globl _getregs 31*6795Srrh_getregs: 32*6795Srrh .word 0 33*6795Srrh# copy registers into known locations for examination or modification 34*6795Srrh movw r0,_regs 35*6795Srrh movw r1,_regs+02 36*6795Srrh movw r2,_regs+04 37*6795Srrh movw r3,_regs+06 38*6795Srrh movw r4,_regs+010 39*6795Srrh movw r5,_regs+012 40*6795Srrh movw r6,_regs+014 41*6795Srrh ret 42