mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-15 11:22:34 +03:00
300 lines
6.6 KiB
PHP
300 lines
6.6 KiB
PHP
|
;-----------------------------------------------------------------------------+
|
|||
|
; <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢥<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> [ by ManHunter / PCL ] |
|
|||
|
;-----------------------------------------------------------------------------|
|
|||
|
; <EFBFBD><EFBFBD>ࠬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>: |
|
|||
|
; lpStr - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>室<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD><EFBFBD> ASCIIZ |
|
|||
|
; lpResult - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<EFBFBD>ਥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> |
|
|||
|
; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>室<EFBFBD>: |
|
|||
|
; EAX = 1 - <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD>ᯥ譮 <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |
|
|||
|
; EAX = 0 - <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> |
|
|||
|
;-----------------------------------------------------------------------------+
|
|||
|
proc string2float lpStr:DWORD, lpResult:DWORD
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>६<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
locals
|
|||
|
dot dd ? ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
exp dd ? ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
digit dd ? ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
endl
|
|||
|
|
|||
|
pusha
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD>ઠ <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov [digit],1
|
|||
|
|
|||
|
mov [exp],0
|
|||
|
mov [dot],0
|
|||
|
mov esi,[lpStr]
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⮫쪮 <EFBFBD> <EFBFBD><EFBFBD>砫<EFBFBD>
|
|||
|
cmp byte [esi],'-'
|
|||
|
je @f
|
|||
|
cmp byte [esi],'+'
|
|||
|
jne .loc_chk_loop
|
|||
|
@@:
|
|||
|
inc esi
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cmp byte [esi],0
|
|||
|
je .loc_chk_error
|
|||
|
.loc_chk_loop:
|
|||
|
; <EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>窨
|
|||
|
lodsb
|
|||
|
or al,al
|
|||
|
jz .loc_chk_complete
|
|||
|
cmp al,'e'
|
|||
|
je .loc_chk_exp
|
|||
|
cmp al,'E'
|
|||
|
je .loc_chk_exp
|
|||
|
cmp al,'.'
|
|||
|
je .loc_chk_dot
|
|||
|
cmp al,'0'
|
|||
|
jb .loc_chk_error
|
|||
|
cmp al,'9'
|
|||
|
ja .loc_chk_error
|
|||
|
jmp .loc_chk_loop
|
|||
|
|
|||
|
.loc_chk_dot:
|
|||
|
; <EFBFBD><EFBFBD>窠 <EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> 㦥 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
cmp [dot],0
|
|||
|
; <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>४<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD>
|
|||
|
jne .loc_chk_error
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㦥 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
cmp [exp],0
|
|||
|
; <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>४<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD>
|
|||
|
jne .loc_chk_error
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov [dot],esi
|
|||
|
|
|||
|
jmp .loc_chk_loop
|
|||
|
|
|||
|
.loc_chk_exp:
|
|||
|
; <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㦥 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
cmp [exp],0
|
|||
|
; <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>४<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ଠ<EFBFBD>
|
|||
|
jne .loc_chk_error
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>砫<EFBFBD> <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov [exp],esi
|
|||
|
|
|||
|
; <EFBFBD>ࠧ<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cmp byte [esi],0
|
|||
|
je .loc_chk_error
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cmp byte [esi],'-'
|
|||
|
je @f
|
|||
|
cmp byte [esi],'+'
|
|||
|
jne .loc_chk_loop
|
|||
|
@@:
|
|||
|
inc esi
|
|||
|
|
|||
|
; <EFBFBD>ࠧ<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cmp byte [esi],0
|
|||
|
je .loc_chk_error
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>騩 ᨬ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
jmp .loc_chk_loop
|
|||
|
|
|||
|
.loc_chk_error:
|
|||
|
; <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov [digit],0
|
|||
|
jmp .loc_ret
|
|||
|
|
|||
|
.loc_chk_complete:
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD>樠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
finit
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD>砫쭮<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|||
|
fldz
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD>
|
|||
|
mov [digit],10
|
|||
|
fild dword [digit]
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮩
|
|||
|
mov esi,[lpStr]
|
|||
|
|
|||
|
; <EFBFBD> <EFBFBD><EFBFBD>砫<EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
cmp byte [esi],'-'
|
|||
|
je @f
|
|||
|
cmp byte [esi],'+'
|
|||
|
jne .loc_before_dot
|
|||
|
@@:
|
|||
|
inc esi
|
|||
|
; <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮩
|
|||
|
.loc_before_dot:
|
|||
|
lodsb
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>?
|
|||
|
or al,al
|
|||
|
jz .loc_complete
|
|||
|
|
|||
|
cmp al,'.'
|
|||
|
je .loc_complete_before_dot
|
|||
|
cmp al,'e'
|
|||
|
je .loc_exp
|
|||
|
cmp al,'E'
|
|||
|
je .loc_exp
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
sub al,'0'
|
|||
|
movzx eax,al
|
|||
|
mov [digit],eax
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
fild dword [digit]
|
|||
|
fxch st2
|
|||
|
fmul st0,st1
|
|||
|
fxch st2
|
|||
|
fadd st2,st0
|
|||
|
|
|||
|
ffree st0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⥪
|
|||
|
fincstp
|
|||
|
|
|||
|
jmp .loc_before_dot
|
|||
|
|
|||
|
; <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|||
|
.loc_complete_before_dot:
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
cmp [dot],0
|
|||
|
je .loc_complete_after_dot
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
cmp [exp],0
|
|||
|
je @f
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>砫<EFBFBD> <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov esi,[exp]
|
|||
|
jmp .loc_start_after_dot
|
|||
|
@@:
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>७<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>
|
|||
|
xor ecx,ecx
|
|||
|
dec ecx
|
|||
|
xor eax,eax
|
|||
|
mov edi,esi
|
|||
|
repne scasb
|
|||
|
|
|||
|
mov esi,edi
|
|||
|
|
|||
|
.loc_start_after_dot:
|
|||
|
std
|
|||
|
dec esi
|
|||
|
dec esi
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
fldz
|
|||
|
fxch st1
|
|||
|
.loc_after_dot:
|
|||
|
lodsb
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
cmp al,'.'
|
|||
|
je .loc_complete_after_dot
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
sub al,'0'
|
|||
|
movzx eax,al
|
|||
|
mov [digit],eax
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
fild dword [digit]
|
|||
|
fadd st2,st0
|
|||
|
fxch st2
|
|||
|
fdiv st0,st1
|
|||
|
fxch st2
|
|||
|
|
|||
|
ffree st0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⥪
|
|||
|
fincstp
|
|||
|
|
|||
|
jmp .loc_after_dot
|
|||
|
|
|||
|
.loc_complete_after_dot:
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䫠<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ࠢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cld
|
|||
|
|
|||
|
ffree st0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⥪
|
|||
|
fincstp
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 楫<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
fadd st1,st0
|
|||
|
|
|||
|
.loc_exp:
|
|||
|
; <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
cmp [exp],0
|
|||
|
je .loc_complete
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
xor ecx,ecx
|
|||
|
|
|||
|
mov esi,[exp]
|
|||
|
; <EFBFBD> <EFBFBD><EFBFBD>砫<EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
cmp byte [esi],'-'
|
|||
|
je @f
|
|||
|
cmp byte [esi],'+'
|
|||
|
jne .loc_start_exp
|
|||
|
@@:
|
|||
|
inc esi
|
|||
|
.loc_start_exp:
|
|||
|
lodsb
|
|||
|
or al,al
|
|||
|
jz .loc_end_exp
|
|||
|
|
|||
|
sub al,'0'
|
|||
|
movzx eax,al
|
|||
|
imul ecx,10
|
|||
|
add ecx,eax
|
|||
|
|
|||
|
jmp .loc_start_exp
|
|||
|
.loc_end_exp:
|
|||
|
|
|||
|
or ecx,ecx
|
|||
|
jz .loc_complete
|
|||
|
|
|||
|
ffree st0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⥪
|
|||
|
fincstp
|
|||
|
|
|||
|
mov [digit],10
|
|||
|
fild dword [digit]
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 㬭<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
mov esi,[exp]
|
|||
|
cmp byte [esi],'-'
|
|||
|
je .loc_exp_divide
|
|||
|
|
|||
|
.loc_exp_multiple:
|
|||
|
fmul st1,st0
|
|||
|
loop .loc_exp_multiple
|
|||
|
jmp .loc_complete
|
|||
|
|
|||
|
.loc_exp_divide:
|
|||
|
fdiv st1,st0
|
|||
|
loop .loc_exp_divide
|
|||
|
|
|||
|
.loc_complete:
|
|||
|
ffree st0 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⥪
|
|||
|
fincstp
|
|||
|
|
|||
|
; <EFBFBD> <EFBFBD><EFBFBD>砫<EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
mov esi,[lpStr]
|
|||
|
cmp byte [esi],'-'
|
|||
|
jne @f
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|||
|
fchs
|
|||
|
@@:
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>祩<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov eax,[lpResult]
|
|||
|
; <EFBFBD> <EFBFBD>ॡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>襭<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>筮<EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD>ਥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD> QWORD, <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> fstp qword [eax]
|
|||
|
fstp tword [eax]
|
|||
|
|
|||
|
; <EFBFBD>ᯥ譮<EFBFBD> <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov [digit],1
|
|||
|
.loc_ret:
|
|||
|
popa
|
|||
|
|
|||
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>८<EFBFBD>ࠧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov eax,[digit]
|
|||
|
|
|||
|
ret
|
|||
|
endp
|