flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > usage: fasm source [output]

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 17 Jul 2004, 14:03
I fully agree with vid's point of view.
Post 17 Jul 2004, 14:03
View user's profile Send private message Visit poster's website Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 17 Jul 2004, 15:49
I don't wanted to invent new formats... Is it possible (of course it's possible) to allow to use directive below? Arrow
Code:
format with '.bin'    

this kind of directive also has its own sense IMHO
Post 17 Jul 2004, 15:49
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 17 Jul 2004, 16:19
Yeah, such directive would help to get an exact output that was desired.
Post 17 Jul 2004, 16:19
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 17 Jul 2004, 16:21
Quote:

this kind of directive also has its own sense

But this sense is a bit ambiguous. What when someone specified both "with" setting and output file name from command line?
Post 17 Jul 2004, 16:21
View user's profile Send private message Visit poster's website Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 17 Jul 2004, 16:25
Well, in this case you may do as follows: if 'with' not specified - then 'output' is obligatory, otherwise 'with' overrides 'output'
Post 17 Jul 2004, 16:25
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8357
Location: Kraków, Poland
Tomasz Grysztar 17 Jul 2004, 17:29
In my opinion in no case 'output' should be overridden.
Post 17 Jul 2004, 17:29
View user's profile Send private message Visit poster's website Reply with quote
S.T.A.S.



Joined: 09 Jan 2004
Posts: 173
Location: Ru#27
S.T.A.S. 17 Jul 2004, 17:58
I agree with Privalov
Why will one specify output extension if "format with '.bin'" is already present?
IMHO, to specially override formatter directuive Smile
Why else type extra symbols Confused

As I understand pelaillo's idea, this feature should be used to make things easier in general cases, so format-PE.asm file will become .EXE with a doubleclick from explorer.
If one wants .OCX or .SPECIAL there's no problem to compile source in current manner - anyway we are doing that now Wink
Post 17 Jul 2004, 17:58
View user's profile Send private message Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 17 Jul 2004, 19:35
Maybe vice versa? If 'output' specified - it overrides 'with'...
Post 17 Jul 2004, 19:35
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 17 Jul 2004, 21:44
mike: this will be another confusing thing about compiler, which is wanted to be as simple as possible.
Wouldn't it be interesting if "fasm a.asm a.bin" will create "a.out" file? (because "out" will be specified with "with" operator).
Also, what if "with" nor "output" is specified? Quessing, just like it would be without "with". I think my way (if possible) is most simple, altough not so general, but this isn't feature which will be used by so many people (i think).
Post 17 Jul 2004, 21:44
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
mike.dld



Joined: 03 Oct 2003
Posts: 235
Location: Belarus, Minsk
mike.dld 17 Jul 2004, 22:17
Look, now 'output' isn't optional, right? You may continue to use it but someday I'll make it optional and suggest you: use 'output' or use 'with' or use both, but one of them MUST present, otherwise compiler will raise an error saying "output not specified" (of course, if it can't GUESS an appropriate extension). And, of course, it will be backward compatible (as scientica noticed above) 'cause noone canceled 'output'. What you'll do?

Current guessing mechanism suits me, but I'm working in Windows and extensions I need are only '.exe', '.dll' & '.com'. I don't need '.obj' & others for now. Also, I'm working in MenuetOS with ported FASM outputting Menuet executables without extension. But if I want to write some Menuet app in Windows I need to rename for example 'mfar.com' to 'mfar'. I think it would be more convenient to add format with '' line once and easily code MFAR without mentioned inconvenience.

Regards, Mike.


Last edited by mike.dld on 17 Jul 2004, 22:32; edited 1 time in total
Post 17 Jul 2004, 22:17
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica 17 Jul 2004, 22:21
why not just:
/format [.]* append '.ext'/
or in words:
Code:
format append 'text'    


which simply appends the string to the file, and it overrides the the ".exe" for PE. And for com files:
Code:
format append '.com'
org 100h    

and for flat files:
Code:
    

(yup nothing Smile - or "format '.whatever' if you want a input.whatever;))

or if the "format com" is better then, the "org 100h" is automatically assumed at start of file - thus there would be two ways to make .com's, just like PE's one "convenient" and one "raw" (thouhg the "raw" means just one more line for com Smile) - this would strip some confustion with some .com having "format com" and not - and it would be backwards compatible (IMO _importat_ ) - old code will still compile the same! Very Happy
Post 17 Jul 2004, 22:21
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:  
Goto page Previous  1, 2

< 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.