/*
 * Debug stuff
 */
#ifdef DEBUG
#  include <stdio.h>
#  include <exec/types.h>
#  include <dos/dos.h>
#  include <proto/dos.h>
/*
 * This way to print debug output is is truely evil - if the handler process receives
 * a new packet from AmigaDOS during a Write() call, your machine will most probably
 * crash, but it was that easy to code...
 */
extern BPTR	diag;
extern UBYTE	dmsgbuff[256];
extern VOID Debug_DumpPacket(struct DosPacket *p);
#  define DMSG(s) Write(diag,(s),strlen(s))
#  define DMSG1(f,p1) {sprintf(dmsgbuff, f, p1);Write(diag, dmsgbuff, strlen(dmsgbuff));}
#  define BLINK 	*((UBYTE *)0xbfe001) ^= 2;
#  define LBUTTON	{while(*((UBYTE *)0xbfe001) & 0x40);while((*((UBYTE *)0xbfe001) & 0x40)==0);}
#else  /* DEBUG */
#define Debug_DumpPacket(x)
#  define DMSG(s)
#  define DMSG1(f,p1)
#  define BLINK
#  define LBUTTON
#endif /* DEBUG */
