summaryrefslogtreecommitdiff
path: root/com32/modules/hello.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/modules/hello.c')
-rw-r--r--com32/modules/hello.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/com32/modules/hello.c b/com32/modules/hello.c
index bcb018d9..aea8766b 100644
--- a/com32/modules/hello.c
+++ b/com32/modules/hello.c
@@ -17,11 +17,25 @@
* Hello, World! using libcom32
*/
+#include <string.h>
#include <stdio.h>
+#include <console.h>
int main(void)
{
+ char buffer[1024];
+
+ openconsole(&dev_stdcon);
+
printf("Hello, World!\n");
+ for (;;) {
+ printf("> ");
+ fgets(buffer, sizeof buffer, stdin);
+ if ( !strncmp(buffer, "exit", 4) )
+ break;
+ printf(": %s", buffer);
+ }
+
return 0;
}