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, 15.07.2014, 19:30

> -O3 won't do much on a program that only contains one statement
> (writeln('hello world');)
>
> This is very true. This is why I changed the target to a GREP utility.
> These programs have a definite use.
>
> I was just trying to find out about FP when the very next post criticized
> my floppy drive.

A few years ago, I got the crazy idea to cram DJGPP on a 1.44 MB floppy. Of course it won't actually fit, so you have to compress it. What do you use? I originally used UHarc (needing 24 MB to unpack, and very slow), then later migrated to 7-Zip (and tiny 7zdecode, needing only roughly 6 MB to unpack, plus much faster). However, the "newest" DJGPP I could cram on there was 2.95.3 and BinUtils 2.16.1 with DJGPP libc 2.03p2 and a few other tools (make, ar, ed, rm). I couldn't fit strip, but "ld -s" does the same thing. Also, including "ed" was more or less my attempt at providing both text editor plus grep plus sed all-in-one.

I ended up recompiling some stuff (IIRC, with GCC 4.2.3) for smaller size since usually they don't use "-Os" but prefer "-O2". Anyways, for comparison, stock GCC2953B.ZIP's CC1.EXE was 1,621,504 bytes where my recompile was 1,388,032. GCC 3.4.4's CC1.EXE (2.03p2?) was 4,212,224. Latest (2.04 /beta/ only) GCC 4.9.0's CC1.EXE is 15,596,544.

But keep in mind that latest 4.x does a lot more than 2.x or even 3.x ever did. I can already hear Marco saying, "15 MB is peanuts." Honestly, the real problem for a tool like that isn't disk footprint, nor even speed, but RAM usage. It uses much much more than 15 MB of RAM, optimizations or not, for data, not its own measly footprint. But even for its footprint, in theory, the DPMI host could demand page in the .EXE. Unfortunately, most (e.g. CWSDPMI) don't do that and just load the whole thing in one lump.

And BTW, nobody ever told me that wasting time on such a "EZ-GCC 2" was worth doing. I'm not sure 99% ever even tried it. That was back starting in 2009. Obviously people these days are even less sympathetic towards floppies! That GCC is "too old" for most projects. Nobody wants vanilla standard minimal console stuff: they want GUIs, networking, threads, you know ... all the non-portable flashy stuff. I just figured easing deployment of a minimal DJGPP would make it easier to bring the toolset to old computers. (Unfortunately, a 486 is too slow for such a version, -O0 was 2x or 4x slower than 2.7.2.1 "-O2"! But at least you can fit all of it on a small RAM disk, which combined with a software cache will speed up compiles tremendously.)

 

Complete thread:

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