package rebelsky.pal; /** * Stop a program in PAL, the Pseudo-assembly language. * * @author Samuel A. Rebelsky * @version 1.0 of November 2002. */ public class Halt implements Instruction { // +--------------+------------------------------------------------------ // | Constructors | // +--------------+ /** * Build a new halt instruction. */ public Halt() { } // Halt() // +---------+----------------------------------------------------------- // | Methods | // +---------+ /** * Execute the instruction on a machine. The computer is responsible * for checking for a halt and stopping, so this is a no-op. */ public void execute(Computer hal) { } // execute(Computer) /** Convert the instruction to a string (usually for printing). */ public String toString() { return " HALT"; } // toString() } // class Halt