Class SVM_DUP


public class SVM_DUP extends SVM_Instruction

SVM-INSTRUCTION: DUP n

Runtime Stack
	..., value1, value2, ... , value'n →
	..., value1, value2, ... , value'n, value1, value2, ... , value'n

A duplicate of the 'n' top values are is pushed onto the Runtime stack.

Link to GitHub: Source File.

Author:
S-Port: Definition of S-code, Øystein Myhre Andersen
  • Field Details

    • n

      private final int n
      The number of stack items to duplicate
  • Constructor Details

    • SVM_DUP

      public SVM_DUP(int n)
      Construct a new SVM_DUP instruction
      Parameters:
      n - the number of stack items to duplicate
  • Method Details