Subversion Repositories Kolibri OS

Rev

Rev 8996 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8996 Rev 9014
Line 656... Line 656...
656
;input:
656
;input:
657
; buf - pointer to a hexadecimal string
657
; buf - pointer to a hexadecimal string
658
;output:
658
;output:
659
; eax - number
659
; eax - number
660
align 4
660
align 4
661
proc conv_str_to_int uses ebx ecx esi, buf:dword
661
proc conv_str_to_int uses ebx esi, buf:dword
662
	xor eax,eax
662
	xor eax,eax
663
	xor ebx,ebx
663
	xor ebx,ebx
664
	mov esi,[buf]
664
	mov esi,[buf]
Line 665... Line 665...
665
 
665
 
Line 688... Line 688...
688
			shl eax,4
688
			shl eax,4
689
			add eax,ebx
689
			add eax,ebx
690
			inc esi
690
			inc esi
691
			jmp .cycle_16
691
			jmp .cycle_16
692
	@@:
692
	@@:
693
	cmp ecx,0 ;if the number is negative
-
 
694
	jne @f
-
 
695
		sub ecx,eax
-
 
696
		mov eax,ecx
-
 
697
	@@:
-
 
698
	ret
693
	ret
699
endp
694
endp
700
;---------------------------------------------------------------------
695
;---------------------------------------------------------------------
701
include 'palette.inc'
696
include 'palette.inc'
702
;---------------------------------------------------------------------
697
;---------------------------------------------------------------------