;---------------------------------------------------
Get_String_Length PROC NEAR
;
; Get the length of a string end with zero.
; Receive(s): ES:BP = segment:offset of the string
; Return(s): CX = length of the string
;---------------------------------------------------
PUSH BP
MOV CX,0 ;clear CX counter
Counting:
CMP BYTE PTR ES:[BP],0
JE Count_Finish
INC CX
INC BP
JMP Counting
Count_Finish:
POP BP
RET
Get_String_Length ENDP
阅读(1534) | 评论(0) | 转发(0) |