Is there any possibility to use RET function to go back from the conditional statement to the main function (_start) where it was called from and go on with the next instructions?
Right now, it’s just causing a segmentation fault beacuse it is not setted in the stack.
If not, what is the best approach to perform if jumps in asm? Am i supposed to write jmp _cont at the end of the if statement instead of ret and then go on with the instructions in _cont?
section .data
a dq 222
b dq 333
section .text
global _start
_start:
mov rax, [a]
mov rbx, [a]
cmp rax, rbx
je ifstatement1
//desired return point
mov rax, [b]
call _printInt
mov eax, 60
xor edi, edi
syscall
ifstatement1:
mov rax, [a]
call _printInt
ret
3