summaryrefslogtreecommitdiff
path: root/Emulator
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-09 09:45:22 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-09 09:45:22 +1000
commit7f334796e8d0619dc744b1345a7b7b73a27220f9 (patch)
tree709c9a7df920d8eb1e779df4f878a25596303f17 /Emulator
parentd36d51429d604f0ab3b2076c4c05e28ebf9b52c5 (diff)
added method calling and for loops
Diffstat (limited to 'Emulator')
-rw-r--r--Emulator/Chip/Q1Cpu.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Emulator/Chip/Q1Cpu.cs b/Emulator/Chip/Q1Cpu.cs
index 16489e4..ca5ffc8 100644
--- a/Emulator/Chip/Q1Cpu.cs
+++ b/Emulator/Chip/Q1Cpu.cs
@@ -49,6 +49,10 @@ public partial class Q1Cpu
u16 instruction = this.FetchInstruction(out u8 op, out u8 m1, out u8 m2, out _);
if (instruction != 0x0101)
Console.WriteLine($"CPU.Clock: {pc:X4} | {Disassembler.ParseInstruction(instruction)}");
+ for (int i = Q1Layout.StackStart; i < this.SP; i += 2)
+ {
+ Console.WriteLine($"Stack value: {this.Bus.ReadWord((u16) i)}");
+ }
bool ex = m2 > 0;
switch (m1, ex)