Hi,

(I'm late to reply to this, sorry!!)

On Fri, May 5, 2017 at 12:33 PM, Andreas K. Foerster <a...@akfoerster.de> wrote:
>
> I have written a small "four in a row" game.
> Some may know this game under the name "connect four",
>
> It's small and not very exciting, but maybe you DOS-people
> find it usefull.

Useful? No. Entertaining? Yes.   :-)

> http://akfoerster.de/dl/akf-software/row4.zip
>
> Background:
>
> I'm always fascinated with small programs, small as can be.
> Then I came across Bruce's C compiler. I read it could cross-compile
> for DOS, but only up to 64kB.

I think it's "small" memory model (64 kb code + 64 kb data/stack) but
indeed limited to 64 kb .COM output.

> My first thought was that this is very
> small... But then I thought, wait a minute... my very first computer
> only had 16kB of RAM. At that time 64kB wasn't considered small at all!

64 kb is indeed a lot of code ... but only in assembly. HLLs tend to
bloat up a lot more (esp. due to "dumb" linkers or big and complicated
functions like printf).

> So, I started a journey to explore, what I could do with such an
> "enormous memory"...
>
> You should never judge a program by the size of the binary.

Alignment also wastes a ton these days. People will tolerate huge
binaries in the vain hope of more speed. (UPX, FTW!)

> In fact in the beginnig this program was actually larger with less
> functionality, until I started to optimize it.

I don't know Forth, but I think it's the king of small code. There are
some insanely talented Forth developers, but indeed a lot of it is
very arcane and hard to use. Still, they seem to know all the tricks
in the book. They excel at cramming everything into one small
"kernel".

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to