Parent Directory | Revision Log
- transfer debug state into C, added accesor M6502->debug(); - update_*_R functions to keep perl vars in sync with C - tests
1 | // make perlxsi.c happy |
2 | EXTERN_C void xs_init (pTHX); |
3 | |
4 | // which module to bootstrap |
5 | #define EMU_START "use blib; use Arch;" |
6 | |
7 | // do we want to dump our C debug? |
8 | #define DEBUGF 1 |
9 | |
10 | // do we wont to dump registars? |
11 | //#define DUMP_R 1 |
12 | |
13 | void push_R(void); |
14 | void pull_R(void); |
15 | |
16 | extern int debug; |
17 | |
18 | #if DEBUGF |
19 | #define debugf(x) do { \ |
20 | if (debug) { \ |
21 | PerlIO_stdoutf("#> "); \ |
22 | PerlIO_stdoutf x ; \ |
23 | PerlIO_stdoutf("\n"); \ |
24 | } \ |
25 | } while (0) |
26 | #else |
27 | #define debugf(x) |
28 | #endif |
29 | |
30 | #if 1 |
31 | #define dump_R do { \ |
32 | if (debug) { \ |
33 | printf("#> PC: %04x A:%02x P:%02x X:%02x Y:%02x S:%02x\n", \ |
34 | R->PC.W, R->A, R->P, R->X, R->Y, R->S ); \ |
35 | } \ |
36 | } while (0) |
37 | #else |
38 | #define dump_R |
39 | #endif |
40 |
ViewVC Help | |
Powered by ViewVC 1.1.26 |