Subversion Repositories Kolibri OS

Rev

Rev 8632 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. #include <shell_api.h>
  2. #include <ksys.h>
  3. #include <stdio.h>
  4.  
  5. int main(int argc, char**argv)
  6. {  
  7.     debug_printf("%u\n", shell_get_pid());
  8.     char string[256];
  9.     shell_cls();
  10.     shell_printf("Number of arguments %d\n",argc);
  11.     for(int i=0; i<argc; i++){
  12.         shell_printf("argv[%d]=%s\n", i, argv[i]);
  13.     }
  14.     shell_puts("This is a test console application for Shell\n\r");
  15.     shell_puts("Type a string (255 symbols max): ");
  16.     shell_gets(string);
  17.     shell_puts("You typed:\n\r");
  18.     shell_puts(string);
  19.     shell_puts("Press any key: ");
  20.     string[0] = shell_getc();
  21.     shell_puts("\n\rYou pressed: ");
  22.     shell_putc(string[0]);
  23.     shell_exit();
  24. }
  25.