mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 14:02:19 +00:00
33 lines
1.3 KiB
C#
33 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.IL2CPU.X86 {
|
|
[OpCode("inc")]
|
|
public class Inc : InstructionWithDestinationAndSize {
|
|
public static void InitializeEncodingData(Instruction.InstructionData aData) {
|
|
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
|
|
OpCode=new byte[] {0x40},
|
|
DestinationRegAny=true,
|
|
DestinationRegByte=0,
|
|
AllowedSizes = InstructionSizes.DWord | InstructionSizes.Word
|
|
}); // reg (alt)
|
|
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
|
|
OpCode = new byte[] { 0xFE },
|
|
DestinationRegAny = true,
|
|
NeedsModRMByte=true,
|
|
InitialModRMByteValue=0xC0,
|
|
ReverseRegisters=true,
|
|
OperandSizeByte=0
|
|
}); // reg
|
|
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
|
|
OpCode = new byte[] { 0xFE },
|
|
DestinationMemory=true,
|
|
NeedsModRMByte = true,
|
|
ReverseRegisters = true,
|
|
OperandSizeByte = 0
|
|
}); // memory
|
|
}
|
|
}
|
|
}
|