flat assembler
Message board for the users of flat assembler.

Index > Windows > Using 32bit headers in 64bit OS

Author
Thread Post new topic Reply to topic
codeHacker101



Joined: 02 Nov 2020
Posts: 22
codeHacker101 04 Nov 2020, 08:49
Hi, I am running Windows 7, 64bit. I downloaded and extracted FASM recently and was able to compile the HELLO.ASM file from the EXAMPLES folder.

It contains the line
Code:
include 'win32ax.inc' ; you can simply switch between win32ax, win32wx, win64ax and win64wx here    
. But if I leave the header as
Code:
win32ax.inc    
in my 64bit system, it still compiles without any erros.

Now I do know from past experience that when you install a 32bit program in a 64bit OS, it still works, but 64bit programs are supposed to run faster. Is it the same for programming? I can forget about the 64bit headers and always use 32bit ones, but they will just be a little slower?

Some might suggest to look at the documentation for programming in Windows, but its really complicated and contains a lot of terms I don't understand yet.

Looking forward to your responces. Thanks in advance.
Post 04 Nov 2020, 08:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 04 Nov 2020, 09:00
You will have to test your programs to see which are faster using 64-bit code. Sometimes programs are faster, sometimes they are slower. It depends upon what they actually do.
Post 04 Nov 2020, 09:00
View user's profile Send private message Visit poster's website Reply with quote
codeHacker101



Joined: 02 Nov 2020
Posts: 22
codeHacker101 04 Nov 2020, 09:20
But either will always work? Or do I have to worry about compilation errors BECAUSE I used 32bit header/s in my 64bit system in some cases?
Post 04 Nov 2020, 09:20
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 04 Nov 2020, 09:51
Either will always work. fasm does not use any headers from your system. All included files are supplied by you or with fasm.
Post 04 Nov 2020, 09:51
View user's profile Send private message Visit poster's website Reply with quote
codeHacker101



Joined: 02 Nov 2020
Posts: 22
codeHacker101 04 Nov 2020, 10:59
Then I suppose it is usually better to use 64bit headers in a 64bit system. I should make it a habit to avoid 32bit headers in general, UNLESS there is an explicit reason to use them.
Post 04 Nov 2020, 10:59
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20300
Location: In your JS exploiting you and your system
revolution 04 Nov 2020, 11:05
I would suggest the opposite. Use 32-bit code unless you have a specific reason to need 64-bit.

In general, 32-bit is both easier to write, and "faster" (as in more efficient) for most workloads.

But, anyhow, always test your code in both cases to see what works for your situation.
Post 04 Nov 2020, 11:05
View user's profile Send private message Visit poster's website Reply with quote
codeHacker101



Joined: 02 Nov 2020
Posts: 22
codeHacker101 04 Nov 2020, 11:34
I don't really wanna bother with testing code speed again and again. I think I'll just take your word for it when you say In general, 32-bit is both easier to write, and "faster" (as in more efficient) for most workloads. Thank you for your help revolution.
Post 04 Nov 2020, 11:34
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 04 Nov 2020, 12:53
Special advantage is that 32-bit code runs both on 32- and 64-bit systems while 64-bit code is specifically limited to 64-bit systems.
Post 04 Nov 2020, 12:53
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.