source: buchla-68k/alcyon/memcmp.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: 536 bytes
Line 
1.globl _memcmp
2.text
3_memcmp:
4~~memcmp:
5~s1=R13
6~s2=R12
7~n=R7
8link R14,#0
9movem.l R5-R7/R12-R13,-(sp)
10~diff=R6
11*line 17
12move.l 8(R14),R13
13*line 17
14move.l 12(R14),R12
15*line 17
16move 16(R14),R7
17*line 17
18*line 18
19cmp.l R12,R13
20beq L2
21*line 18
22bra L5
23L4:
24*line 19
25*line 20
26move.b (R13)+,R6
27ext.w R6
28move.b (R12)+,R0
29ext.w R0
30sub R0,R6
31beq L6
32*line 20
33move R6,R0
34bra L1
35L6:L5:
36*line 21
37sub #1,R7
38bge L4
39L3:L2:
40*line 21
41clr R0
42bra L1
43L1:tst.l (sp)+
44movem.l (sp)+,R6-R7/R12-R13
45unlk R14
46rts
47.data
Note: See TracBrowser for help on using the repository browser.