3 ms·
A port of the tutorial's Pascal code to C which emits x86 assembly: https://github.com/lotabout/Let-s-build-a-compiler https://github.com/lotabout/Let-s-build-
by x1sec 3y ago
A port of the tutorial's Pascal code to C which emits x86 assembly:
https://github.com/lotabout/Let-s-build-a-compiler https://github.com/lotabout/Let-s-build-a-compiler
- rep_lodsb 3y agoC and AT&T syntax... because it's not Real Programming™ unless there's cryptic symbols everywhere, everyone today knows that of course! [/s] And then there is some weirdly phrased misinformation in the readme about how on modern OSes you have to link to libraries - this simply isn't true, at least on Linux. A static 32-bit binary using either 'int 80h' or 'syscall' instructions will even run on "pure" x64 systems (i.e. ones with no 32-bit libs installed at all). The only thing this adds is the translated code, and this dubious information about x86 programming, the text of the tutorial itself is unchanged. So I don't see this providing any value except to those people who absolutely refuse to read Pascal code. To anyone who wants a similar bottom-up (but somewhat more advanced) compiler tutorial using C, maybe read this one instead: https://github.com/DoctorWkt/acwj https://github.com/DoctorWkt/acwj