Last change
on this file since 643 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
472 bytes
|
Rev | Line | |
---|
[444] | 1 | #include <stdio.h> |
---|
| 2 | |
---|
| 3 | static void |
---|
| 4 | send_msg1 (void) |
---|
| 5 | { |
---|
| 6 | static char msg[] = "Hello World\r\n"; |
---|
| 7 | write(1, msg, strlen (msg)); |
---|
| 8 | } |
---|
| 9 | |
---|
| 10 | static void |
---|
| 11 | send_msg2 (void) |
---|
| 12 | { |
---|
| 13 | static char msg[] = "Goodnight Irene\r\n"; |
---|
| 14 | write(1, msg, strlen (msg)); |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | static void |
---|
| 18 | delay (void) |
---|
| 19 | { |
---|
| 20 | int i; |
---|
| 21 | |
---|
| 22 | for (i = 0; i < 1000000; i++) |
---|
| 23 | ; |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | int |
---|
| 27 | main(int argc, char *argv[]) |
---|
| 28 | { |
---|
| 29 | int i, j; |
---|
| 30 | for (i = 0; i < 10; i++) |
---|
| 31 | { |
---|
| 32 | send_msg1 (); |
---|
| 33 | delay (); |
---|
| 34 | send_msg2 (); |
---|
| 35 | } |
---|
| 36 | return 0; |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.