public void Execute(ExecutionNodes nodes, ref Memory memory)
        {
            int rhv;
            if (memory.Local == null)
            {
                throw new InvalidOperationException("Sub: Local cannot be null.");
            }
            else
            {
                rhv = (int)memory.Local.GetValue(MemoryType.Int);
            }

            int lhv = (int)memory.Get(memoryIndex).GetValue(MemoryType.Int);

            memory.Local = new MemorySlot(MemoryType.Int, lhv - rhv);
        }
        public void Execute(ExecutionNodes nodes, ref Memory memory)
        {
            int local;
            if (memory.Local == null)
            {
                throw new InvalidOperationException("BumpUp: Local cannot be null.");
            }
            else
            {
                local = (int)memory.Local.GetValue(MemoryType.Int);
            }

            int register = (int)memory.Get(memoryIndex).GetValue(MemoryType.Int);

            memory.Local = new MemorySlot(MemoryType.Int, local + 1);
            memory.Set(MemoryType.Int, register + 1, memoryIndex);
        }
 public void Execute(ExecutionNodes nodes, ref Memory memory)
 {
     memory.Local = memory.Get(memoryIndex);
 }