|
|
BTW, I guess it's possible to build an extremely-reduced-instruction-set
computer with just a single instruction: "Move", reading a data word
from one memory address and then storing it in another. All you'd have
to do would be to map math-op logic to a few dedicated memory locations;
e.g. reading from address 0003 might return the sum of the values stored
in 0000, 0001, address 0004 might return their difference, address 0005
might return the logical AND of memory locations 0000 and 0001, etc.
Even the PC might be stored in one particular address, so writing to
that would constitute an unconditional jump. A conditional branch could
be modeled by reading a status bit, expanding it to all bits of a word
(i.e. 0000 or FFFF), computing the logical AND of that mask and one
target address, as well as the logical AND of the mask's inverse and the
other target address, computing the sum or logical OR of both results,
and ultimately writing that value to the PC. (Alternatively a particular
bit in a particular memory address could specify whether the next
command is to be skipped or not.)
The Apollo guidance computer actually used such an approach for various
mathematical operations.
Post a reply to this message
|
|