package nxm.sys.intr;

import nxm.sys.lib.Intrinsic;

/** Resumes execution of a macro in suspend mode

  @author Jeff Schoen
*/
public class Go extends Intrinsic {

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

  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 = 0;

    return FINISH;
  }
}
