PDA

View Full Version : Making super-packed programs?



Nutshell
09-25-2002, 09:00 PM
HI,

I was wondering just how some people can pack so many things into a very small exe, for example 30kb? Here is a site that offers downloads of small exes which display some pretti good graphics:

http://www.farb-rausch.com/

Anyone have idea on how to do that?

^.^

crag2804
09-26-2002, 03:17 AM
They use really small font

Monster
09-26-2002, 03:38 AM
They use very large dll

Fordy
09-26-2002, 03:58 AM
There are exe compressors that allow you to do squeeze down the executable size...but from downloading one of the files...I see that they are using COM files...not true exe files...

With PE exe files, you have a DOS Stub.....then headers....then sections (these hold code, data, consts,relocation info,resources,debug info...etc)...also there's info for importing & exporting.......

With com files you have very little...the code and data exist in the same place (usually code first followed by data)...they always load at a certain point in memory ...you have no import/export tables......you have no seperate space for resources....... basically....er...pretty basic!...As you cant import dlls easily, your stuck in DOS mode, so that's why you dont see many of them these days (also M$ stopped officially supporting them years ago so they are really legacy stuff)

Me & ygf had a bit of a "smallest hello world" thing going once...he beat me.....but that's life....have a look here (http://www.cprogramming.com/cboard/showthread.php?s=&threadid=21892&highlight=small)

Nutshell
09-26-2002, 04:56 AM
Hey,

One more question. How did you get all those 0x65,0x6c,0x6c.....numbers? They are hex right? What do they contain ah?

Fordy
09-26-2002, 05:01 AM
>>One more question. How did you get all those 0x65,0x6c,0x6c.....numbers? They are hex right? What do they contain ah?

I cheated.....I wrote a COM program in MASM, ran it through Turbo Debugger and got the opcodes there......

There are variuos instructions (well..a few mov, lea and ints...and a ret in ygfs) and the various operands

You can look up the codes on the web, and most decent references tell you the opcodes for each instruction (like in the Intel IA32 Docs)

I assume ygf did the same as me (used a debugger).......if not, and he knows them from memory - then I fear him .....:eek: