flat assembler
Message board for the users of flat assembler.

Index > DOS > Batch file to COM/EXE

Author
Thread Post new topic Reply to topic
me239



Joined: 06 Jan 2011
Posts: 200
me239 24 Feb 2011, 23:19
Hello, I recently came across a neat little program that I would like to share called "Batchcom". Batchcom is a converter for batch files that turns average to complicated batch files into COM files. The folder also has a com2exe converter as well. It also had a COM compressor, but I couldn't get it to compress anything. Oh and also, it supports it's own syntax like frames and windows.


Description: Batchcom with sample files
Download
Filename: pcom.zip
Filesize: 68.93 KB
Downloaded: 449 Time(s)

Post 24 Feb 2011, 23:19
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 24 Feb 2011, 23:34
me239 wrote:
Batchcom is a converter for batch files that turns average to complicated batch files into COM files

This one has been rotting on my disk for the past decade or so.


Description:
Download
Filename: bat2ex_1.5.zip
Filesize: 36.34 KB
Downloaded: 430 Time(s)

Post 24 Feb 2011, 23:34
View user's profile Send private message Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 25 Feb 2011, 00:43
why would i want to convert batch to com/exe?

I use batch for compiling and testing, it would be painfull to do that from exe.
Post 25 Feb 2011, 00:43
View user's profile Send private message Reply with quote
me239



Joined: 06 Jan 2011
Posts: 200
me239 25 Feb 2011, 04:31
b1528932 wrote:
why would i want to convert batch to com/exe?

I use batch for compiling and testing, it would be painfull to do that from exe.
Why? It's the same thing as a batch file, but it runs natively and faster.
Post 25 Feb 2011, 04:31
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 25 Feb 2011, 05:30
Run a batch file, at least you can see what the commands are.
Run an exe and you take a chance...

I also can't see how you would notice any sort of speed difference nowadays. Maybe in the days of DOS3 running from a floppy?

hello.bat=30 bytes, hello.exe=1243. Bloat? Smile
Post 25 Feb 2011, 05:30
View user's profile Send private message Reply with quote
me239



Joined: 06 Jan 2011
Posts: 200
me239 25 Feb 2011, 05:55
sinsi wrote:
Run a batch file, at least you can see what the commands are.
Run an exe and you take a chance...

I also can't see how you would notice any sort of speed difference nowadays. Maybe in the days of DOS3 running from a floppy?

hello.bat=30 bytes, hello.exe=1243. Bloat? Smile
That's true; however, in the long run, when batch file get up into the 40k-80k area, converting into a executable is far better. Also why would you want people to see what commands are being run if you're releasing a commercial program?
EDIT: Just compiled and compressed the OpenGEM startup batch file. Old size = 4578 New size = 3270.
Post 25 Feb 2011, 05:55
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 25 Feb 2011, 06:15
40KB batch file? Wow, what a pig to maintain. I would be splitting it into smaller batch files and using call.

Using hello.bat as an example was a bit extreme, the more commands in a batch file the more efficient a compiled exe would be.

Did that startup batch file have lots of blank lines and/or comments?
Quite a few batch files are 'bloated' with that stuff.
Post 25 Feb 2011, 06:15
View user's profile Send private message Reply with quote
me239



Joined: 06 Jan 2011
Posts: 200
me239 25 Feb 2011, 06:25
sinsi wrote:
40KB batch file? Wow, what a pig to maintain. I would be splitting it into smaller batch files and using call.

Using hello.bat as an example was a bit extreme, the more commands in a batch file the more efficient a compiled exe would be.

Did that startup batch file have lots of blank lines and/or comments?
Quite a few batch files are 'bloated' with that stuff.
about 4 or so blank lines and maybe 8 rem, but only 7-10 words. Less than a kilobyte.
Post 25 Feb 2011, 06:25
View user's profile Send private message Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 25 Feb 2011, 15:27
Quote:
Also why would you want people to see what commands are being run if you're releasing a commercial program?

Commercial? With this? Are you fucking kidding me?


Quote:
however, in the long run

batch isnt for long run. its to replace something like this:
Code:
@echo off
:a
type conin$ > nul
fasm x86\main.asm boot.img
if %errorlevel% neq 0 goto a
"%ProgramFiles(x86)%\Bochs-2.4.5\bochs" -f "bochsrc.bxrc" -q
goto a    


I dont thnik its a big deal to do bat to exe.
All you need is CreateProcess, WriteFile, GetLastError, CreatePipe and compare operator. I odnt know batch that well, but i dont think it has some complicated syntax. Just creating processes, loop and if.
Post 25 Feb 2011, 15:27
View user's profile Send private message Reply with quote
Fanael



Joined: 03 Jul 2009
Posts: 168
Fanael 25 Feb 2011, 17:32
b1528932 wrote:
All you need is CreateProcess, WriteFile, GetLastError, CreatePipe and compare operator.
In DOS?
Post 25 Feb 2011, 17:32
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.