flat assembler
Message board for the users of flat assembler.

Index > Windows > [Solved] Can't I use CRTDLL.DLL in Win64?

Author
Thread Post new topic Reply to topic
A$M



Joined: 29 Feb 2012
Posts: 94
A$M 05 Feb 2014, 19:07
Hi,

I'm trying to use AVX. AVX is not the problem. "sprintf" is. Can't I use it?
My code:
Code:
format PE64 CONSOLE
entry main
include 'win64ax.inc'

section '.text' code readable executable

main:
  sub rsp, 8
  vsqrtpd ymm0, qqword[value]
  vmovaps qqword[result], ymm0
  cinvoke sprintf, msg, string, [value], [value+8], [value+16], [value+24]
  invoke MessageBoxA, 0, msg, 0, MB_OK
  invoke ExitProcess, 0

section '.data' data readable writeable
  msg rb 64
  string db "1.0 -> %f, 2.0 -> %f, 3.0 -> %f, 4.0 -> %f,",0
  align 32
  value dq 1.0
        dq 2.0
        dq 3.0
        dq 4.0

section '.bss' data readable writeable
  result rq 4

section '.idata' import data readable writeable

 library kernel32,'KERNEL32.DLL',\
         user32,'USER32.DLL',\
         crtdll,'CRTDLL.DLL'

 include "API\KERNEL32.INC"

 import user32,\
        MessageBoxA,'MessageBoxA'

 import crtdll,\
        sprintf,'sprintf'    

Ps.: "Can't I use" is correct in English?


Last edited by A$M on 05 Feb 2014, 19:58; edited 1 time in total
Post 05 Feb 2014, 19:07
View user's profile Send private message Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 767
tthsqe 05 Feb 2014, 19:21
work for me with 'MSVCRT.DLL' in place of 'CRTDLL.DLL'.
Why don't you write your own floating point print functions?
Post 05 Feb 2014, 19:21
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1178
Location: Unknown
HaHaAnonymous 05 Feb 2014, 19:31
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 18:18; edited 1 time in total
Post 05 Feb 2014, 19:31
View user's profile Send private message Reply with quote
A$M



Joined: 29 Feb 2012
Posts: 94
A$M 05 Feb 2014, 19:58
tthsqe wrote:
work for me with 'MSVCRT.DLL' in place of 'CRTDLL.DLL'.
tthsqe, thanks, thanks, thanks, thanks, thanks, thanks, thanks, thanks, thanks, thanks, thanks, thanks, thanks, thanks, thanks. Very Happy
tthsqe wrote:
Why don't you write your own floating point print functions?

I don't need if I have MSVCRT and CRTDLL. Wink

HaHaAnonymous wrote:
Quote:

Ps.: "Can't I use" is correct in English?

Yes, it is.
Thanks you too, HaHaAnonymous. My English is not so bad. Smile
Post 05 Feb 2014, 19:58
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.