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
345 B
NASM
35 lines
345 B
NASM
global main
|
|
extern scanf
|
|
extern printf
|
|
|
|
section .text
|
|
main:
|
|
|
|
push y
|
|
push x
|
|
push scan
|
|
call scanf
|
|
add esp, 12
|
|
|
|
fld tword [x]
|
|
fld tword [y]
|
|
fdiv
|
|
|
|
sub esp, 12
|
|
fstp tword [esp]
|
|
push nya
|
|
call printf
|
|
add esp, 16
|
|
xor eax, eax
|
|
ret
|
|
|
|
section .data
|
|
scan db "%llf%llf", 0
|
|
nya db "%llf", 10, 0
|
|
|
|
section .bss align=16
|
|
x rest 1
|
|
resw 1
|
|
y rest 1
|
|
|