package rebelsky.pal; /** * The PAL instruction to do nothing. * * @author Samuel A. Rebelsky * @version 1.0 of November 2002. */ public class NoOp implements Instruction { // +--------------+------------------------------------------------------ // | Constructors | // +--------------+ /** * Create a new instruction to move output to the next line. */ public NoOp() { } // NoOp() // +---------+----------------------------------------------------------- // | Methods | // +---------+ /** * Execute the instruction on a machine. * * @exception Exception * If the memory location is invalid. */ public void execute(Computer hal) throws Exception { // Do nothing. } // execute(Computer) /** Convert the instruction to a string (usually for printing). */ public String toString() { return " NOOP"; } // toString() } // class NoOp