Ejemplo n.º 1
0
 CPU(UInt64 stackPointer = 0x1024)
 {
     Registers = new List<Register32> ();
     EAX = new Register32 (TargetRegister.eax, 0);
     EBX = new Register32 (TargetRegister.ebx, 0);
     ECX = new Register32 (TargetRegister.ecx, 0);
     EDX = new Register32 (TargetRegister.edx, 0);
     EBP = new Register32 (TargetRegister.ebp, 0);
     if (stackPointer > UInt32.MaxValue) {
         Console.WriteLine ("[ERROR] Long addresses are currently not supported.");
         Environment.Exit (0);
     }
     ESP = new Register32 (TargetRegister.esp, (uint)stackPointer);
     ESI = new Register32 (TargetRegister.esi, 0);
     EDI = new Register32 (TargetRegister.edi, 0);
     Registers.AddRange (new [] {
         EAX, EBX, ECX, EDX,
         EBP, ESP, ESI, EDI,
     });
 }
Ejemplo n.º 2
0
 public Register16(Register32 base_register)
 {
     Base = base_register;
     Name = string.Format ("{0}x", Base.Name.Skip (1).First ());
 }