< previous page page_520 next page >

Page 520

63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
It allowed the programmer to write a program loop
that used an indexed instruction inside;
each time through,
the number in the index register
was added to the address of that instruction,
so it would refer
to the next datum in a series.
He had only to increment the index register
each time through.
Mel never used it.
63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
Instead, he would pull the instruction into a machine register,
add one to its address,
and store it back.
He would then execute the modified instruction
right from the register.
The loop was written so this additional execution time
was taken into account
just as this instruction finished,
the next one was right under the drum's read head,
ready to go.
But the loop had no test in it.
63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
The vital clue came when I noticed
the index register bit,
the bit that lay between the address
and the operation code in the instruction word,
was turned on
yet Mel never used the index register,
leaving it zero all the time.
When the light went on it nearly blinded me.
63aae95d7142d91b7e908a3e5868baf1.gif 63aae95d7142d91b7e908a3e5868baf1.gif
He had located the data he was working on
near the top of memory
the largest locations the instructions could address
so, after the last datum was handled,
incrementing the instruction address
would make it overflow.
The carry would add one to the
operation code, changing it to the next one in the instruction set:
a jump instruction.

 
< previous page page_520 next page >

If you like this book, buy it!