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