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

16 lines
231 B
C++
Raw Permalink Normal View History

2020-06-07 19:06:05 +04:00
#include <cstdio>
#include <unistd.h>
int main()
{
2020-06-07 19:06:05 +04:00
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;
}