Hello World !

You can say - we have seen thousands of another
"Hello World" programs. What's new and original here ?!?!

New is - this executable program has 157 bytes only.

But you can say again - we have seen thousands "Hello World"'s
even shorter than 157 bytes. One of the shortest can be written
in batch file with one line "echo Hello World" for 16 bytes !

Yes, you are right. There are many ways how we can write Hello World.
This version of Hello World is the native Win32 PE executable file.

------------------------------

This is not a serious intro. This is another attempt how to hack
the PE structures - headers, section table, import table and
of course the code to produce the EXE file as short as possible.

Program uses classic MessageBoxA for displaying the message.
The WinAPI "MessageBoxA" is resolved by name with using
classic import table. No hash or ordinals are used, so it
should be compatible with every 32 and 64-bit windows versions.

------------------------------

There was some attempts in past (I know about 233, 204 and 180 bytes)
but this is (maybe) first attempt what reaches length 157 bytes.

In this package, there are 3 executable files:

  HelloWorld-WinXP.exe ... 157 bytes version for older windows (tested on XP)
  HelloWorld-Win10.exe ... 268 bytes version for newer windows (tested on 10)
  HelloWorld-std.exe ..... 1kB version with correct headers and tables

The executable files for WinXP and Win10 are EXACTLY THE SAME,
the only difference is Win10 is padded by zeros to length 268 bytes.

Unfortunately, newer windows do not want to execute any files
shorter than 268 bytes (Why ?? I don't know) so padding is necessary.
But the file length 157 is enough to keep all headers, tables and code.

------------------------------

Created 30.01.2024 by Busy soft for LoveByte party.
Please feel free to write me at email: busy@128.sk

I hope this program will inspire you for creating next
ASAP (as-short-as-possible) Win32 programs or intros :)
