1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-24 02:16:19 +04:00
osblog/risc_v/userspace/shell.cpp
2020-05-29 19:34:48 -04:00

11 lines
159 B
C++

#include <printf.h>
#include <syscall.h>
int main()
{
unsigned long a;
asm volatile("mv %0, sp\n" : "=r"(a));
printf("Stack is at %p\n", a);
return 0;
}