To make an EXE file, I need a way of creating a binary file. While this might have been possible in Notepad, it definitely wouldn't have been any fun. Instead, I wrote a quick C program, MakeBin, to convert a simple listing of bytes into a binary program.
For example, MakeBin would take the following input:
# Testing MakeBin 00 01 02 03 # comment a0 a1 a2 a3 fc fd fe ff # another comment
and this command:
C:\>makebin 1-TestingMakeBin.txt 1-TestingMakeBin.bin
Would create a new file, 1-TestingMakeBin.bin, containing the binary equivalent of the hex digits 00 01 02 03 a0 a1 a2 a3 fc fd fe ff. White space (tabs, spaces, new lines, etc) are ignored, as are all the characters on a line after a '#' symbol.
| Source code | MakeBin.cpp (zip) |
| EXE file | MakeBin.exe (zip) |
| Test file | 1-TestingMakeBin.txt (zip) |
| Test output | 1-TestingMakeBin.bin (zip) |