Archived
1
0
Fork 0
This repository has been archived on 2022-06-20. You can view files and clone it, but cannot push or open issues or pull requests.
mipt_clang/nasm/G64.asm
nihonium 402d412e92
G64
2022-03-30 22:13:33 +03:00

44 lines
487 B
NASM

global main
extern scanf
extern printf
section .text
main:
; scanf
sub rsp, 8
mov rdi, nya
mov rsi, x
mov rdx, y
call scanf wrt ..plt
add rsp, 8
; comparsion
mov rax, qword [rel x]
add rax, [rel y]
jb meow
push rbp
mov rdi, no
call printf wrt ..plt
pop rbp
jmp end
meow:
push rbp
mov rdi, yes
call printf wrt ..plt
pop rbp
end:
xor rax, rax
ret
section .data
nya dq "%llu %llu", 0
yes db "YES", 10, 0
no db "NO", 10, 0
section .bss
x resq 1
y resq 1