< previous page page_517 next page >

Page 517

63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
Mel's job was to re-write
the blackjack program for the RPC-4000.
(Port? What does that mean?) The new computer had a one-plus-one
addressing scheme,
in which each machine instruction,
in addition to the operation code
and the address of the needed operand,
had a second address that indicated where, on the revolving drum,
the next instruction was located.
63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
In modern parlance,
every single instruction was followed by a GO TO!
Put that in Pascal's pipe and smoke it.
63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
Mel loved the RPC-4000
because he could optimize his code:
that is, locate instructions on the drum
so that just as one finished its job,
the next would be just arriving at the "read head"
and available for immediate execution.
There was a program to do that job,
an "optimizing assembler",
but Mel refused to use it.
63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
"You never know where it's going to put things",
he explained, "so you'd have to use separate constants".
63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
It was a long time before I understood that remark.
Since Mel knew the numerical value
of every operation code,
and assigned his own drum addresses,
every instruction he wrote could also be considered a numerical constant.
He could pick up an earlier "add" instruction, say,
and multiply by it,
if it had the right numeric value.
His code was not easy for someone else to modify.
63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
I compared Mel's hand-optimized programs
with the same code massaged by the optimizing assembler
program,

 
< previous page page_517 next page >

If you like this book, buy it!