|
In 1984 I was working for a small company that made Z80-based desktop computers running CP/M. All of the software was written in Z80 assembly language. MS-DOS was gaining traction, so we built a machine that contained both a Z80 and an 8088. It could run CP/M or MS-DOS. However converting a bunch of Z80 assembler to x86 assembler for all our system utilities etc was a daunting task. There were tools available that would translate the code, but the quality was poor and the resulting output was not really readable [maintainable]. I expressed my annoyance in a planning meeting, saying "We should have written some of this in a high level language." One of the other guys on the team had done a small amount of C programming at university and was aware of its portability advantages. He suggested I look into it. Although I had used several high level languages in the past (Basic, Fortran, Pascal), I was completely unfamiliar with C. So I bought a early edition of K&R. I started reading it from the start; got about 4 chapters in and thought, "This looks easy enough." So I sat down and wrote a rudimentary VT100 terminal emulator (something I knew a great deal about at the time). I tried to compile it: a dozen errors on the first line, a dozen errors on the second line, etc. I thought, "Hmmm, maybe not so easy after all." The one guy I knew who had done any C programming at all, had done so little as to be useless as a source of knowledge, and we didn't really have a great deal of C source code available to us at the time. So I sat down with K&R and started doing the examples 1 at a time. Hello World going forward. I picked it up pretty quickly, and within months our source was about 80% C and 20% assembler. Although I wasn't a self-taught programmer, I was pretty much a self-taught C programmer. The scary thing was, I was then considered "the go-to guy" for C programming advice for the rest of the team. I probably ruined them for life. |