Smallest Windows app ever: 383 bytes in pure assembly

HelloAssembly The smallest possible complete Windows application

Smallest Windows app ever: 383 bytes in pure assembly

Dave's Garage and PlummersSoftwareLLC present the tiniest complete Windows application, written in x86 assembly. The repo offers several versions, from a 1,104-byte MASM32 build to a 383-byte Yasm one, each with a working message loop, title bar, and system menu. It also warns that aggressive size optimizations may trigger antivirus false positives.

The optimizations embedded in the current code in the Lasse directory, and those applied by Crinkler in general (if used) are rather aggressive, and seem to resemble strategies applied by certain types of malware.
  1. rfgplk

    "smallest possible" is exactly one instruction; possibly 0xc3 [ret] or 0x90 [nop]; the problem lies in how you define "complete Windows application", because the answer really differs depending on if you want to make it ABI compliant. But there's nothing preventing you from creating a custom loader/executor that reads a pure binary file, maps it as exec and runs it.

  2. abcd_f

    The smallest meaningful program for MS-DOS was exactly 2 bytes:

    FA F4

    That's CLI HLT, which effectively deadlocked the machine. Had to be saved as a .com fule obviously, not as an .exe.

  3. ggerules

    Windows and assembly is a fun topic!

    Putting the search terms "Windows" and "assembly language" turns up all sort of books. The one that got me to initially explore the topic (from 1993).... [0]

    For a more up to date treatment of assembly and windows.... comes with source code for the IDE also. Ray Seyfarth's book [1].

    [0] Windows Assembly Language & Systems Programming: Object Oriented & Low-Level Systems Programming in Assembly Language for Windows 3.X

    [1] Introduction to 64 Bit Windows Assembly Language Programming: Fourth Edition

    ISBN-13: 978-1543138849, ISBN-10: 1543138845

  4. delta_p_delta_x

    Interesting to bypass CRT and work directly against the Windows API. That said, these rely on USER.32.DLL and KERNEL32.DLL to do the majority of the heavy lifting.

    It's a bit like 'smallest hello world in assembly' but the code is just setting up the calling convention and then passing the zero-terminated character string into `write`. Cool, but that could be done a bit more straightforwardly in C, too. A lot of assembly (including in the linked repository) is book-keeping for the platform's calling convention.

  5. haunter

    Meanwhile in the Unix world you can go as low as 45 bytes https://www.muppetlabs.com/~breadbox/software/tiny/teensy.ht...

More from this day

2026-08-25