Permalink
Browse files

add trace statements for writes

  • Loading branch information...
1 parent 7254e13 commit 9a83b28b55c74f450545390b09e25cd4b9dfcc79 @mmcgill committed Apr 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 dcpu/State.cs
View
@@ -1,4 +1,5 @@
using System;
+using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -27,11 +28,13 @@ public class MutableState : IState {
}
public IState Set(RegisterName reg, ushort value) {
+ Trace.WriteLine(string.Format(" {0} <- {1}", reg, value));
_regs[(int)reg] = value;
return this;
}
public IState Set(ushort addr, ushort value) {
+ Trace.WriteLine(string.Format(" [0x{0:X}] <- {1}", addr, value));
_memory[addr] = value;
return this;
}

0 comments on commit 9a83b28

Please sign in to comment.