source: buchla-68k/alcyon/strlen.s@ 4b63bf3

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 331 bytes
Line 
1.globl _strlen
2.text
3_strlen:
4~~strlen:
5~s=R13
6link R14,#0
7movem.l R6-R7/R13-R13,-(sp)
8~n=R7
9*line 15
10clr R7
11*line 17
12move.l 8(R14),R13
13*line 17
14bra L4
15L3:
16*line 18
17add #1,R7
18L4:
19*line 18
20tst.b (R13)+
21bne L3
22L2:
23*line 20
24move R7,R0
25bra L1
26L1:tst.l (sp)+
27movem.l (sp)+,R7-R7/R13-R13
28unlk R14
29rts
30.data
Note: See TracBrowser for help on using the repository browser.