Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Hello, binary!

This is a working Hello World program exe for Windows x64 manually written in binary. No, not assembly. No compiler, no assembler, no linker.

Of course I couldn't directly write the actual bits. Instead, I wrote the 0 and 1 characters into a text file and used a Python script to create a new .exe file and copy the 0s and 1s as actual bits.

Take a look at the text file! I added comments to not go fully insane, so maybe you can figure out what bits do what and change them!

Most of the file is just padding bytes and headers. The actual program code can be found on lines 136-150.
I had to learn the actual binary structure for x86-64 codes, and now I understand why people like RISC-V so much.
I also had to manually calculate the memory displacements every time I changed the code. I will hopefully never do this again.

This is kind of useless, and I don't recommend programming like this, but I learned a lot, and assembly seems a lot easier now that I understand what it actually does. Oh, and I am now one of the few people who can list binary as one of their programming languages...

Links for useful resources

About

A Windows x64 exe Hello World program fully written by hand in binary

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages