Mem display

This commit is contained in:
2017-05-10 19:41:39 +02:00
parent b9dcf70dfe
commit 8754fd7bd6
3 changed files with 114 additions and 23 deletions

View File

@@ -21,9 +21,9 @@ namespace PIC_Simulator
quartztimer = new Timer();
quartztimer.Tick += timer1_Tick;
for (int i = 0; i < 32; i++)
for (int i = 0; i < 16; i++)
{
var item = new ListViewItem(new[] {"00", "00", "00", "00", "00", "00", "00", "00"});
var item = new ListViewItem(new[] { string.Format("0x{0:X}0", i), "00", "00", "00", "00", "00", "00", "00", "00", "00", "00", "00", "00", "00", "00", "00", "00" });
lvMemory.Items.Add(item);
}
@@ -146,12 +146,12 @@ namespace PIC_Simulator
// Memory aktualisieren
for (int y = 0; y < 32; y++)
for (int y = 0; y < 16; y++)
{
for (int x = 0; x < 8; x++)
for (int x = 0; x < 16; x++)
{
string nummer = string.Format("{0:X2}", programm.Register[y*8 + x]);
if (nummer != lvMemory.Items[y].SubItems[x].Text) lvMemory.Items[y].SubItems[x].Text = nummer;
string nummer = string.Format("{0:X2}", programm.GetRegisterOhneBank((uint) (y*16 + x)));
if (nummer != lvMemory.Items[y].SubItems[x + 1].Text) lvMemory.Items[y].SubItems[x+1].Text = nummer;
}
}