section .data
fmtInt db "%d", 0
fmtDouble db "%lf", 0
fmtOut db "%d ", 0
section .bss
N resd 1
i resd 1
L resq 1
R resq 1
T resq 1
section .text
global main
extern scanf
extern printf
main:
push ebp
mov ebp, esp
; scanf("%d", &N)
push N
push fmtInt
call scanf
add esp, 8
; scanf("%lf", &L)
push L
push fmtDouble
call scanf
add esp, 8
; scanf("%lf", &R)
push R
push fmtDouble
call scanf
add esp, 8
mov dword [i], 0
.loop:
mov eax, [i]
cmp eax, [N]
jge .finish
; scanf("%lf", &T)
push T
push fmtDouble
call scanf
add esp, 8
; Проверка T < L
fld qword [T]
fld qword [L]
fcomip st0, st1
fstp st0
ja .print_index
; Проверка T > R
fld qword [T]
fld qword [R]
fcomip st0, st1
fstp st0
jb .print_index
jmp .next
.print_index:
push dword [i]
push fmtOut
call printf
add esp, 8
.next:
inc dword [i]
jmp .loop
.finish:
xor eax, eax
leave
ret