flat assembler
Message board for the users of flat assembler.

Index > DOS > %~n1 under DOS and WIN98

Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4352
Location: Now
edfed 07 Oct 2010, 00:11
under XP, this batch file works for a run command, and it is very cool:

Code:
fasm %1
%~n1
    

then, it becomes possible to have the item "run" in contextual menu for asm files.
Image
but under win98, i don't find how to do the same thing within a batch file.

maybe it can be possible to return the output file from fasm as %2 (or something), and then, just call %2, but it doesn't work...
Post 07 Oct 2010, 00:11
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20422
Location: In your JS exploiting you and your system
revolution 07 Oct 2010, 02:17
Write a small proggy to do it.
Code:
fasm %1
MyUberExtensionStripperAndRunner %1    
Post 07 Oct 2010, 02:17
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4060
Location: vpcmpistri
bitRAKE 07 Oct 2010, 04:23
Does Win98 do nothing?

This might work?
Code:
fasm %1.asm
%1    
Call batch without the extension.
Post 07 Oct 2010, 04:23
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20422
Location: In your JS exploiting you and your system
revolution 07 Oct 2010, 04:30
bitRAKE: Context menus in Explorer always pass the whole filename, including the extension. So you end up with:
Code:
fasm FASMW.ASM.asm
FASMW.ASM    
edfed: You might want to consider using double quotes around the parameter in the "run" command setting:
Code:
AsmRun.bat "%1"    
Post 07 Oct 2010, 04:30
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4352
Location: Now
edfed 07 Oct 2010, 12:05
revolution wrote:
Write a small proggy to do it.
Code:
fasm %1
MyUberExtensionStripperAndRunner %1    

that's what i first planned to do.

but the ideal would be to have the parameter -R (run) in fasm itself.
then:

Code:
fasm %1 -R
    

and it will be ok for any windows, linux or else fasm version... Very Happy

about quotes, the shell puts them automatically, don't you see that in the screen shot?
Post 07 Oct 2010, 12:05
View user's profile Send private message Visit poster's website Reply with quote
SFeLi



Joined: 03 Nov 2004
Posts: 138
SFeLi 07 Oct 2010, 13:01
fasm "%1" ~tmp.exe
start /w ~tmp.exe
del ~tmp.exe
Post 07 Oct 2010, 13:01
View user's profile Send private message 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.