source: soft/giet_vm/apps/hello/main.c @ 160

Last change on this file since 160 was 160, checked in by karaoui, 12 years ago

giet-vm new version

File size: 450 bytes
Line 
1#include "stdio.h"
2
3__attribute__((constructor)) void main()
4{
5        unsigned int    i;
6        char                byte;
7    unsigned int        proc = procid();
8
9        for( i=0 ; i<1000 ; i++ )
10        {
11                if( tty_printf(" hello from processor %d\n", proc) )
12                {
13                        tty_puts("echec tty_printf\n");
14                        exit();
15                }
16        if( tty_getc_irq((void*)&byte) )
17        {
18                        tty_puts("echec tty_getc_irq\n");
19                        exit();
20                } 
21                if(byte == 'q') exit();
22        }
23        exit();
24
25} // end main
26
Note: See TracBrowser for help on using the repository browser.