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.
35 lines
321 B
NASM
35 lines
321 B
NASM
extern scanf
|
|
extern printf
|
|
|
|
global main
|
|
|
|
section .text
|
|
main:
|
|
push y
|
|
push x
|
|
push nya
|
|
call scanf
|
|
add esp, 12
|
|
|
|
mov eax, [x]
|
|
cmp eax, [y]
|
|
jle end
|
|
mov eax, [y]
|
|
|
|
end:
|
|
push eax
|
|
push nya1
|
|
call printf
|
|
add esp, 8
|
|
|
|
xor eax, eax
|
|
ret
|
|
|
|
section .data
|
|
nya db "%d %d", 0
|
|
nya1 db "%d", 10, 0
|
|
|
|
section .bss
|
|
x resd 1
|
|
y resd 1
|