How do demomens reach ultra small files?

When I watch demo scenes on YouTube, the author often brags about how their files are 64 KB or less, but only 4 KB. When I compile even a very simple C ++ program, the executable is always at least 90 kb or so. Are these demos fully written in the meeting? it was my understanding that demokamers used c / C ++.

+3
source share
5 answers

These demos do not use the standard library (not C ++ or even the standard C library), and they are not related to standard libraries (to avoid import table sizes). They dynamically bind only the necessary absolute minimum.
The demonstration "main function" is usually identical to the entry point (unlike a regular program, where the entry point is the CRT initialization function, which performs some configuration on a specific OS, initializes global variables, starts constructors, and ultimately calls main).

( ) exe-packer. , "" , "" , .

, , .

+7

(64- Ctrl-Alt-Test). 64k- ++ (: Logicoma Rust). 4k intros ( ++), 64- .

:

64 . ? .

? IQ.

, :

  • , . ( kB).
  • inlining ( 2kB).
  • fastcall ( 0.7kB).
  • . .
  • , .
  • , .

4k ++ . .

+3

- , . /io .. .

+2

, 50 , .

- , Microsoft Visual C/++ 4.0, .exe , Microsoft Visual Studio 2005.

+1

, , , , .

+1
source

All Articles