0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 16:18:37 +03:00

Unified ADC accumulator handlers into a single handler

This commit is contained in:
bird_egop
2025-04-17 01:33:58 +03:00
parent 8c9b34ef09
commit 3fc0ebf1d5
79 changed files with 2564 additions and 473 deletions

View File

@ -185,6 +185,18 @@ public class ModRMDecoder
return regIndex;
}
/// <summary>
/// Extracts modRM reg field
/// </summary>
/// <returns>A reg from the ModR/M byte</returns>
public static byte GetRegFromModRM(byte modRm)
{
// Extract fields from ModR/M byte
byte regIndex = (byte)((modRm & Constants.REG_MASK) >> 3); // Middle 3 bits (bits 3-5)
return regIndex;
}
/// <summary>
/// Reads and decodes a ModR/M byte for standard 32-bit operands
/// </summary>