ext fs and other global cleaning

git-svn-id: svn://kolibrios.org@6462 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
pathoswithin
2016-07-13 01:01:16 +00:00
parent 326d13ad14
commit 0179d69549
13 changed files with 2896 additions and 5281 deletions

View File

@@ -1,7 +1,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License. ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -391,3 +391,72 @@ ansi2uni_char:
.unk:
mov al, '_'
ret
utf8_to_cp866:
; in: esi, edi, ecx
; destroys esi, edi, ecx, eax
call utf8to16
js utf8to16.ret
call uni2ansi_char
stosb
jmp utf8_to_cp866
utf8to16:
; in:
; esi -> string
; ecx = byte counter
; out:
; SF=1 -> end
; ax = UTF-16 char
; changes esi, ecx
dec ecx
js .ret
lodsb
test al, al
jns .got
shl al, 2
jnc utf8to16
@@:
shl ax, 8
dec ecx
js .ret
lodsb
test al, al
jns .got
shl al, 2
jc @b
shr ah, 2
shl ax, 3
jnc @f
shl eax, 3
dec ecx
js .ret
lodsb
test al, al
jns .got
shl al, 2
jc @b
shr eax, 2
ret
@@:
shr ax, 5
ret
.got:
xor ah, ah
.ret:
ret
strlen:
; in: esi -> source
; out: ecx = length
push edi eax
or ecx, -1
mov edi, esi
xor eax, eax
repnz scasb
inc ecx
not ecx
pop eax edi
ret