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