package rebelsky.pal;

/**
 * An instruction in PAL, the Pseudo-assembly language.
 *
 * @author Samuel A. Rebelsky
 * @version 1.01 of November 2002.
 */
public interface Instruction
{
  // +---------+-----------------------------------------------------------
  // | Methods |
  // +---------+

  /** 
   * Execute the instruction on a machine. 
   * 
   * @exception Exception
   *   If the instruction fails to execute.
   */
  public void execute(Computer hal)
    throws Exception;

  /** Convert the instruction to a string (usually for printing). */
  public String toString();

  // +---------+-----------------------------------------------------------
  // | History |
  // +---------+

/*
  Monday, 18 November 2002 [Version 1.0]
  o First released version (written as an interface).

  Thursday, 21 November 2002 [Version 1.01]
  o Added history in preparation for future changes.
*/
  
} // interface Instruction

