1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
--- arla-0.23/lwp/process.S~ Sun Mar 28 16:13:33 1999
+++ arla-0.23/lwp/process.S Fri Aug 13 09:35:56 1999
@@ -207,7 +207,7 @@
#
*/
- .globl _PRE_Block
+ .globl PRE_Block
topstack = 0
@@ -225,26 +225,26 @@
area1 = 12
newsp = 16
- .globl _savecontext
-_savecontext:
- movb #1,_PRE_Block | Dont allow any interrupt finagling
- link a6,#-(nregs*4) | Save frame pointer & ...
+ .globl savecontext
+savecontext:
+ movb #1,PRE_Block | Dont allow any interrupt finagling
+ link %a6,#-(nregs*4) | Save frame pointer & ...
| ... allocate space for nregs registers
/* Save registers */
- moveml #regs,sp@
+ moveml #regs,%sp@
- movl a6@(area1),a0 | a0 = base of savearea
- movl sp,a0@(topstack) | area->topstack = sp
- movl a6@(newsp),d0 | Get new sp
+ movl %a6@(area1),%a0 | a0 = base of savearea
+ movl %sp,%a0@(topstack) | area->topstack = sp
+ movl %a6@(newsp),%d0 | Get new sp
jeq forw1 | If newsp == 0, no stack switch
- movl d0,sp | Switch to new stack
+ movl %d0,%sp | Switch to new stack
forw1:
- movl a6@(f),a0 | a0 = f
- jbsr a0@ | f()
+ movl %a6@(f),%a0 | a0 = f
+ jbsr %a0@ | f()
/* It is impossible to be here, so abort() */
- jbsr _abort
+ jbsr abort
/*
# returnto(area2)
@@ -254,18 +254,18 @@
/* Stack offset of argument */
area2 = 8
- .globl _returnto
-_returnto:
- link a6,#0
- movl a6@(area2),a0 | Base of savearea
- movl a0@(topstack),sp | Restore sp
+ .globl returnto
+returnto:
+ link %a6,#0
+ movl %a6@(area2),%a0 | Base of savearea
+ movl %a0@(topstack),%sp | Restore sp
/* Restore registers */
- moveml sp@,#regs
+ moveml %sp@,#regs
- addl #(nregs*4),sp
- movl sp,a6 | Argghh...be careful here
- unlk a6
- clrb _PRE_Block
+ addl #(nregs*4),%sp
+ movl %sp,%a6 | Argghh...be careful here
+ unlk %a6
+ clrb PRE_Block
rts | Return to previous process
#endif /* mc68000 */
|