0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 08:18:36 +03:00
This commit is contained in:
bird_egop
2025-04-12 23:40:48 +03:00
parent 3cc6d27e33
commit f658f4384c
9 changed files with 16 additions and 158 deletions

View File

@ -7,7 +7,7 @@ public class Int32OperationHandler : FloatingPointBaseHandler
{
// DA opcode - operations on int32
private static readonly string[] Mnemonics =
{
[
"fiadd",
"fimul",
"ficom",
@ -15,8 +15,8 @@ public class Int32OperationHandler : FloatingPointBaseHandler
"fisub",
"fisubr",
"fidiv",
"fidivr",
};
"fidivr"
];
/// <summary>
/// Initializes a new instance of the Int32OperationHandler class

View File

@ -18,7 +18,7 @@ namespace X86Disassembler.X86.Handlers;
/// </summary>
public class InstructionHandlerFactory
{
private readonly List<IInstructionHandler> _handlers = new();
private readonly List<IInstructionHandler> _handlers = [];
private readonly byte[] _codeBuffer;
private readonly InstructionDecoder _decoder;
private readonly int _length;

View File

@ -6,11 +6,11 @@ namespace X86Disassembler.X86.Handlers.Jump;
public class ConditionalJumpHandler : InstructionHandler
{
// Mnemonics for conditional jumps
private static readonly string[] ConditionalJumpMnemonics = new string[]
{
private static readonly string[] Mnemonics =
[
"jo", "jno", "jb", "jnb", "jz", "jnz", "jbe", "jnbe",
"js", "jns", "jp", "jnp", "jl", "jnl", "jle", "jnle"
};
];
/// <summary>
/// Initializes a new instance of the ConditionalJumpHandler class
@ -44,7 +44,7 @@ public class ConditionalJumpHandler : InstructionHandler
{
// Get the mnemonic from the table
int index = opcode - 0x70;
instruction.Mnemonic = ConditionalJumpMnemonics[index];
instruction.Mnemonic = Mnemonics[index];
// Get the current position in the code buffer
int position = Decoder.GetPosition();

View File

@ -6,11 +6,11 @@ namespace X86Disassembler.X86.Handlers.Jump;
public class TwoByteConditionalJumpHandler : InstructionHandler
{
// Mnemonics for conditional jumps
private static readonly string[] ConditionalJumpMnemonics = new string[]
{
private static readonly string[] ConditionalJumpMnemonics =
[
"jo", "jno", "jb", "jnb", "jz", "jnz", "jbe", "jnbe",
"js", "jns", "jp", "jnp", "jl", "jnl", "jle", "jnle"
};
];
/// <summary>
/// Initializes a new instance of the TwoByteConditionalJumpHandler class