1 |
dpavlin |
112 |
// 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 |
|
|
#define CACHE_SIZE 0xffff |
11 |
|
|
|
12 |
|
|
void push_R(void); |
13 |
|
|
void pull_R(void); |
14 |
|
|
|
15 |
|
|
extern int debug; |
16 |
|
|
|
17 |
|
|
#if DEBUGF |
18 |
|
|
#define debugf(x) do { \ |
19 |
|
|
if (debug) { \ |
20 |
|
|
PerlIO_stdoutf("#> "); \ |
21 |
|
|
PerlIO_stdoutf x ; \ |
22 |
|
|
PerlIO_stdoutf("\n"); \ |
23 |
|
|
} \ |
24 |
|
|
} while (0) |
25 |
|
|
#else |
26 |
|
|
#define debugf(x) |
27 |
|
|
#endif |
28 |
|
|
|
29 |
|
|
#if 1 |
30 |
|
|
#define dump_R do { \ |
31 |
|
|
if (debug) { \ |
32 |
|
|
printf("#> "\ |
33 |
|
|
"AF:%04x BC:%04x DE:%04x HL:%04x IX:%04x IY:%04x PC:%04x SP:%04x | " \ |
34 |
|
|
"AF1:%04x BC1:%04x DE1:%04x HL1:%04x | " \ |
35 |
|
|
"IFF: %02x I: %02x R: %02x | " \ |
36 |
|
|
"IPeriod:%d ICount:%d IRequest:%02x IAutoReset:%02x TrapBadOps:%d Trap:%d Trace:%d" \ |
37 |
|
|
"\n", \ |
38 |
|
|
R->AF,R->BC,R->DE,R->HL,R->IX,R->IY,R->PC,R->SP, \ |
39 |
|
|
R->AF1,R->BC1,R->DE1,R->HL1, \ |
40 |
|
|
R->IFF,R->I,R->R, \ |
41 |
|
|
R->IPeriod,R->ICount,R->IRequest,R->IAutoReset,R->TrapBadOps,R->Trap,R->Trace \ |
42 |
|
|
); \ |
43 |
|
|
} \ |
44 |
|
|
} while (0) |
45 |
|
|
#else |
46 |
|
|
#define dump_R |
47 |
|
|
#endif |
48 |
|
|
|