Parent Directory | Revision Log
a try at implementing selectable callbacks to perl for read/write operations as opposed to whole memory
1 | // make perlxsi.c happy |
2 | EXTERN_C void xs_init (pTHX); |
3 | |
4 | // do we want to dump our C debug? |
5 | #define DEBUGF 1 |
6 | |
7 | // do we wont to dump registars? |
8 | //#define DUMP_R 1 |
9 | |
10 | void push_R(void); |
11 | void pull_R(void); |
12 | |
13 | extern int debug; |
14 | |
15 | #if DEBUGF |
16 | #define debugf(x) do { \ |
17 | if (debug) { \ |
18 | PerlIO_stdoutf("#> "); \ |
19 | PerlIO_stdoutf x ; \ |
20 | PerlIO_stdoutf("\n"); \ |
21 | } \ |
22 | } while (0) |
23 | #else |
24 | #define debugf(x) |
25 | #endif |
26 | |
27 | #if 1 |
28 | #define dump_R do { \ |
29 | if (debug) { \ |
30 | printf("#> PC: %04x A:%02x P:%02x X:%02x Y:%02x S:%02x\n", \ |
31 | R->PC.W, R->A, R->P, R->X, R->Y, R->S ); \ |
32 | } \ |
33 | } while (0) |
34 | #else |
35 | #define dump_R |
36 | #endif |
37 |
ViewVC Help | |
Powered by ViewVC 1.1.26 |