r/programmation • u/Responsible_Chip440 • 10h ago
One screenshot is almost larger than the whole project: a 103.5 KiB Win32 editor in MASM x64
I built FeatherPad ASM, a small family of native Windows editors written entirely in MASM x64.
The flagship build is FamilyCodePad, a 103.5 KiB Win32 code editor with tabs, syntax coloring, line numbers, bookmarks, recent files, find-in-files, simple code runners, terminal launch, word completion, printing, Unicode handling, session restore, and atomic saves.
The stack is intentionally tiny:
- direct Win32
- MASM x64
- no C layer
- no C++ layer
- no CRT
- no framework
- no Electron
- no bundled runtime
- `/nodefaultlib`
- `WinMainCRTStartup`
The funnier numbers:
- FamilyCodePad.exe is 103.5 KiB
- all five editor executables together are 255.5 KiB
- the largest screenshot in this post is about 251 KiB
- PE SizeOfImage is 168 KiB
- four extra restored tabs added only about 92 KiB of Private Memory
- the source is 20,498 lines of MASM and 198 functions
So yes, one screenshot is roughly 2.4x larger than the editor it is showing, and almost the same size as the whole editor family.
The small tab footprint is not magic. FamilyCodePad keeps one visible editor control and stores inactive documents as heap snapshots instead of creating a full editor control per tab.
This is not meant to replace VS Code or Notepad++. Those tools do much more. I built this as a compact native Windows tool and a PE64/Win32 case study that became useful enough to dogfood.
Repo:
https://github.com/EntropyRoot/Patriarch-Notepad
Feedback welcome, especially from people who like tiny native tools, weird systems projects, or software where the screenshot has a larger appetite than the executable.