I type the string '0.1'
and i convert it to _Delta
I show both _Delta0 and _Delta and they are 0.10000000
When i Test, it jumps to label _erro, so
_Delta > _Delta0 !
If _Delta <= _Delta0 it should exit with CLC
is what i want.
What is the problem ? What's the solution ?
.DATA
_Delta dt 0
_Delta0 dt 1.0e-1
;.............................
; -----------
; Test _Delta
; -----------
fld tbyte ptr _Delta0 ;st(1)
fld tbyte ptr _Delta ;st(0)
;
fcomip st(0), st(1)
fwait
jpe short _erro1
ja short _erro
fstp st ;remove source
clc
ret
_erro1: fstp st ;remove source
mov eax, 1
stc
ret
;
; EXIT «««HERE !!!
;
_erro: fstp st ;remove source
mov eax, 0
stc
ret
I decided to use my converter and do this
and now _Delta = _Delta0
.DATA
_sDelta0 db '0.1', 0
_Delta dt 0
_Delta0 dt ?
;.............................
;
; convert _sDelta0 to _Delta0
; »»»»»»»»»»»»»»»»»»»»»»»»»»»
invoke CvRclToRel, addr _sDelta0, addr _Delta0
jc _erro1
; -----------
; Test _Delta
; -----------
fld tbyte ptr _Delta0 ;st(1)
fld tbyte ptr _Delta ;st(0)
;
fcomip st(0), st(1)
fwait
jpe short _erro1
ja short _erro
fstp st ;remove source
; »»»»»»»»»»»»»»»»»
; EXIT «««HERE !!! ««««««««««««««««««««««
; »»»»»»»»»»»»»»»»»
clc
ret
_erro1: fstp st ;remove source
mov eax, 1
stc
ret
_erro: fstp st ;remove source
mov eax, 0
stc
ret