5 ms·
I'm a self-taught programmer, starting in the mid-70s, and learned how to write compilers in a way that probably wouldn't work nowadays, but was great fun back
by philiplu 4y ago
I'm a self-taught programmer, starting in the mid-70s, and learned how to write compilers in a way that probably wouldn't work nowadays, but was great fun back then.
The first thing I'd usually do when starting on a new architecture was write a disassembler. In the late 70s, I was mostly programming in 6809 assembly, usually in Microware's OS-9 operating system. Microware released a Pascal compiler, so I ran my disassembler over that. Turns out the compiler was self-hosting, written in Pascal, and the compiler output was almost completely unoptimized. So I decompiled the compiler back to Pascal by hand, just to see how it worked. I obviously had waaaaay more free-time back then.
I eventually read the green Dragon book (Aho & Ullman, Principles of Compiler Design), and ended up at Microsoft on the C/C++ team in 1991. Over the years, I've written several domain-specific languages (DSLs), small languages for some limited purpose. That early exposure to lexing, parsing, and error detection was invaluable.
- jjav 4y ago> Microware's OS-9 operating system I loved OS-9 on the 6809. It was my introduction into unix-ish-like systems that led into SunOS and later Linux and the foundations of my career.
- jononomo 4y agoThis is a great comment. I love that people like you are on Hacker News and it is why I appreciate this site so much.
- philiplu 4y agoThanks! It's gratifying that the reminiscences of a graybeard like me can still resonate with readers here.
- murdoze 4y agoI also wrote a source-generating disassembler for a 8-bit i8080-based Soviet-designed computer, RADIO-86RK — because I wanted to improve software published in the magazine. And explore stuff.
- Garvey 4y agoDon't suppose you have any links to any useful resource/tools for disassembling an old CD-i game that would have been written in C for the 68000 on Microware OS-9? I've got so far with ghidra but the OS-9 plugins available are either outdated or don't fully handle the instruction set for OS-9. If I can add any more info, let me know.