source:
soft/giet_vm/apps/hello/main.c
@
162
| Last change on this file since 162 was 160, checked in by , 13 years ago | |
|---|---|
| File size: 450 bytes | |
| Rev | Line | |
|---|---|---|
| [160] | 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.
![(please configure the [header_logo] section in trac.ini)](/trac/giet-vm/chrome/site/your_project_logo.png)