Add externs to avoid multiple definitions, and then add missing definitions.
[rrq/maintain_lilo.git] / src / strlen.S
1 ;  strlen.S
2 ;
3 ;  Copyright 2000-2004 John Coffman
4 ;  Copyright 2009-2011 Joachim Wiedorn
5 ;  All rights reserved.
6 ;
7 ;  Licensed under the terms contained in the file 'COPYING'
8 ;  in the source directory.
9 ;
10
11 ;
12 ; strlen:  find length of a string
13 ;       enter with:
14 ;               DS:BX = pointer to string
15 ;
16 ;       return with:
17 ;               AX = length of string
18 ;
19 strlen:
20         mov     ax,bx
21 strlen1:
22         test    byte (bx),#0xFF
23         jz      strlen2
24         inc     bx
25         jmp     strlen1
26 strlen2:
27         sub     bx,ax
28         xchg    ax,bx
29         ret
30
31 ; end strlen.S