mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-22 22:56:53 +03:00
3eda462807
Programs: fasm updated to 1.67.14, small fixes in desktop, stackcfg, calc, board, pipes, freecell, big cleanup of unused programs, added some applications from 0.6.3.0 distr... git-svn-id: svn://kolibrios.org@205 a494cfbc-eb01-0410-851d-a64ba20cac60
41 lines
566 B
PHP
41 lines
566 B
PHP
macro use_text_work
|
||
{
|
||
;edi - 㪠§ ⥫ì áâபã, ®£à ¨ç¥ãî ã«¥¬
|
||
;ç¨á«® ¢®§¢à é ¥âáï ¢ eax
|
||
zstr_to_int:
|
||
xor eax,eax
|
||
mov ecx,10
|
||
.next:
|
||
movsx ebx,byte [edi]
|
||
inc edi
|
||
test ebx,ebx
|
||
jz .end_str
|
||
cmp bl,'9'
|
||
jg .no_figure
|
||
cmp bl,'0'
|
||
jl .no_figure
|
||
sub ebx,'0'
|
||
mul ecx
|
||
add eax,ebx
|
||
.no_figure:
|
||
jmp .next
|
||
.end_str:
|
||
ret
|
||
|
||
;edi - 㪠§ ⥫ì áâபã
|
||
;eax - ç¨á«®
|
||
;ebx - ª®«¨ç¥á¢® § ª®¢
|
||
int_to_str:
|
||
mov ecx,10
|
||
.next:
|
||
test ebx,ebx
|
||
jz .end
|
||
xor edx,edx
|
||
div ecx
|
||
add dl,'0'
|
||
dec ebx
|
||
mov [edi+ebx],dl
|
||
jmp .next
|
||
.end:
|
||
ret
|
||
} |