Last change
on this file since 526a993 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
690 bytes
|
Line | |
---|
1 | .globl _strrevi
|
---|
2 | .text
|
---|
3 | _strrevi:
|
---|
4 | ~~strrevi:
|
---|
5 | ~s=8
|
---|
6 | link R14,#0
|
---|
7 | movem.l R5-R7/R12-R13,-(sp)
|
---|
8 | ~p1=R13
|
---|
9 | ~p2=R12
|
---|
10 | ~i=R7
|
---|
11 | ~c=R6
|
---|
12 | *line 22
|
---|
13 | move.l 8(R14),R13
|
---|
14 | *line 23
|
---|
15 | move.l 8(R14),R12
|
---|
16 | *line 24
|
---|
17 | clr.l R7
|
---|
18 | *line 26
|
---|
19 | bra L4
|
---|
20 | L3:
|
---|
21 | *line 27
|
---|
22 | *line 28
|
---|
23 | add.l #$1,R7
|
---|
24 | *line 29
|
---|
25 | add.l #1,R12
|
---|
26 | L4:
|
---|
27 | *line 30
|
---|
28 | tst.b (R12)
|
---|
29 | bne L3
|
---|
30 | L2:
|
---|
31 | *line 32
|
---|
32 | sub.l #1,R12
|
---|
33 | *line 33
|
---|
34 | asr.l #$1,R7
|
---|
35 | *line 35
|
---|
36 | bra L7
|
---|
37 | L6:
|
---|
38 | *line 36
|
---|
39 | *line 37
|
---|
40 | move.b (R12),R6
|
---|
41 | *line 38
|
---|
42 | move.l R12,R8
|
---|
43 | move.b (R13),(R8)
|
---|
44 | sub.l #1,R12
|
---|
45 | *line 39
|
---|
46 | move.b R6,(R13)+
|
---|
47 | L7:
|
---|
48 | *line 40
|
---|
49 | move.l R7,R0
|
---|
50 | sub.l #$1,R7
|
---|
51 | tst.l R0
|
---|
52 | bne L6
|
---|
53 | L5:
|
---|
54 | *line 42
|
---|
55 | move.l 8(R14),R0
|
---|
56 | bra L1
|
---|
57 | L1:tst.l (sp)+
|
---|
58 | movem.l (sp)+,R6-R7/R12-R13
|
---|
59 | unlk R14
|
---|
60 | rts
|
---|
61 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.