summaryrefslogtreecommitdiff
path: root/userspace/echoapp.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-10-14 22:36:16 +0200
committerMiguel <m.i@gmx.at>2018-10-14 22:36:16 +0200
commit2a6690e9fd53a02613796764248006e06ac482d6 (patch)
treeea3063ef3ecd0808e9291faf6c56949d91b1b09e /userspace/echoapp.c
parent5aeab1c853e487aa0042d5c32200d623efe908d3 (diff)
ported vim et al
Diffstat (limited to 'userspace/echoapp.c')
-rw-r--r--userspace/echoapp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/userspace/echoapp.c b/userspace/echoapp.c
new file mode 100644
index 0000000..4ff75e6
--- /dev/null
+++ b/userspace/echoapp.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+int main()
+{
+ printf("echo app -- press Q to quit\n");
+
+ while(1)
+ {
+ uint8_t c;
+ _read(0,&c,1);
+ printf("%d",c);
+ fflush(stdout);
+
+ if(c=='q')break;
+ }
+}
+