package org.ojlang.models.contracts;

/**
 * @author Bahman Movaqar [Bahman AT BahmanM.com]
 */
public interface SystemWord extends Word {

  @Override
  default boolean isSystemWord() {
    return true;
  }

  void execute(
    Memory mem,
    ParamStack ps,
    ReturnStack rs
  );

}

@@ -35,16 +35,223 @@
 s;%0A%0A/**%0A
+ * A system word.%0A * A word which is implemented in Java (or any other JVM language). A system%0A * word must be registered in Oj runtime in order to be used.%0A *%0A * @see org.ojlang.runtime.SystemWordsRegistry%0A
  * @auth
@@ -415,75 +415,180 @@
 %0A%0A  
-void execute(%0A    Memory mem,%0A    ParamStack ps,%0A    ReturnStack rs
+/**%0A   * Executes the word mutating the system state.%0A   *%0A   * @param systat the snapshot of the system state before execution%0A   */%0A  void execute(%0A    SystemState systat
 %0A  )

use SystemState