			public	strlen
strlen_asm	segment	'code'
			assume	cs:strlen_asm

strlen		proc	far

s1			equ		dword ptr [bp+06h]

			push	bp
			mov		bp,sp
			push	di
			cld
			les		di,s1
			test	di,0ffffh
			jnz		saveit
			mov		ax,es
			test	ax,0ffffh
			jnz		saveit		; just loaded ax with 0
			jmp		return
saveit:
			mov		bx,di		;save for later
			sub		ax,ax
			mov		cx,7fffH
			repne	scasb
			mov		ax,di
			sub		ax,bx		;compute length of string
			dec		ax
return:
			pop		di
			pop		bp
			ret		04h
strlen		endp
strlen_asm	ends
			end
pOOPOop?	
0P	0 op	P0)	)?3?6	0>oPGV	WabgogPjpmyoPz}P @	@pp@_0 O	@P 