|
|
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 l0,16(fp) # fix first return address
10: ret
11: l0: moval l1,16(fp) # fix first return address
12: ret
13: l1: moval l2,16(fp) # fix next return address
14: ret
15: l2: movl _psl,4(sp)
16: movl _pc,(sp)
17: # copy back saved register values
18: movw _regs,r0
19: movw _regs+02,r1
20: movw _regs+04,r2
21: movw _regs+06,r3
22: movw _regs+010,r4
23: movw _regs+012,r5
24: movw _regs+014,r6
25: # go to compatability mode with rei assuming correct psl is setup
26: rei
27: .globl _getregs
28: _getregs:
29: .word 0
30: # copy registers into known locations for examination or modification
31: movw r0,_regs
32: movw r1,_regs+02
33: movw r2,_regs+04
34: movw r3,_regs+06
35: movw r4,_regs+010
36: movw r5,_regs+012
37: movw r6,_regs+014
38: ret
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.