Skip to content
0:00 / 0:00

#assembly#x86#masm

Hello, Assembly! Retrocoding the World's Smallest Windows App in x86 ASM

Dave's Garage

1.1M subscribers • 14 videos on Hallway

YouTube
  • Recommended by 3 people: 3 in engineering communities.
  • A classic. People kept recommending it from 2021 to 2026.
  • Presented by Dave Plummer, former Microsoft operating systems engineer

Intermediate. Assumes working knowledge.

515K views5 years ago3 recommendations

Systems programmingProgramming languagesOperating systemsRetro computingPerformance and optimization

Dave Plummer demonstrates how to write and assemble a minimal Windows application using x86 assembly language and MASM.

Dave builds the World's Smallest Windows application live in x86 assembly using only a text editor and the command line to assemble the program using the Microsoft MASM assembler. Whether you're a professional programmer or just curious about how assembly language works, what makes it different from machine language, and why it can be faster and smaller than C you won't want to miss it! Take your Windows Programming to the next level. Or the previous level, depending on how you look at it! Link to Mug: daves-garage-store.creator-spring.com/listing/new-dave-s-gar… Link to Code: pastebin.com/Pmvr4r1S Thanks in part to a suggestion by 'SonicMouse' that I merge linker sections, the current binary size is 1488 bytes... and yes, it runs exactly the same. Start Assembly Language vs Machine Language Machine Language Monitors Hello, Windows! Dave's Garage Mug Task Manager Enamel Pins Editor Sequence Start Includes, Libs, Constants, Data Main Entry ShowWindow WinMain WindowClass WndProc Command Line Running the App Closing Thoughts Environment: Windows 10 2H02, MacOS 11.2.2 GNU Nano Editor Microsoft MASM SDK PS: For anyone keeping score, two things are certain: (a) it can always be smaller, and I'm down to 1488 bytes now, and (b) Steve Gibson has likely forgotten as much about x86 assembly programming as I know :-). Thanks for the recent shoutout on the podcast! I realize you can make a much smaller app by simply calling MessageBox, but that's why I outlined what I deem to be the "minimum functionality". SonicMouse has come the closest so far at 1776!

Why it's here

3 people recommend this

What people say. Recommended as a practical demonstration of writing a bare-metal Win32 application in assembly without the C runtime.

u/MehYamin r/programming • Recommends

On “Why did Windows 95 setup use three operating systems?”

Raymond Chen did this long-form interview on Dave's Garage, a good channel by an ex-Microsofter with a lot of geek lore and deep dives into things (e.g. let's write Hello World for Windows in assembly in Notepad)

u/pkrosin r/programming • Recommends

This video shows an example of doing this and more on windows 11 and using visual studio to build the code. And he has a follow up video doing the same thing in assembly. So yeah, win32 programming can still be done

u/ventuspilotin r/Compilers • Recommends

On “Executable runtime requirements on windows”

link to this video shows how to code a Windows hello world style program in assembly, no c runtime required. Maybe that will answer some of your questions.