Re: [cc65] Question on 1351 mouse

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-01-31 13:03:35
Hi,

Just a small follow-up...

This is the code I introduced in Contiki:

-----------------------------------------------------------------------------------

static char key;

unsigned char
c64_kbhit(void)
{
  if (!kbhit()) {
    return 0;
  }
  key = cgetc();
  if (key == 0xA0) {
    key == 0x00;
    return 0;
  }
  return 1;
}

char
c64_cgetc(void)
{
  while (!key) {
    key = cgetc();
    if (key == 0xA0) {
      key == 0x00;
    }
  }
  return key;
}

-----------------------------------------------------------------------------------

Quite ugly, isn't it?

Best, Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jan 31 13:03:41 2010

This archive was generated by hypermail 2.1.8 : 2010-01-31 13:03:43 CET