mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-03-31 04:30:58 +00:00
More tidyups
This commit is contained in:
parent
75c96929bf
commit
301cd0c1e2
@ -4,6 +4,7 @@
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
public class Disassembler(Bus bus, M6502 processor, Symbols symbols)
|
||||
@ -27,9 +28,9 @@ namespace EightBit
|
||||
return returned.ToString();
|
||||
}
|
||||
|
||||
public static string DumpByteValue(byte value) => value.ToString("X2");
|
||||
public static string DumpByteValue(byte value) => value.ToString("X2", CultureInfo.InvariantCulture);
|
||||
|
||||
public static string DumpWordValue(ushort value) => value.ToString("X4");
|
||||
public static string DumpWordValue(ushort value) => value.ToString("X4", CultureInfo.InvariantCulture);
|
||||
|
||||
public string Disassemble(ushort current)
|
||||
{
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
namespace EightBit
|
||||
{
|
||||
using System.Globalization;
|
||||
|
||||
public class Symbols
|
||||
{
|
||||
private readonly Dictionary<string, Dictionary<string, Dictionary<string, string>>> parsed = [];
|
||||
@ -13,8 +15,9 @@ namespace EightBit
|
||||
{
|
||||
}
|
||||
|
||||
public Symbols(string path)
|
||||
public Symbols(string? path)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(path);
|
||||
if (path.Length > 0)
|
||||
{
|
||||
this.Parse(path);
|
||||
@ -40,7 +43,7 @@ namespace EightBit
|
||||
var name = parsedScope["name"];
|
||||
var trimmedName = name[1..^1];
|
||||
var size = parsedScope["size"];
|
||||
this.Scopes[trimmedName] = ushort.Parse(size);
|
||||
this.Scopes[trimmedName] = ushort.Parse(size, CultureInfo.InvariantCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user