flat assembler
Message board for the users of flat assembler.

Index > Windows > Calling basic WinAPI functions

Author
Thread Post new topic Reply to topic
StrenoJr



Joined: 13 Mar 2014
Posts: 22
Location: Slovakia
StrenoJr 23 Mar 2014, 09:32
Hi, I found in the examples of fasm the hello world that uses invoke to call some functions.
How to call these functions in the nasm-like way?
(extern, import, stack, call)
Side-question: when using chars - what is faster - 'A' or 65d? Or there isn't a speed difference?
Post 23 Mar 2014, 09:32
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20340
Location: In your JS exploiting you and your system
revolution 23 Mar 2014, 09:36
See the MSCOFF.ASM example.
Post 23 Mar 2014, 09:36
View user's profile Send private message Visit poster's website Reply with quote
sid123



Joined: 30 Jul 2013
Posts: 339
Location: Asia, Singapore
sid123 23 Mar 2014, 11:06
Nope. There is no difference between A and 65.
Try this program:
Code:
db 65d
    

And this:
Code:
db 'A'
    

Assemble with FASM and open with a text editor. (Make sure you're in ASCII/Text Mode) in both cases you'll see a A.
Next switch to decimal mode, in both cases you'll see a 65.
It's just a way how you represent them, like 0x0A is a hexadecimal while 10 is a decimal, however they are equal. So no difference.
Post 23 Mar 2014, 11:06
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20340
Location: In your JS exploiting you and your system
revolution 23 Mar 2014, 11:30
SysWorm wrote:
Side-question: when using chars - what is faster - 'A' or 65d? Or there isn't a speed difference?
Unless you are assembling things multiple times per second for every second 24/7 then I seriously doubt it makes any perceivable or important difference to assembly times. If you still really need to know which will be assembled faster then you can try a test for yourself and time it. But your speed results will likely be different from others with different CPU/mobo/RAM combinations.
Post 23 Mar 2014, 11:30
View user's profile Send private message Visit poster's website 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.