1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-23 18:06:20 +04:00
osblog/risc_v/userspace/shell.cpp
2020-06-07 11:06:05 -04:00

16 lines
231 B
C++

#include <cstdio>
#include <unistd.h>
int main()
{
printf("Started shell.\n");
char data[100];
while (1) {
printf("Enter value: ");
int r = read(0, data, 100);
if (r > 0) {
printf("Got %s\n", data);
}
}
return 0;
}