mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 05:52:11 +00:00
38 lines
1.4 KiB
C#
38 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.IL2CPU.X86
|
|
{
|
|
[OpCode("adc")]
|
|
public class AddWithCarry : InstructionWithDestinationAndSourceAndSize
|
|
{
|
|
public static void InitializeEncodingData(Instruction.InstructionData aData) {
|
|
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
|
|
OpCode=new byte[]{0x10},
|
|
NeedsModRMByte=true,
|
|
InitialModRMByteValue=0xC0,
|
|
DestinationRegAny=true,
|
|
SourceRegAny = true,
|
|
OperandSizeByte=0,
|
|
ReverseRegisters=true
|
|
}); // reg to reg
|
|
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
|
|
OpCode=new byte[] {0x12},
|
|
NeedsModRMByte=true,
|
|
SourceMemory=true,
|
|
DestinationRegAny=true,
|
|
OperandSizeByte=0
|
|
}); // mem to reg
|
|
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
|
|
OpCode = new byte[] { 0x10 },
|
|
NeedsModRMByte = true,
|
|
DestinationMemory = true,
|
|
SourceRegAny = true,
|
|
OperandSizeByte = 0,
|
|
ReverseRegisters=true
|
|
}); // reg to mem
|
|
}
|
|
}
|
|
}
|