Cosmos/source/Indy.IL2CPU/Assembler/x86/Move.cs
mterwoord_cp 88e55864e9
2008-11-09 16:37:31 +00:00

38 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Indy.IL2CPU.Assembler.X86 {
[OpCode("mov")]
public class Move: InstructionWithDestinationAndSourceAndSize {
public static void InitializeEncodingData(Instruction.InstructionData aData){
aData.DefaultSize = false;
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xB0 },
//NeedsModRMByte=true,
OperandSizeByte=0,
OperandSizeBitShiftLeft = 3,
DestinationReg=Guid.Empty,
DestinationRegByte=0,
SourceImmediate=true
}); // immediate to register
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xC6 },
//NeedsModRMByte=true,
OperandSizeByte = 0,
OperandSizeBitShiftLeft = 0,
SourceImmediate = true
}); // immediate to memory
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xC6 },
NeedsModRMByte=true,
OperandSizeByte = 0,
OperandSizeBitShiftLeft = 0,
SourceImmediate = true,
DestinationRegByte=1,
DestinationMemory = true
}); // immediate to memory
}
}
}