Command Loop

  The exact number and sequence of operations desired of a program will not be known until it is run. Therefore:
Read commands from a file until the file is exhausted. Look up each command in a table of legal operations. When matched, dispatch to a handler that reads additional arguments and performs the operation.
  A variation is the read-eval-print loop in which all commands evaluate to a result that is printed before looping to read the next command.

Contrast with Fetch-Execute that retrieves instructions (highly encoded commands) from random-access memory.

 

PDP-8 Simulator
© 1975, 1998, Ward Cunningham
all rights reserved