]> git.sur5r.net Git - cc65/blob - testcode/lib/deb.c
Replace hard returns with an "else", add an error for non-IDENT tokens, and test...
[cc65] / testcode / lib / deb.c
1 /*
2 ** test program for the debugger
3 **
4 ** press 'd' to enter the debugger
5 **
6 */
7
8 #include <stdio.h>
9 #include <conio.h>
10 #include <6502.h>
11 #include <dbg.h>
12
13 int main(void)
14 {
15   char c;
16
17   /* Initialize the debugger */
18   DbgInit (0);
19
20   clrscr();
21   cputsxy(4,10,"Debugger test...."); cgetc();
22   while(1) {
23     printf("press d to debug, q to exit....\n");
24     c = cgetc();
25     if (c == 'q') {
26       printf("exiting....\n");
27       return(0);
28     }
29     if (c == 'd') {
30       printf("entering debug...\n");
31       BREAK();
32       printf("return from debug...\n");
33     }
34     else {
35       printf("unknown key '%c'\n",c);
36     }
37   }
38 }