All pastes #152352 Raw Edit

Unnamed

public text v1 · immutable
#152352 ·published 2006-08-28 18:57 UTC
rendered paste body
	;STRing_LENgth_in_Bytes
	STRLENB PROC NEAR
		PUSH bp
		MOV bp,sp

		MOV bx,[bp+4] ;bx <- argument
		MOV dx,0Dh

		SUB ax,ax ;ax = NULL , will be our counter
	lp1:	CMP [bx],dx ;compare if end of string
		ADD bx,1
		ADD ax,1
		JNE lp1

		MOV [bp+4], ax ;Returning

		POP BP
		RETN
	STRLENB ENDP