←back to thread

118 points mariuz | 1 comments | | HN request time: 0.234s | source
Show context
mati365 ◴[] No.45655689[source]
Writing compilers for old CPUs has some real magic in it. It helps you see how processors really work and brings back the old days when hardware was simple and easy to understand. I miss that time. I once wrote a small C compiler in TypeScript for the Intel 8086 and 8087 ([1]), and I have huge respect for the people who coded for those chips. It’s super hard but also very rewarding.

[1] https://github.com/Mati365/ts-c-compiler

replies(4): >>45655833 #>>45656775 #>>45658223 #>>45662182 #
1. le-mark ◴[] No.45655833[source]
I think writing lexers and parsers is just fun, code generation I have not done; which is next level imo. I guess the next level after that is doing the lexing parsing and code generation on the chip. Then the need for multi pass compilation would become apparent quickly I presume!