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