EXE sizes
EXE sizes
If I write a "hello world" program for DOS, about how many bytes would the executable be?
67
67
Re: EXE sizes
It's about 92672 bytes.
If you want a dos compiler that build small executables, try this one:
http://exmortis.narod.ru/comp_bas/mbc320.zip
If you want a dos compiler that build small executables, try this one:
http://exmortis.narod.ru/comp_bas/mbc320.zip
Re: EXE sizes
It shouldn't take more than say 2kb to perform that functionality.
What on earth are those extra bytes doing?
Would it follow then that something like a "grep" would not fit on a floppy?
67
What on earth are those extra bytes doing?
Would it follow then that something like a "grep" would not fit on a floppy?
67
Re: EXE sizes
Who cares about floppies nowadays?
Re: EXE sizes
OK sir.
Hard disks and\ ssd's are still in use.
They will fill up 50x faster.
If someone were to write an OS in freebasic, blah blah.
67
Hard disks and\ ssd's are still in use.
They will fill up 50x faster.
If someone were to write an OS in freebasic, blah blah.
67
Re: EXE sizes
Here are the fundamental issues:
1. Due to the way FB is designed, you get much more than you asked for - dynamic string support (Printing a string afterall), file I/O support (Printing is a kind of file I/O internally), console output layout/scrolling functions (code shared by Print, Locate, Color, Cls, etc.), or even just code that turns of the blinking cursor or support for exepath() (but not the exepath() function itself).
2. FB is based on DJGPP - anything the FB runtime does ultimately ends up as calls to DJGPP's libc.a which itself adds a lot of code/data. All that is statically linked. There can be unused functions pulled in from DJGPP's C++ support etc., even though with FB it usually ends up unused, due to the way DJGPP is designed.
further reading (for example):
http://freebasic.net/forum/viewtopic.php?t=11757
Besides that there also are cases of bloat that is "trivially" avoidable - it's just a question of how much work is put into FB development and the making of the FB release builds:
3. (Really) unnecessary code in the FB runtime (that potentially pulls in more unnecessary code from DJGPP) - for example, there is an unnecessary call to setlocale() in FB-0.90.1, which (due to all the DJGPP dependencies it pulls in) accounts for 40KB out of 160KB total in a hello world.
4. Exception handling tables generated by GCC (depending on toolchain configuration) in FB's and DJGPP's libraries (in a hello world with FB-0.90.1-dos it's 25KB out of 160KB total)
You can check what exactly is linked into an .exe yourself by looking at the link map generated by the GNU linker (ld). With fbc this can be done by using the -map <file> command line option:
1. Due to the way FB is designed, you get much more than you asked for - dynamic string support (Printing a string afterall), file I/O support (Printing is a kind of file I/O internally), console output layout/scrolling functions (code shared by Print, Locate, Color, Cls, etc.), or even just code that turns of the blinking cursor or support for exepath() (but not the exepath() function itself).
2. FB is based on DJGPP - anything the FB runtime does ultimately ends up as calls to DJGPP's libc.a which itself adds a lot of code/data. All that is statically linked. There can be unused functions pulled in from DJGPP's C++ support etc., even though with FB it usually ends up unused, due to the way DJGPP is designed.
further reading (for example):
http://freebasic.net/forum/viewtopic.php?t=11757
Besides that there also are cases of bloat that is "trivially" avoidable - it's just a question of how much work is put into FB development and the making of the FB release builds:
3. (Really) unnecessary code in the FB runtime (that potentially pulls in more unnecessary code from DJGPP) - for example, there is an unnecessary call to setlocale() in FB-0.90.1, which (due to all the DJGPP dependencies it pulls in) accounts for 40KB out of 160KB total in a hello world.
4. Exception handling tables generated by GCC (depending on toolchain configuration) in FB's and DJGPP's libraries (in a hello world with FB-0.90.1-dos it's 25KB out of 160KB total)
You can check what exactly is linked into an .exe yourself by looking at the link map generated by the GNU linker (ld). With fbc this can be done by using the -map <file> command line option:
After that, foo.txt should contain the information from ld.fbc myprogram.bas -map foo.txt
Re: EXE sizes
There is (used to be) a separate dead code eliminator program for TP302 and TP55 that worked
quite well. Hello World ended up being about 3kb. I don't thing anyone has to spend time on
redesign but a dead code eliminator and re-linker for FB would be nice.
SB
quite well. Hello World ended up being about 3kb. I don't thing anyone has to spend time on
redesign but a dead code eliminator and re-linker for FB would be nice.
SB
Re: EXE sizes
Print "hello word"
under ASIC 5.00 => file.exe = 912 bytes !
under ASIC 5.00 => file.exe = 912 bytes !
Re: EXE sizes
Both are me. I asked the same question of both compilers. The answers were:
FB = 93kb
FP = 175kb
TP55 = 5kb for comparison.
The post on FP forum has deteriorated greatly.
67
FB = 93kb
FP = 175kb
TP55 = 5kb for comparison.
The post on FP forum has deteriorated greatly.
67
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: EXE sizes
Hello!6ar453v3n wrote:67
Please what means "67" ?
-
- Posts: 139
- Joined: May 28, 2009 20:07
Re: EXE sizes
maybe.. this can helpPlease what means "67" ?
http://www.robertecker.com/hp/research/ ... hp?lang=en
type in "6ar453v3n" and translate it :)
Mutton
Re: EXE sizes
Currently the FP thread is at 16,528 bytes. (cheating, using the development snapshot of the 16-bit compiler)6ar453v3n wrote: FB = 93kb
FP = 175kb
Re: EXE sizes
67 is from a Star Trek episode. There is a major character named Gary Seven. I used an ascii translation as follows:
b=8
e=3
g=6
I=1
l=7
o=0
p=9
s=5
y=4
z=2
As these number letter pairs look similar.
So my handle is Gary Seven.
g=6
However I deviated and used
Seven=7
67
b=8
e=3
g=6
I=1
l=7
o=0
p=9
s=5
y=4
z=2
As these number letter pairs look similar.
So my handle is Gary Seven.
g=6
However I deviated and used
Seven=7
67
-
- Posts: 1007
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: EXE sizes
@6ar453v3n
Thank you for your answer.
Thank you for your answer.