3 ms·
The classic resource for this (does the same sort of tricks, taken to an extreme: code overlaid with tables, tables overlaid with other tables, etc.): http://w
by drv 15y ago
The classic resource for this (does the same sort of tricks, taken to an extreme: code overlaid with tables, tables overlaid with other tables, etc.):
http://www.muppetlabs.com/~breadbox/software/tiny/ http://www.muppetlabs.com/~breadbox/software/tiny/
(62-byte hello world among other things)
- linhat 15y agohow about 45 bytes... http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm...
- drv 15y agoIndeed, except that one doesn't print "Hello world". :)
- linhat 15y agoOh, right, you got me, I totally didn't remember that, only the fact, that it was really small and I dug the fact that he put it inside the header.
- iseyler 15y agoHow about 31 bytes? http://www.returninfinity.com/baremetal-helloworld.html http://www.returninfinity.com/baremetal-helloworld.html Why use ELF or Linux? Flat binaries (and a custom OS) to the rescue! :)
- breadbox 15y agoMany years ago I used to have a 58-byte version, but around the time that x86-64 was being developed, Linux started examining (and thus validating) a couple more fields in the ELF header. It's really a shame, because the corner-cutting in the 62-byte version isn't nearly as impressive (in my own opinion).