Skip to content

Instantly share code, notes, and snippets.

@kierenj
Created May 17, 2012 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kierenj/2718395 to your computer and use it in GitHub Desktop.
Save kierenj/2718395 to your computer and use it in GitHub Desktop.
DCPU16 debugger device
Name: Generic Debugger (compatible)
ID: 0xdeb91111
Version: 1
Interrupts do different things depending on contents of the A register:
A | BEHAVIOR
---+----------------------------------------------------------------------------
0 | Trigger a breakpoint
1 | Output diagnostics word (value in B)
2 | Output diagnostics string (null-terminated, pointed to by B)
3 | Output diagnostics string (length-prefixed, pointed to by B)
4 | Flag unit test success
5 | Flag unit test failure
6 | Set target processor speed in KHz (value in B)
7 | Set B to processor speed in KHz
8 | Reset cycle counter
9 | Get cycle counter value in B
? | Reserved for future expansion - default action is 'Trigger a breakpoint'
---+----------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment