Last change
on this file since a95b757 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
446 bytes
|
Line | |
---|
1 | .globl _memchr
|
---|
2 | .text
|
---|
3 | _memchr:
|
---|
4 | ~~memchr:
|
---|
5 | ~sp=R13
|
---|
6 | ~c=R7
|
---|
7 | ~n=R6
|
---|
8 | link R14,#0
|
---|
9 | movem.l R5-R7/R13-R13,-(sp)
|
---|
10 | *line 16
|
---|
11 | move.l 8(R14),R13
|
---|
12 | *line 16
|
---|
13 | move.b 13(R14),R7
|
---|
14 | *line 16
|
---|
15 | move 14(R14),R6
|
---|
16 | *line 16
|
---|
17 | bra L4
|
---|
18 | L3:
|
---|
19 | *line 17
|
---|
20 | *line 18
|
---|
21 | cmp.b (R13)+,R7
|
---|
22 | bne L5
|
---|
23 | *line 18
|
---|
24 | sub.l #1,R13
|
---|
25 | move.l R13,R0
|
---|
26 | bra L1
|
---|
27 | L5:L4:
|
---|
28 | *line 19
|
---|
29 | sub #1,R6
|
---|
30 | bge L3
|
---|
31 | L2:
|
---|
32 | *line 19
|
---|
33 | clr.l R0
|
---|
34 | bra L1
|
---|
35 | L1:tst.l (sp)+
|
---|
36 | movem.l (sp)+,R6-R7/R13-R13
|
---|
37 | unlk R14
|
---|
38 | rts
|
---|
39 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.