I'm trying to increase the heap size by 100 by changing the brk and I don't know why my code doesn't work.
Here is the part of the code that tries do it:
movq $0, %rdi
movq $12, %rax
syscall
movq %rax, InicialHeap
movq InicialHeap, %rsi
mov $str, %rdi
call printf
movq $100, %rdi
movq $12, %rax
syscall
movq %rax, %rsi
mov $str, %rdi
call printf
movq InicialHeap, %rdi
movq $12, %rax
syscall
movq InicialHeap, %rsi
mov $str, %rdi
call printf
movq $60, %rax
syscall
The program should print something like:
x (print InicialHeap)
x + 100 (print InicialHeap + 100)
x (print InicialHeap)
But it only prints 3 times the same result "x".
What do I have to do to increase my heap size?