mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-11-01 02:16:13 +00:00
Some minor code tidying
This commit is contained in:
@@ -537,10 +537,6 @@ namespace EightBit
|
|||||||
return this.symbols.TryGetQualifiedEquate(value, out name);
|
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 ConvertConstantByte(ushort address) => this.ConvertConstant(this.GetByte(address));
|
||||||
|
|
||||||
private string ConvertConstant(byte constant) => this.TryGetConstant(constant, out var label) ? label : "$" + DumpByteValue(constant);
|
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 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_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_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();
|
private string Disassemble_Absolute(string instruction) => this.AM_Absolute_dump() + $"\t{this.MaybeGetCodeLabel()}" + instruction + " " + this.AM_Absolute();
|
||||||
|
|||||||
@@ -80,9 +80,9 @@
|
|||||||
{
|
{
|
||||||
// If there are any cycles associated
|
// If there are any cycles associated
|
||||||
var cycles = this.addressProfiles[i];
|
var cycles = this.addressProfiles[i];
|
||||||
var count = this.addressCounts[i];
|
|
||||||
if (cycles > 0)
|
if (cycles > 0)
|
||||||
{
|
{
|
||||||
|
var count = this.addressCounts[i];
|
||||||
Debug.Assert(count > 0);
|
Debug.Assert(count > 0);
|
||||||
var address = (ushort)i;
|
var address = (ushort)i;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user