flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > macro sprint for many values ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1526
Roman 27 Mar 2014, 08:52
Code:
macro Infa    [chX*] {
                    cinvoke sprintf,Status22,chX
                    invoke MessageBox,0,Status22,0,0
                   } 
    


In code i write Infa "grGetGpuInfo : %d (%d 0x%04X)\n", ecx, ecx, ecx
Then compiled my code.
Run and i see four identical messages ! Although I was expecting one message, but not 4 messages.

If i write Infa "grGetGpuInfo : %d (%d )", ecx, ecx
I see 3 identical messages

How fix this bug ?
Post 27 Mar 2014, 08:52
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 19468
Location: In your JS exploiting you and your system
revolution 27 Mar 2014, 09:28
Use common:
Code:
macro Infa    [chX*] {
                    common ;add this
                    cinvoke sprintf,Status22,chX
                    invoke MessageBox,0,Status22,0,0
                   }    
Post 27 Mar 2014, 09:28
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1526
Roman 27 Mar 2014, 09:39
revolution
Thanks !
Post 27 Mar 2014, 09:39
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-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.