public override void ExecuteOpCode(VMStack stack, Instruction instruction) { var x = stack.VM.Pop(); var y = stack.VM.Pop(); stack.VM.Push(y & x); }
public object Execute() { while (instructions.Count > Index) { YeetInstruction instruction = instructions[Index]; YeetOpCodeHandler registredInstruction = RegisteredHandlers[instruction.OpCode]; registredInstruction.ExecuteInstruction(this, instruction); } return(VMStack.Count != 0 ? VMStack.Pop() : null); }
public override void ExecuteOpCode(VMStack stack, Instruction instruction) { if (stack.VM.Count == 0) { stack.VM.Push(null); } else { stack.VM.Push(stack.VM.Pop()); } }
public override void ExecuteOpCode(VMStack stack, Instruction instruction) { stack.VM.Push((long)instruction.Operand); }
public abstract void ExecuteOpCode(VMStack stack, Instruction instruction);
public override void ExecuteOpCode(VMStack stack, Instruction instruction) { stack.VM.Push((sbyte)instruction.GetLdcI4Value()); }
public override void ExecuteOpCode(VMStack stack, Instruction instruction) { stack.VM.Push(-1); }