summaryrefslogtreecommitdiff
path: root/sys/src/libc/68000/strlen.s
blob: 4d787c7048a73d78622d47633a982d9a3093957f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
	TEXT	strlen(SB), $0
	MOVL	s+0(FP), A1

	TSTB	(A1)+
	BEQ	null
	MOVL	A1, A2

l1:
	TSTB	(A1)+
	BNE	l1

	SUBL	A2, A1
	MOVL	A1, R0
	RTS

null:
	MOVL	$0, R0
	RTS