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