diff options
| author | Miguel <m.i@gmx.at> | 2018-10-14 22:36:16 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-10-14 22:36:16 +0200 |
| commit | 2a6690e9fd53a02613796764248006e06ac482d6 (patch) | |
| tree | ea3063ef3ecd0808e9291faf6c56949d91b1b09e /userspace/echoapp.c | |
| parent | 5aeab1c853e487aa0042d5c32200d623efe908d3 (diff) | |
ported vim et al
Diffstat (limited to 'userspace/echoapp.c')
| -rw-r--r-- | userspace/echoapp.c | 17 |
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; + } +} + |
