Exemplo n.º 1
0
 public void Patch()
 {
     foreach (int patch in Patches)
     {
         long address = Address;
         int  @int    = VMB.GetInt(patch);
         int  value   = VMBuffer.EncodeInstructionBranch(VMBuffer.GetInstruction(@int), patch);
         VMB.SetInt(patch, value);
     }
     Patches.Clear();
 }
Exemplo n.º 2
0
 private void Emit(eVM_Instruction _inst, VMLabel _label)
 {
     if (!_label.Marked)
     {
         _label.Patches.Add((int)VMB.Buffer.Position);
         VMB.Add(VMBuffer.EncodeInstructionBranch((int)_inst, 0));
     }
     else
     {
         long num = _label.Address - VMB.Buffer.Position;
         VMB.Add(VMBuffer.EncodeInstructionBranch((int)_inst, (int)num));
     }
 }