Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  #include "../include/shell_api.h"
  2.  
  3. char string[256];
  4.  
  5. int main(){
  6.     shell_cls();
  7.     shell_printf("SHELL PID=%d\n\r", shell_get_pid());
  8.    
  9.     shell_puts("This is a test console application for Shell\n\r");
  10.     shell_puts("Type a string (255 symbols max): ");
  11.  
  12.     shell_gets(string, 255);
  13.     shell_printf("You typed: %s\n\r", string);
  14.    
  15.     shell_puts("Press any key: ");
  16.     string[0] = shell_getc();
  17.     shell_printf("\n\rYou pressed: %c", string[0]);
  18.     shell_exit();
  19.     return 0;
  20. }