source: buchla-68k/alcyon/strncpy.s@ dade7a0

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

Added Alcyon C reference output.

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