主题:[原创]获取字符串长度
在DOS下可以
mov ax,1213h
lea si,你的字符串
int 2fh
则CX为你字符串长度。
在win下可以用lstrlen函数
在其他OS下(或着根本没有OS),可以
lea di,你的字符串
sub al,al
sub cx,cx
not cx
repnz scasb
not cx
则CX为你字符串长度,
mov ax,1213h
lea si,你的字符串
int 2fh
则CX为你字符串长度。
在win下可以用lstrlen函数
在其他OS下(或着根本没有OS),可以
lea di,你的字符串
sub al,al
sub cx,cx
not cx
repnz scasb
not cx
则CX为你字符串长度,