Nothing, Stop, and Suspend Instructions Next: SequencingUp: Basic InstructionsPrevious: Basic Instructions

Nothing, Stop, and Suspend Instructions

Nothing  does nothing: it is introduced only as the initial program value.

 
public class Nothing extends Instruction
{
  final public String toString(){ return "nothing"; }
  final protected byte activation(Machine machine){return TERM;}
}

Stop  stops execution for the current instant by returning STOP. However, the instruction terminates, thus activation will return TERM at the next instant.

 
public class Stop extends Instruction
{
  final public String toString(){ return "stop"; }

  final protected byte activation(Machine machine)
  {
    terminate();
    return STOP;
  }
}

Suspend  suspends execution for the current instant by returning SUSP.

public class Suspend extends Instruction
{
  final public String toString(){ return "suspend"; }

  final protected byte activation(Machine machine)
  {
     terminate();
     return SUSP;
  }
}