Created
September 4, 2019 03:21
-
-
Save mattgodbolt/d83c771cf1775258b46c81ed78ac057f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
utils = require('utils'); | |
hw = utils.hexword; | |
hb = utils.hexbyte; | |
every = 0; | |
function spew(pc) { | |
console.log(`${processor.currentCycles} $${hw(pc)} A=${hb(processor.a)} X=${hb(processor.x)} Y=${hb(processor.y)}`); | |
// breakpoint every 100 instructions lest things go awry. | |
return ((++every % 100) === 0); | |
} | |
processor.debugInstruction.add(spew); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment