News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

floating point not loaded r6002 ^@#¤

Started by ToutEnMasm, June 25, 2009, 12:28:04 PM

Previous topic - Next topic

ToutEnMasm


I just try to make this work in an executable


Quote
   include \masm32\include\masm32rt.inc
   include     \masm32\include\strsafe.inc   
   includelib  C:\PROGRA~1\MI9D60~1\Lib\strsafe.lib
   includelib  \masm32\lib\msvcrt.lib
   includelib  C:\PROGRA~1\MICROS~1.0\VC\lib\libcmt.lib   
   WinMain PROTO :DWORD,  :DWORD,  :DWORD,  :SDWORD
;      STRSAFE_FILL_BYTE(0xFF)     0x000000FF  // bottom byte specifies fill pattern
STRSAFE_IGNORE_NULLS   equ   <000000100h>
STRSAFE_FILL_BEHIND_NULL   equ   <000000200h>
STRSAFE_FILL_ON_FAILURE   equ   <000000400h>
STRSAFE_NULL_ON_FAILURE   equ   <000000800h>
STRSAFE_NO_TRUNCATION   equ   <000001000h>
STRSAFE_VALID_FLAGS   equ   <0000000FFh OR  STRSAFE_IGNORE_NULLS OR  STRSAFE_FILL_BEHIND_NULL OR \
                  STRSAFE_FILL_ON_FAILURE OR  STRSAFE_NULL_ON_FAILURE OR  STRSAFE_NO_TRUNCATION>      
   .const
   .data
   Xbug REAL8 2.3   
   PrintfFloat2 db "Real numbers:","%f",0   
   Affichage db 100 dup (0)
   ppszDestEnd dd 0
   .code
      
   
   WinMain proc STDCALL public uses esi edi ebx, hInst:DWORD,hPrev:DWORD,\
                        lpCmdLine:DWORD,nShowCmd:SDWORD
      invoke StringCbPrintfEx,addr Affichage,sizeof Affichage,addr ppszDestEnd,
                   NULL,STRSAFE_IGNORE_NULLS,addr PrintfFloat2,Xbug
   lea eax,Xbug
   
      mov eax,0
      ret
   WinMain endp   
   
   ;------- proc içi ------------
   end

drizz

There is a hidden var that must be defined for libc so that floating point procs work.
extern c _FPinit:dword
The truth cannot be learned ... it can only be recognized.

ToutEnMasm


That's an information !,it work now.
many thanks