Subversion Repositories Kolibri OS

Rev

Rev 9207 | Details | Compare with Previous | Last modification | View Log | RSS feed

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