Ypsilon.Emulation.Processor.YCPU.DisassembleSHF C# (CSharp) Method

DisassembleSHF() private method

private DisassembleSHF ( 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
return string
        private string DisassembleSHF(string name, ushort operand, ushort nextword, ushort address, bool showMemoryContents, out ushort instructionSize)
        {
            instructionSize = 2;
            RegGeneral destination = (RegGeneral)((operand & 0xE000) >> 13);
            string value;
            if ((operand & 0x1000) == 0) {
                int shiftby = ((operand & 0x0F00) >> 8) + 1;
                value = $"${(ushort)shiftby:X2}";
            }
            else
                value = NameOfRegGP((RegGeneral)((operand & 0x0700) >> 8));
            return $"{name,-8}{NameOfRegGP(destination)}, {value}";
        }