Example #1
0
        public void Load(DarksVMContext ctx, out ExecutionState state)
        {
            uint        sp   = ctx.Registers[DarksVMConstants.REG_SP].U4;
            DarksVMSlot slot = ctx.Stack[sp];

            ctx.Stack.SetTopPosition(--sp);
            ctx.Registers[DarksVMConstants.REG_SP].U4 = sp;

            VCalls.IVCall vCall = VCallMap.Lookup(slot.U1);
            vCall.Load(ctx, out state);
        }
Example #2
0
        public void Run(VMContext ctx, out ExecutionState state)
        {
            var sp   = ctx.Registers[Constants.REG_SP].U4;
            var slot = ctx.Stack[sp];

            ctx.Stack.SetTopPosition(--sp);
            ctx.Registers[Constants.REG_SP].U4 = sp;

            var vCall = VCallMap.Lookup(slot.U1);

            vCall.Run(ctx, out state);
        }