From fbca225d25db812fe7823a8528dff17320cf1c53 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Fri, 7 Apr 2023 02:35:46 +1000 Subject: commit so I can access it tomorrow. --- debug.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 debug.h (limited to 'debug.h') diff --git a/debug.h b/debug.h new file mode 100644 index 0000000..c46f220 --- /dev/null +++ b/debug.h @@ -0,0 +1,16 @@ +// debug.h +// Various functions useful for use during development. + +void dPageDump(){ + for(int i = 0; i < 256; i+=16){ + printf("\t"); + for(int j = 0; j < 16; j+=1){ + printf("%2x ", Memory[(i+j)]); + } + printf("\n"); + } +} + +void dStatusDump(){ + printf("acc:\t%x\nX:\t%x\nY:\t%x\nstack:\t%x\nflags:\t%x\n", acc, X, Y, S, P); +} \ No newline at end of file -- cgit v1.2.3