Some minor code tidying

This commit is contained in:
Adrian Conlon 2024-06-10 20:49:03 +01:00
parent 5a58d2051f
commit 84351ea0a8
2 changed files with 2 additions and 8 deletions

View File

@ -537,10 +537,6 @@ namespace EightBit
return this.symbols.TryGetQualifiedEquate(value, out name);
}
private string ConvertConstantWord(ushort address) => this.ConvertConstant(this.GetWord(address));
private string ConvertConstant(ushort constant) => this.TryGetConstant(constant, out var label) ? label : this.Dump_DByte(constant);
private string ConvertConstantByte(ushort address) => this.ConvertConstant(this.GetByte(address));
private string ConvertConstant(byte constant) => this.TryGetConstant(constant, out var label) ? label : "$" + DumpByteValue(constant);
@ -553,12 +549,10 @@ namespace EightBit
private ushort GetWord(ushort absolute) => this.processor.PeekWord(absolute).Word;
private string Dump_Byte(ushort absolute) => Disassembler.DumpByteValue(this.GetByte(absolute));
private string Dump_Byte(ushort absolute) => DumpByteValue(this.GetByte(absolute));
private string Dump_DByte(ushort absolute) => this.Dump_Byte(absolute) + " " + this.Dump_Byte(++absolute);
private string Dump_Word(ushort absolute) => Disassembler.DumpWordValue(this.GetWord(absolute));
private string Disassemble_Implied(string instruction) => $"{Pad()}\t{this.MaybeGetCodeLabel()}" + instruction;
private string Disassemble_Absolute(string instruction) => this.AM_Absolute_dump() + $"\t{this.MaybeGetCodeLabel()}" + instruction + " " + this.AM_Absolute();

View File

@ -80,9 +80,9 @@
{
// If there are any cycles associated
var cycles = this.addressProfiles[i];
var count = this.addressCounts[i];
if (cycles > 0)
{
var count = this.addressCounts[i];
Debug.Assert(count > 0);
var address = (ushort)i;