package nxm.sys.intr;

import nxm.sys.lib.Intrinsic;

/**
  Executes next command in a suspended macro

  @author Jeff Schoen

*/
public class Step extends Intrinsic {

  /** default constructor */
  public Step () {}

  public int process() {

    if (M.macro == null || M.macro.suspend==0) {
      M.error("No macro suspended ...");
      return (FINISH);
    }
    int step = MA.getL("STEP");
    M.macro.nextIndex += step;
    M.macro.suspend = -1;

    return (FINISH);
  }
}
