flat assembler
Message board for the users of flat assembler.
Index
> Main > /D switch for FASM? Goto page 1, 2 Next |
Author |
|
donkey7 19 Jan 2007, 15:08
it was discussed before and disapproved.
read: http://flatassembler.net/docs.php?article=design chapter '3. Same Source, Same Output' instead you can create two files. windows.asm: Code: LINUX = 0 include 'main.asm' linux.asm: Code: LINUX = 1 include 'main.asm' this would be even easier for noobs to compile ;] |
|||
19 Jan 2007, 15:08 |
|
MazeGen 19 Jan 2007, 15:44
What about something like settings.inc file, where the text macro would be defined?
settings.inc wrote:
Code: include settings.inc if defined LINUX format ELF else format PE endif It is just a silly example. It can be improved so that you can edit the settings file automatically using, for instance, some batch before the asm file gets actually compiled. |
|||
19 Jan 2007, 15:44 |
|
f0dder 19 Jan 2007, 16:18
Not wanting to add a /D is a bit silly, imho - you can work around it using environment variables, which is even uglier.
|
|||
19 Jan 2007, 16:18 |
|
rugxulo 19 Jan 2007, 20:29
Right now, the only thing that prevents FASM code from compiling is using a different version (e.g., ## becomes \# or whatever). This is rare, and not a big deal. If more cmdline options are added, it will definitely complicate the process. Once you let in one, it's a slippery slope from there.
Quote:
Seriously, it's just easier the way it is. |
|||
19 Jan 2007, 20:29 |
|
f0dder 19 Jan 2007, 22:45
*shrug*
just seems silly to me to not support a feature that'd make certain things easier without kludgy workarounds or code duplication. |
|||
19 Jan 2007, 22:45 |
|
ACP 04 Feb 2007, 19:03
f0dder wrote: *shrug* I agree - there is no point in using tricks just to accomplish simple task. |
|||
04 Feb 2007, 19:03 |
|
MazeGen 05 Feb 2007, 16:38
I disagree. Using a "setup file" seems cleaner to me. I don't think it's a workaround.
|
|||
05 Feb 2007, 16:38 |
|
vid 05 Feb 2007, 17:23
this feature can come handy sometimes (external configs), and annoying other times (compilation problems). Generally, now i wouldn't mind if it was present.
It is not very needed for FASM style of coding, where entire project is always compiled. There you have multiple main files, one for each version, and it works. But if you change coding style to having many files compiled to objects and linked together, this gets annoying. |
|||
05 Feb 2007, 17:23 |
|
rugxulo 05 Feb 2007, 20:01
Any particular reason to use FASM (which lacks this) over YASM? (It supports x86-64, so I'm guessing incompatible macros.)
|
|||
05 Feb 2007, 20:01 |
|
vid 05 Feb 2007, 21:21
don't forget FASM "lacks" this on purpose, gaining something else.
To me FASM seems somewhat neater to use... try both and decide for yourself. |
|||
05 Feb 2007, 21:21 |
|
DOS386 07 Feb 2007, 01:07
Quote:
YES:
Quote:
NOT amused. But instead, one could allow 1 ( ONE ) constant to be set from cmdline: Code: FASM HELLO.ASM /D:OS=2 Code: OS = 1 ; default if OS = 1 format PE else format MZ endif Just ^^^ an idea _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
07 Feb 2007, 01:07 |
|
f0dder 07 Feb 2007, 10:16
Who cares about DOS? You could always use WDOSX or Japheth's HX anyway.
NTOSKRNL_VXE wrote:
Why the sad smiley? _________________ - carpe noctem |
|||
07 Feb 2007, 10:16 |
|
vid 07 Feb 2007, 10:58
i think there was some integration of FASM to VS2005 some time ago.
|
|||
07 Feb 2007, 10:58 |
|
rugxulo 07 Feb 2007, 13:51
Yes, YASM works in DOS (see snapshots). It's not exactly useless: it does some things FASM doesn't (e.g., GAS parser).
What I meant was: since FASM probably won't have /D any time soon, why not consider using YASM? (Not necessarily realistic, but who knows, maybe your code ain't too FASM specific). |
|||
07 Feb 2007, 13:51 |
|
vid 07 Feb 2007, 16:17
Some YASM sources can even be "ported" just by compiling with different file format, without any extra effort in sources. But that requires portable library with defined ABI, it is sometimes problem with libc.
But FASM still has better design than NASM/YASM. |
|||
07 Feb 2007, 16:17 |
|
Japheth 07 Feb 2007, 18:20
> But FASM still has better design than NASM/YASM.
Might be, but at least they support creating debugging info, listings and OMF output format (NASM, YASM is just about to - hopefully - support this important feature). In FASM I still don't find such things. Are they regarded as unimportant/obsolete by most FASM users? |
|||
07 Feb 2007, 18:20 |
|
rugxulo 07 Feb 2007, 20:56
I think the main problem is Privalov's lack of free time. (He's already stated much interest in creating his own debug format as well as possible Mach-o support.)
FASM and YASM are both good tools to use if they do what you want. (A good example of NASM/YASM code that assembles correctly for multiple file formats is PAQ8? by Matt Mahoney.) |
|||
07 Feb 2007, 20:56 |
|
vid 07 Feb 2007, 21:24
Quote: Might be, but at least they support creating debugging info, listings and OMF output format (NASM, YASM is just about to - hopefully - support this important feature). In FASM I still don't find such things. Are they regarded as unimportant/obsolete by most FASM users? debugging info is regarded unimportant by tomasz push on him |
|||
07 Feb 2007, 21:24 |
|
DOS386 07 Feb 2007, 23:21
Quote: Who cares about DOS? ME. And Tomasz maybe Quote: or Japheth's HX anyway Sorry I know this I am probably the hardest-core user of it Quote: Why the sad smiley? Well, this "Studio": - Is it useful ? - Benefits ? - Works anywhere except in XP SP2 ? - Size ? - Legal download ? - Usable license ? Quote: Yes, YASM works in DOS (see snapshots OK, existenbce of a DGJPP or "DGJPP-MSDOS" port does NOT necessarily mean there is a usable DOS version - some of such stuff does work in DOS, some don't (mostly Page Faults ). Quote:
- Debug: ??? maybe - Listing: Right, a neglected thing. A statement from Tomasz would be nice. - OMF: I see no benefit by now. Having OMF out one still has a hard fight left to link it correctly _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
07 Feb 2007, 23:21 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.