Files
MadMin3r-UnconfuserEx/X86Emulator/Instructions/Pop.cs
T
2023-03-01 23:18:47 +00:00

30 lines
606 B
C#

using SharpDisasm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace X86Emulator.Instructions
{
internal class Pop : Instruction
{
private Operand? Operand = null;
public Pop(Operand? operand)
{
Operand = operand;
}
public override void Emulate(Stack<int> stack, Registers registers)
{
int val = stack.Pop();
if (Operand != null)
{
registers.SetValue(Operand.Base, val);
}
}
}
}