source: buchla-68k/alcyon/memchr.s@ 342a56f

Last change on this file since 342a56f 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
RevLine 
[7bf3856]1.globl _memchr
2.text
3_memchr:
4~~memchr:
5~sp=R13
6~c=R7
7~n=R6
8link R14,#0
9movem.l R5-R7/R13-R13,-(sp)
10*line 16
11move.l 8(R14),R13
12*line 16
13move.b 13(R14),R7
14*line 16
15move 14(R14),R6
16*line 16
17bra L4
18L3:
19*line 17
20*line 18
21cmp.b (R13)+,R7
22bne L5
23*line 18
24sub.l #1,R13
25move.l R13,R0
26bra L1
27L5:L4:
28*line 19
29sub #1,R6
30bge L3
31L2:
32*line 19
33clr.l R0
34bra L1
35L1:tst.l (sp)+
36movem.l (sp)+,R6-R7/R13-R13
37unlk R14
38rts
39.data
Note: See TracBrowser for help on using the repository browser.