source: buchla-68k/alcyon/memccpy.s

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

Added Alcyon C reference output.

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