by nogoodnik · 13y ago · 0 comments
1. I wrote most of my high school reports on it.
2. I once wrote a set of WPL programs to automate the generation of multiple-choice tests, and sold it for $50 to my uncle who was a physics teacher.
3. Apple Writer was the second program I disassembled from beginning to end (the first was Locksmith Fast Disk Copy), learning a lot in the process.
You're welcome!
I know this is a predictable remark, but I miss the good old days. The Apple II was so simple and understandable that I was able to write a program that played two musical notes at once (I called it the "Electric Duet"), in tune, and a fairly tolerable sound, even though the speaker was driven by a TTL output (meaning no analog level control).
If the Apple II had had interrupts, my program would have stopped working. I know this because an Apple II successor supported a mouse, the mouse required an interrupt, and it ruined the performance of my program.
Oh, I almost forgot -- Tom Clancy wrote "The Hunt for Red October" on Apple Writer.
That program inspired me to (cough) take it apart and understand how something so cool could come out of the Apple II's speaker. That exercise taught me 6502 opcodes and I've been working in embedded systems ever since.
Near the end of the project, I had two problems: the music was slightly off-pitch -- middle A wasn't exactly 440 Hz -- and the number of machine cycles wasn't quite constant (it varied between 40 and 41 cycles depending on which branches the code took).
Finally I realized I could insert a single NOP (no-operation) instruction at a critical location. The NOP forced the number of cycles to be a constant, regardless of the path through the loop, and I then realized that it also slightly changed the output frequency to be tuned exactly right.
I will always remember that moment. :)