protected override string GetDisplayValue(IWabbitcodeDebugger debugger, int address, int size) { string outputValue = string.Empty; if (size == ReadToEnd) { int i = 0; char charToAdd; do { charToAdd = (char)debugger.ReadByte((ushort)(address + i)); outputValue += charToAdd.ToString(); i++; } while (charToAdd != '\0'); } else { var bytes = debugger.ReadMemory((ushort)address, (ushort)size); for (int i = 0; i < size; i++) { outputValue += (char)bytes[i]; } } return(outputValue); }
private static string GetVarValue(IWabbitcodeDebugger debugger, int address, int size, int scale) { string outputValue = string.Empty; var values = debugger.ReadMemory((ushort)address, (ushort)(size * scale)); for (int i = 0; i < size * scale; i += scale) { int total = 0; for (int j = 0; j < scale; j++) { total += values[i + j] << (8 * j); } outputValue += Convert.ToString(total, Base).PadLeft(2 * scale, '0') + " "; } return(outputValue); }