How to convert a minus number to string retaining the format. -SDWORD-
MASM seems to convert it to "DWORD" except for "%echo" :eek
I need "-20.0" and not "4294967276.0" ::)
.686p
.model flat, stdcall
option casemap :none
pushf4 MACRO Num:REQ
push dword ptr 0
ORG $-4
REAL4 Num
ENDM
First MACRO Num:REQ
LOCAL Fl,StrFl
Fl EQU Num
%echo @CatStr(<%Fl>)
StrFl CATSTR %(&Fl),<.0>
%echo StrFl
pushf4 StrFl
ENDM
.code
start:
int 3
First -10*2
fld dword ptr [esp]
end start
include \masm32\include\masm32rt.inc
pushf4 MACRO Num:REQ
push dword ptr 0
ORG $-4
REAL4 Num
ENDM
First MACRO Num:REQ
pushf4 @CatStr(%Num, <.0>)
ENDM
.code
start:
int 3
First -10*2
fld dword ptr [esp]
exit
end start
Damn!
Thanks :clap:
I wish I could understand why something works and why not. :red :green