nihonium
/
mipt_clang
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

45 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