
Way, way back in 1983, when I decided to learn 6502 Assembler (yummi!) and
Apple Pascal (retch!), I borrowed a xeroxed copy of
p-Source: A Guide to the Apple Pascal System by
Randall Hyde,
which had as it's cover a funky adaption of
American Gothic by Grant Wood.
Randy is an exceptionally talented writer. I just received a used copy of
p-Source
and after all these years it's still amazing. The
p-code interpreter was the first
virtual machine I dissected, debugged and enhanced. Randy writes about the
implementation in section 3, chapter 1 "Modifying the Apple Pascal P-code Interpreter":
As it turns out, the students who originally wrote the 6502 p-code interpreter were
fairly inexperienced on the 6502 microprocessor chip. As a result of this inexperience,
the p-code interpreter is not as optimal as it could be. If the 6502 interpreter were
completely rewritten using better coding techniques an overall increase of 15-20%
could be realized. That's almost as good as the 6809!
Randy also is the author of
The Art of Assembly Language Programming
and the soon to be published
Write Great Code: Understanding the Machine.
Randy also wrote an inspiring article about
Why Learning Assembly Language Is Still a Good Idea.
Why is this still relevant? Some might think it's a crazy idea that the
DISASSEMBLE
function ever made it into the language standard. I disagree. As Robert Pirsig tried to
explain in his seminal book
Zen and the Art of Motorcycle Maintenance: An Inquiry into Values,
only in understanding the inner workings of a machine can we start to understand the nature of quality.
Because Pirsig wasn't a programmer himself, he couldn't just write something like:
"The Vulcan
mind-meld
with the machine is at the center of good code."
The availability of
DISASSEMBLE
in the Common Lisp standard is a message: There shouldn't be anything between
you and your machine. When driving a
TVR
or programming a Lisp Machine, you want to be in control.