Rev 5363 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5363 | Rev 6318 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Author: Kees J. Bot 1 Jan 1994 ;; |
5 | ;; Author: Kees J. Bot 1 Jan 1994 ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 5363 $ |
8 | $Revision: 6318 $ |
9 | 9 | ||
Line 113... | Line 113... | ||
113 | 113 | ||
114 | align 4 |
114 | align 4 |
Line 115... | Line 115... | ||
115 | proc strnlen stdcall, s:dword, n:dword |
115 | proc strnlen stdcall, s:dword, n:dword |
- | 116 | ||
116 | 117 | push edi |
|
117 | push edi |
118 | mov ecx, [n] |
118 | mov edi, [s] ; edi = string |
119 | mov edi, [s] ; edi = string |
119 | xor al, al ; Look for a zero byte |
120 | xor al, al ; Look for a zero byte |
120 | mov edx, ecx ; Save maximum count |
121 | mov edx, ecx ; Save maximum count |