Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

FreeBasic and FreePascal (Developers)

posted by Rugxulo(R) Homepage, Usono, 04.07.2014, 05:55

> On each of these forums I asked what the size of the
> "hello world" program would be.
>
> FB= 93k
> FP= 170k

1). FreeBASIC is a native compiler that can compile itself (to assembly) and linked with its own RTL (C?) and libc (here, from DJGPP). AFAIK, there are no real size optimizations, outside of "strip" (remove debugging info). The COFF linker doesn't delete unused code, so everything has to be manually massaged and put into the library, which was never a priority for anybody involved in DJGPP.

EDIT: I almost forgot, FreeBASIC supports several dialects. Even for my really simple and silly Befunge interpreter, I found that my "qb" code was 45 kb larger than the similar "fblite" .EXE. So if you can live with the dialect differences, switching to that (or even "fb") might help.

2). FreePascal also compiles itself but has its own homegrown RTL and units which don't need a C library at all. Here I'm sure that it can be much much smaller. Try smartlinking etc. (-CX -XX -Xs -O3). Smartlinking is not default because it is much slower to compile, which is a "bad thing" for quick development.

3). If none of that is good enough, try UPX: upx --best --lzma --all-filters

> I am about to end my partition in these forums
> but there are beginning to be some outlandish
> (maybe too strong) comments if anyone cares to
> take a peek. I have asked for explinations (sp)
> none have been posted yet.

I don't have even the slightest clue what you're referring to. But the Internet is full of all types of cranks (ahem, comments on every YouTube video ever), so it's probably just normal everyday angst. Don't sweat the small stuff.

 

Complete thread:

Back to the forum
Board view  Mix view
15192 Postings in 1365 Threads, 250 registered users, 18 users online (0 registered, 18 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum