flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > usage: fasm source [output] Goto page 1, 2 Next |
Author |
|
Tommy 10 Jul 2004, 08:20
I agree... That would be a nice feature.
|
|||
10 Jul 2004, 08:20 |
|
scientica 10 Jul 2004, 18:45
I'd say that if no output is specified then output = input - extension (thus all text before but not includng the last dot )
eg. fasm input.asm => "intput" fasm input.something.foo.txt.asm => "input.something.foo.txt" Guessing output names beyond this could be hazardous... (/me still dreams of fasm output to stdout (of the compiled data only, no "extra" output)) |
|||
10 Jul 2004, 18:45 |
|
pelaillo 10 Jul 2004, 21:36
Actually I am doing that way, stripping the ".asm" when launched by file association.
Fasmw guesses the extension from format directive and I see no hazard on it. There are no ambiguities. Am I missing something? Imagine if you "dblclick" an asm file in any filemanager and Fasm produces exactly the file you intended. |
|||
10 Jul 2004, 21:36 |
|
scientica 11 Jul 2004, 16:38
how does it know if I want no extension, .bin, .foo, .bar, or .whatnot? You see that kind of "hazard"
|
|||
11 Jul 2004, 16:38 |
|
decard 11 Jul 2004, 16:44
then you could use "fasm source output" form. The whole simplification wouldn't have any sense if I had to modify filename by myself.
|
|||
11 Jul 2004, 16:44 |
|
pelaillo 11 Jul 2004, 16:46
Look that it is optional, it guesses only if you don't specify output.
What about this: Code: format extension (none) . (or .com or .bin)? elf executable . elf .o MZ .exe PE .exe PE DLL .dll COFF .obj MS COFF .obj |
|||
11 Jul 2004, 16:46 |
|
decard 11 Jul 2004, 20:37
BTW, why ordinary COFF files have default .obj extension? GCC produces *.o
|
|||
11 Jul 2004, 20:37 |
|
scientica 12 Jul 2004, 16:00
my suggestion:
Code: format | suffix -- ---------+------------------------------------------------------------------- (none) | (none - it's just a flat file, plain and simple) elf (exec) | (none) elf (obj) | .o MZ | .exe PE | .exe PE DLL | .dll COFF | .o/.obj (maybe OS related, .o for *nix/*bsd/etc, .obj for Win/DOS) MS COFF | .obj |
|||
12 Jul 2004, 16:00 |
|
pelaillo 12 Jul 2004, 16:04
Perfect !
Now left only the boss' opinion |
|||
12 Jul 2004, 16:04 |
|
decard 12 Jul 2004, 16:44
maybe .com extension when selecting "format binary", which is the default option, but specifing it is still valid?
|
|||
12 Jul 2004, 16:44 |
|
Tomasz Grysztar 13 Jul 2004, 08:20
Quote: This is a long desired option In fact I don't recall any serious requests for this feature - though it's quite easy to add. As for the "extensioning" strategy - isn't the one used by fasmw enough? I'd copy it when implementing into console versions. |
|||
13 Jul 2004, 08:20 |
|
scientica 13 Jul 2004, 17:44
decard wrote: maybe .com extension when selecting "format binary", which is the default option, but specifing it is still valid? IMO binary means (flat) binary, not .com (which iirc, actaully has an orgian at 100h, not 0h (as "pure flat binaries")). better go with some "format com" instead. _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
13 Jul 2004, 17:44 |
|
vid 13 Jul 2004, 19:18
isn't it possible to get "origin" of first data in file when quesing extansion? If yes, then COM file will be generated only if first data of flat binary is at origin 100. I think such quessing would be okay and backward compatible too.
|
|||
13 Jul 2004, 19:18 |
|
Tomasz Grysztar 15 Jul 2004, 13:37
It's a good idea, though it cannot be done this way. But it might be possible to catch the values given to "org" directive and store the first one (or the last one used at the point, where not yet any data has been generated) for later extension guessing.
|
|||
15 Jul 2004, 13:37 |
|
vid 15 Jul 2004, 18:38
i think it should catch argument of first "org" not preceded by data and followed by data immediately (eg. no other "org" between them).
|
|||
15 Jul 2004, 18:38 |
|
pelaillo 16 Jul 2004, 04:14
I second scientica on "format com".
Reasons: 1. Conceptually, com is a format (one that is not different to plain binary, but a format anyway) 2. Extension guessing depending on directives other than format could become very complicated or ambiguous. |
|||
16 Jul 2004, 04:14 |
|
comrade 16 Jul 2004, 15:56
format com is a nice idea, but would be unusual
|
|||
16 Jul 2004, 15:56 |
|
mike.dld 17 Jul 2004, 05:49
My suggestion is to add another one directive to header
Let it look like this one (for Windows): Code: format PE GUI 4.0 with '.bin' Of course it would be an optional parameter |
|||
17 Jul 2004, 05:49 |
|
vid 17 Jul 2004, 09:35
i agree more with mike than with others, but remember we are talking about *QUESSING* filename extension, so it can be (or should) be heuristical. Don't you think it will be confusing to see some .COM files with "format COM" and some without? Also, would you like to add another format for every case when someone might want another extension, like "MZSYS" or "PECPL"? Also it won't be precise - that wouldn't be another formats, format will be still binary regrdless if it's data file or .COM file, that would be hint to quess desired extension, and so it would be confusing what "format" is what real format etc.
Mike's idea is better, but i think having another keyword to QUESS filename extension (which should be extreme case, when you CAN'T specify it in command line) doesn't look so good to me. If some heuristic scanning of source code will be possible, then i think it will be best solution. |
|||
17 Jul 2004, 09:35 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.