source: soft/giet_vm/hello/main.c @ 204

Last change on this file since 204 was 199, checked in by alain, 12 years ago

Introducing the "idle" to improve the exit mechanism.

File size: 365 bytes
Line 
1#include "stdio.h"
2
3__attribute__((constructor)) void main()
4{
5        char                byte;
6    unsigned int        proc = giet_procid();
7    unsigned int*       illegal = 0xFFFFFFF0;
8
9        while (1)
10        {
11                giet_tty_printf(" hello from processor %d\n", proc);
12        giet_tty_getc((void*)&byte);
13        if ( byte == 'q' ) giet_exit();
14        if ( byte == 'x' ) *illegal = 1;
15        }
16} // end main
17
Note: See TracBrowser for help on using the repository browser.