flat assembler
Message board for the users of flat assembler.
Index
> Windows > How can I get Windows OS version during compilation. |
Author |
|
revolution 11 Sep 2012, 00:33
I'm curious to know the purpose? Is this useful in some places?
|
|||
11 Sep 2012, 00:33 |
|
typedef 11 Sep 2012, 01:37
revolution wrote: I'm curious to know the purpose? Is this useful in some places? Well of course it is. I want to make a program using FASM with some hard coded numbers based on the System's OS version and mode(32bit/64bit ). |
|||
11 Sep 2012, 01:37 |
|
revolution 11 Sep 2012, 02:48
typedef wrote: I want to make a program using FASM with some hard coded numbers based on the System's OS version and mode(32bit/64bit ). |
|||
11 Sep 2012, 02:48 |
|
typedef 11 Sep 2012, 03:34
revolution wrote:
I have different OSs. XP, VISTA, Windows 7. The same as having to define a variable or function in C/C++ based on System. So it seems there's no way. Then we can end this thread. |
|||
11 Sep 2012, 03:34 |
|
revolution 11 Sep 2012, 03:40
You can make a file for each target machine OS that you want to compile the code for:
Code: ;MyUberProggyW2K.asm OS equ W2K include 'MyUberProggy.inc' Code: ;MyUberProggyW7.asm OS equ W7 include 'MyUberProggy.inc' |
|||
11 Sep 2012, 03:40 |
|
typedef 11 Sep 2012, 03:49
Quote:
I'll never develop for linux/Unix, dunix or trinix or whatever you call them. |
|||
11 Sep 2012, 03:49 |
|
JohnFound 11 Sep 2012, 05:53
This can help maybe.
Code: include "%OS%/MyUberProggy.inc" I am not sure for the value of %OS% environment variable for different versions of Windows. Although, you should never make OS dependent compilation. It is very, very bad practice IMHO. |
|||
11 Sep 2012, 05:53 |
|
revolution 11 Sep 2012, 05:59
JohnFound wrote: I am not sure for the value of %OS% environment variable for different versions of Windows. Code: OS=Windows_NT |
|||
11 Sep 2012, 05:59 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.