--- M6502/config.h 2007/08/01 15:53:54 81 +++ M6502/config.h 2007/08/01 21:40:17 82 @@ -10,3 +10,19 @@ // do we wont to dump registars? #define DUMP_R 1 +#if DEBUGF +#define debugf(x) do { \ + PerlIO_stdoutf("#> "); \ + PerlIO_stdoutf x ; \ + PerlIO_stdoutf("\n"); \ +} while (0) +#else +#define debugf(x) +#endif + +#if 1 +#define dump_R printf("# PC: %04x A:%02x P:%02x X:%02x Y:%02x S:%02x\n", R->PC.W, R->A, R->P, R->X, R->Y, R->S ); +#else +#define dump_R +#endif +