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

11 lines
159 B
C++
Raw Normal View History

#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;
}