Commit e1516964 authored by Stefan Lankes's avatar Stefan Lankes

convert example to 64 bit

parent 5010b690
Pipeline #155163 passed with stages
in 1 minute and 28 seconds
......@@ -10,13 +10,13 @@ extern void __data_start;
int main(int argc, char** argv)
{
unsigned int esp;
size_t rsp;
int* heap = (void*) malloc(sizeof(int));
asm volatile("mov %%esp, %0" : "=r"(esp));
asm volatile("mov %%rsp, %0" : "=r"(rsp));
printf("Main:\t%p\n", main);
printf("Stack:\t0x%x\n", esp);
printf("Stack:\t0x%zx\n", rsp);
printf("Data:\t%p\n", &__data_start);
printf("Heap:\t%p\n", heap);
printf("BSS:\t%p\n", &__bss_start);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment