private DisassembleSET ( string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, ushort &instructionSize ) : string | ||
name | string | |
operand | ushort | |
nextword | ushort | |
address | ushort | |
showMemoryContents | bool | |
instructionSize | ushort | |
Résultat | string |
private string DisassembleSET(string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, out ushort instructionSize)
{
instructionSize = 2;
RegGeneral destination = (RegGeneral)((operand & 0xE000) >> 13);
int value = (operand & 0x1F00) >> 8;
if ((operand & 0x0001) == 1) {
if (value <= 0x0A)
value = (ushort)(0x0001 << (value + 0x05));
else
value = (ushort)(0xFFE0 + value);
}
return $"{name,-8}{NameOfRegGP(destination)}, {string.Format($"${value:X2}", value)}";
}