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