#pragma On(286);
#pragma On(Codeview);
#pragma On(Literals_in_code);
#pragma On(Const_in_code);
#pragma On(Read_only_strings);

volatile char Cmd_Input;
char Msg_Dest[0x20];

void Write_Msg (const char *s)
{
   char *Dest_Ptr;

   Dest_Ptr = Msg_Dest;
   while (*s != '\0')
   {
      *Dest_Ptr = *s;
      Dest_Ptr++;
      s++;
   }
}

void main ()
{
   char c;
   const char Msg_A[] = "Command A Entered               ";
   const char Msg_B[] = "Entered B Command               ";
   const char Msg_I[] = "Invalid Command                 ";

   for (;;)
   {
      Cmd_Input = '\0';
      while ((c = Cmd_Input) == '\0');
      switch (c) {
         case 'A' :
            Write_Msg (Msg_A);
            break;
         case 'B' :
            Write_Msg (Msg_B);
            break;
         default :
            Write_Msg (Msg_I);
            break;
      }
   }
}
