sbit       MS_CLK       =    P4^3;
sbit       MS_DTA       =    P3^7;


#define    MS_POWER_ON           0x00
#define    MS_WAIT               0x01
#define    MS_RESET              0x02
#define    MS_SET_SAMPLE_RATE_C8 0x03
#define    MS_SET_DECIMAL_C8     0x04
#define    MS_SET_SAMPLE_RATE_64 0x05
#define    MS_SET_DECIMAL_64     0x06
#define    MS_SET_SAMPLE_RATE_50 0x07
#define    MS_SET_DECIMAL_50     0x08
#define    MS_OK                 0x09


typedef struct
   { BYTE Act;
     BYTE Stage;
     BYTE Busy;
     BYTE TimeOut;
     BYTE Index;
     BYTE Data[4];
   } MOUSE;