Uploaded June 2024 | Updated December 2026, 3 hours ago
What is the smallest possible EXE that can be run on the Windows Operating System? What about the largest possible EXE? What even is an EXE file? On Windows, EXE files use the Portable Executable file format, which contains the program's code, data, and references to other libraries that can be loaded and run by the OS. It is often referred to as an "Image", the captured state of the program in a form ready to be run by the system.
After testing it was found that the smallest EXE on 64-bit Windows is 268 bytes. This is a system limitation and not a limit with the Portable Executable file format itself. The smallest EXE runnable by other versions of Windows are as follows:
Windows XP: 97 bytes
Windows 2000: 133 bytes
Windows Vista/7 (32-bit): 252 bytes
Windows 7/10/11 (64-bit): 268 bytes
The largest EXE possible is 1,996,488,704 bytes. Again, this size is a limitation with Windows.
GitHub project containing 268 byte EXE, world's smallest game, and world's smallest piano:
github.com/InkboxSoftware/smallEXE
About the PE file format:
PE file format: learn.microsoft.com/en-us/windows/win32/debug/pe-format
PE file diagram: github.com/corkami/pics/blob/master/binary/pe101/README.md
Making Small EXE:
Original research into smallest possible EXE: https://archive.is/w01DO
World's Smallest Windows App (Dave's Garage): youtube.com/watch?v=-Vw-ONPfaFk
Tiny PE on Windows 10 (x64): github.com/ayaka14732/TinyPE-on-Win10
More on the 268 byte limit: gist.github.com/kajott/063dfce6a94da03a379553b3db6be334
Refined MattKC snake: github.com/EimaMei/snake-qr
Low Level Programming:
Kernel32 functions: geoffchappell.com/studies/windows/win32/kernel32/api/index.htm
Windows Virtual Terminal Sequences: learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
MSVC Linker options: learn.microsoft.com/en-us/cpp/build/reference/linker-options?view=msvc-170&viewFallbackFrom=vs-2019
What is the largest EXE: superuser.com/questions/667593/is-it-possible-to-run-a-larger-than-4gb-exe
This video is sponsored by Brilliant
What is the smallest possible EXE that can be run on the Windows Operating System? What about the largest possible EXE? What even is an EXE file? On Windows, EXE files use the Portable Executable file format, which contains the program's code, data, and references to other libraries that can be loaded and run by the OS. It is often referred to as an "Image", the captured state of the program in a form ready to be run by the system.
After testing it was found that the smallest EXE on 64-bit Windows is 268 bytes. This is a system limitation and not a limit with the Portable Executable file format itself. The smallest EXE runnable by other versions of Windows are as follows:
Windows XP: 97 bytes
Windows 2000: 133 bytes
Windows Vista/7 (32-bit): 252 bytes
Windows 7/10/11 (64-bit): 268 bytes
The largest EXE possible is 1,996,488,704 bytes. Again, this size is a limitation with Windows.
GitHub project containing 268 byte EXE, world's smallest game, and world's smallest piano:
github.com/InkboxSoftware/smallEXE
About the PE file format:
PE file format: learn.microsoft.com/en-us/windows/win32/debug/pe-format
PE file diagram: github.com/corkami/pics/blob/master/binary/pe101/README.md
Making Small EXE:
Original research into smallest possible EXE: https://archive.is/w01DO
World's Smallest Windows App (Dave's Garage): youtube.com/watch?v=-Vw-ONPfaFk
Tiny PE on Windows 10 (x64): github.com/ayaka14732/TinyPE-on-Win10
More on the 268 byte limit: gist.github.com/kajott/063dfce6a94da03a379553b3db6be334
Refined MattKC snake: github.com/EimaMei/snake-qr
Low Level Programming:
Kernel32 functions: geoffchappell.com/studies/windows/win32/kernel32/api/index.htm
Windows Virtual Terminal Sequences: learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
MSVC Linker options: learn.microsoft.com/en-us/cpp/build/reference/linker-options?view=msvc-170&viewFallbackFrom=vs-2019
What is the largest EXE: superuser.com/questions/667593/is-it-possible-to-run-a-larger-than-4gb-exe
This video is sponsored by Brilliant










![Programming the Apple II - Everything you need to know
This is a beginners guide to getting started with programming the Apple II. This tutorial covers what you need to do to set up the proper environment (both physical and emulated) and what resources to look at for further programming in either BASIC or Assembly specifically for this computer.
Apple II reference manual: http://www.applelogic.org/files/AIIREF.pdf
Emulators:
Windows: AppleWin
https://github.com/AppleWin/AppleWin
Linux: LinApple
http://linapple.sourceforge.net/index.html
Mac: Virtual ][
https://virtualii.com/
Javascript Online Version:
https://www.scullinsteel.com/apple2/
BASIC Programming
Watchable guides:
Kurt Leucht - https://www.youtube.com/watch?v=1AiUPVIPd0Y&ab_channel=KurtLeucht
Hobby Programming - https://www.youtube.com/watch?v=DB04XVOIx98&ab_channel=Hobby.Programming
Readable guides:
Apple II BASIC Reference Manual PDF - https://tinyurl.com/p25z8jkc
BASIC reference guide - https://www.calormen.com/jsbasic/reference.html
Tutorial for beginners - http://www.hoist-point.com/applesoft_basic_tutorial.htm
Assembly Programming:
Assembler Software:
EDASM DOS - https://mirrors.apple2.org.za/ftp.apple.asimov.net/images/programming/assembler/DOSToolkit.dsk
EDASM PRODOS - https://mirrors.apple2.org.za/ftp.apple.asimov.net/images/programming/assembler/ProDos-Editor-Assembler-Release-1.0.1%20%2815-JAN-84%29.dsk
MERLIN ASSEMBLER - https://mirrors.apple2.org.za/ftp.apple.asimov.net/images/programming/assembler/merlin/
Watchable guides
Advanced 6502 Assembly - https://www.youtube.com/watch?v=WEliEAc3ZyA
With the Merlin Assembler - https://www.youtube.com/watch?v=GG6tfYyzzbM&ab_channel=PJGCreationsLtd-ITConsultant
Readable guides
Apple 6502 Assembler/Editor - https://archive.org/details/apple-6502-assembler-editor
Using 6502 Assembly Language - https://archive.org/details/Using_6502_Assembly_Language
(This guide has a very helpful chart of useful subroutines in Appendix A)
High Res Graphics Guide - https://archive.org/details/Hi-ResGraphicsAndAnimationUsingAssemblyLanguage
Another Useful Graphics Guide - https://www.chibiakumas.com/6502/appleii.php
https://archive.org/details/Assembly_Cookbook_for_the_Apple_II_part_1
https://archive.org/details/Assembly_Cookbook_for_the_Apple_II_part_2
C2T
https://github.com/datajerk/c2t
Use in the bin file of this project:
c2t-96h -n8 DISKNAME.DSK AIFFILENAME.aif
The .DSK file here is located in that same bin file, as will be the output, so you can adjust your path as needed
00:00 Getting an Apple II
01:20 Programming in BASIC
02:10 Programming in Assembly
03:40 A few more tips
04:22 Graphics Mode
06:07 Copying Digital Disk to Physical Programming the Apple II - Everything you need to know](https://i.ytimg.com/vi/I9gexDyrnHU/mqdefault.jpg)