Commit | Line | Data |
---|---|---|
ba2d4f1b | 1 | .data 0 |
c6dd5f9e | 2 | .asciz " compat.s 4.1 82/05/12 " |
ba2d4f1b RH |
3 | .text |
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 l0,16(fp) # fix first return address | |
13 | ret | |
14 | l0: moval l1,16(fp) # fix first return address | |
15 | ret | |
16 | l1: moval l2,16(fp) # fix next return address | |
17 | ret | |
18 | l2: movl _psl,4(sp) | |
19 | movl _pc,(sp) | |
20 | # copy back saved register values | |
21 | movw _regs,r0 | |
22 | movw _regs+02,r1 | |
23 | movw _regs+04,r2 | |
24 | movw _regs+06,r3 | |
25 | movw _regs+010,r4 | |
26 | movw _regs+012,r5 | |
27 | movw _regs+014,r6 | |
28 | # go to compatability mode with rei assuming correct psl is setup | |
29 | rei | |
30 | .globl _getregs | |
31 | _getregs: | |
32 | .word 0 | |
33 | # copy registers into known locations for examination or modification | |
34 | movw r0,_regs | |
35 | movw r1,_regs+02 | |
36 | movw r2,_regs+04 | |
37 | movw r3,_regs+06 | |
38 | movw r4,_regs+010 | |
39 | movw r5,_regs+012 | |
40 | movw r6,_regs+014 | |
41 | ret |