From 7b32de4b958a92def3c5e632b80b5d37161a1dd3 Mon Sep 17 00:00:00 2001 From: cpg Date: Sun, 25 Jun 2000 02:20:13 +0000 Subject: [PATCH] added deb.c (simple program to enter the debugger) git-svn-id: svn://svn.cc65.org/cc65/trunk@127 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- testcode/lib/deb.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 testcode/lib/deb.c diff --git a/testcode/lib/deb.c b/testcode/lib/deb.c new file mode 100644 index 000000000..b054fc14f --- /dev/null +++ b/testcode/lib/deb.c @@ -0,0 +1,38 @@ +/* + * test program for the debugger + * + * press 'd' to enter the debugger + * + */ + +#include +#include +#include <6502.h> +#include + +int main(void) +{ + char c; + + /* Initialize the debugger */ + DbgInit (0); + + clrscr(); + cputsxy(4,10,"Debugger test...."); cgetc(); + while(1) { + printf("press d to debug, q to exit....\n"); + c = cgetc(); + if (c == 'q') { + printf("exiting....\n"); + return(0); + } + if (c == 'd') { + printf("entering debug...\n"); + BREAK(); + printf("return from debug...\n"); + } + else { + printf("unknown key '%c'\n",c); + } + } +} -- 2.39.5