source: buchla-68k/alcyon/strrev.s@ 4810254

Last change on this file since 4810254 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 617 bytes
RevLine 
[7bf3856]1.globl _strrev
2.text
3_strrev:
4~~strrev:
5~s2=R13
6~s1=8
7link R14,#0
8movem.l R6-R7/R12-R13,-(sp)
9~s3=R12
10~i=R7
11*line 24
12move.l 12(R14),R13
13*line 24
14clr.l R7
15*line 25
16move.l 8(R14),R12
17*line 27
18bra L4
19L3:
20*line 28
21*line 29
22add.l #1,R13
23*line 30
24add.l #$1,R7
25L4:
26*line 31
27tst.b (R13)
28bne L3
29L2:
30*line 33
31sub.l #1,R13
32*line 35
33bra L7
34L6:
35*line 36
36move.l R13,R8
37move.b (R8),(R12)+
38sub.l #1,R13
39L7:
40*line 36
41move.l R7,R0
42sub.l #$1,R7
43tst.l R0
44bne L6
45L5:
46*line 38
47clr.b (R12)
48*line 39
49move.l 8(R14),R0
50bra L1
51L1:tst.l (sp)+
52movem.l (sp)+,R7-R7/R12-R13
53unlk R14
54rts
55.data
Note: See TracBrowser for help on using the repository browser.