Q:

Compare string without calling function in assembly?

Say I have two strings, I want to compare the string but don't want to call another function for true or false:
mov rsi, 0x4141414141414141
mov rdi, 0x6161616161616161
cmp rsi, rdi
// if true do here
// otherwise do here
// jmp back_up_to_cmp rsi, rdi

The problem I have is that, I cannot call a function for either true or false. So, is there anyway to achieve my expectation?

A:

As pointed by @fuz, I could use relative jump to achieve what I wanted:
working complete code:
SECTION .text
global main

main:
mov rax, 1
mov rsi, 0x203e7475706e49
push rsi
mov rsi, rsp
mov rdx, 7
syscall

mov rax, 0
mov rdi, 0
mov rsi, rsp
mov rdx, 256
syscall

mov rax, 1
mov rsi, rsp

xor rdx, rdx
cmp byte [rsi + rdx], 0x0a
jz 0xc
inc rdx
jmp -0xe

syscall

mov rax, 60
syscall

I looked at the location in which my cmp was located at, calculated the difference and used the jmp to jump to that location:
0x0000000000001130 <+0>:     mov    $0x1,%eax
0x0000000000001135 <+5>:     movabs $0x203e7475706e49,%rsi
0x000000000000113f <+15>:    push   %rsi
0x0000000000001140 <+16>:    mov    %rsp,%rsi
0x0000000000001143 <+19>:    mov    $0x7,%edx
0x0000000000001148 <+24>:    syscall 
0x000000000000114a <+26>:    mov    $0x0,%eax
0x000000000000114f <+31>:    mov    $0x0,%edi
0x0000000000001154 <+36>:    mov    %rsp,%rsi
0x0000000000001157 <+39>:    mov    $0x100,%edx
0x000000000000115c <+44>:    syscall 
0x000000000000115e <+46>:    mov    $0x1,%eax
0x0000000000001163 <+51>:    mov    %rsp,%rsi
0x0000000000001166 <+54>:    xor    %rdx,%rdx
0x0000000000001169 <+57>:    cmpb   $0xa,(%rsi,%rdx,1)
0x000000000000116d <+61>:    je     0x117b <main+75>
0x0000000000001173 <+67>:    inc    %rdx
0x0000000000001176 <+70>:    jmpq   0x1169 <main+57>
0x000000000000117b <+75>:    syscall 
0x000000000000117d <+77>:    mov    $0x3c,%eax
0x0000000000001182 <+82>:    syscall 
0x0000000000001184 <+84>:    nopw   %cs:0x0(%rax,%rax,1)
0x000000000000118e <+94>:    xchg   %ax,%ax

So no more functions :) Thank you @fuz

