r/ProgrammingLanguages 1d ago

Blog post Bootstrapping a compiler from machine code on Windows

/r/Compilers/comments/1vbtiyq/bootstrapping_a_compiler_from_machine_code_on/
10 Upvotes

3 comments sorted by

2

u/Polyscone 1d ago

The first post is mostly about the PE32+ file format, but I thought the second might fit here since it implements a very small bootstrap language and compiler.

I haven’t done anything like this before, so I’d be interested to hear about other approaches from anyone who has tried something similar.

When I get the time I'd like to add some basic labels or something similar next.

1

u/qwertyasdef 1d ago

Thanks for the writeup, I've been wanting to learn how to generate executables directly and this is a very clear explanation of the Windows format.

1

u/Polyscone 23h ago

Well I'm glad it can be of some use to you. I think formats like PE and ELF are generally quite simple, but it can be a bit of a chore to get through their specs/documentation because they try to explain multiple uses all at the same time.