static char *mem2hex (char *, char *, int);
static char *hex2mem (char *, char *, int);
static int hexToInt (char **, int *);
-static unsigned char *getpacket (unsigned char *);
+static unsigned char *getpacket (void);
static void putpacket (char *);
static void handle_buserror (void);
static int computeSignal (int exceptionVector);
stepData instrBuffer;
char stepped;
static const char hexchars[] = "0123456789abcdef";
-char remcomInBuffer[BUFMAX];
-char remcomOutBuffer[BUFMAX];
+static char remcomInBuffer[BUFMAX];
+static char remcomOutBuffer[BUFMAX];
char highhex(int x)
{
/* scan for the sequence $<data>#<checksum> */
char *
-getpacket (buffer)
- char *buffer;
+getpacket ()
{
+ unsigned char *buffer = &remcomInBuffer[0];
unsigned char checksum;
unsigned char xmitcsum;
int count;
while (1)
{
remcomOutBuffer[0] = 0;
- ptr = getpacket (remcomInBuffer);
+ ptr = getpacket ();
switch (*ptr++)
{
mem2hex ((char *) registers, remcomOutBuffer, NUMREGBYTES);
break;
case 'G': /* set the value of the CPU registers - return OK */
- hex2mem (&ptr, (char *) registers, NUMREGBYTES);
+ hex2mem (ptr, (char *) registers, NUMREGBYTES);
strcpy (remcomOutBuffer, "OK");
break;