source: buchla-68k/alcyon/strcmp.s@ 7bf3856

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

Added Alcyon C reference output.

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