Hello Stressful,
You're right about my not being sufficiently specific. As a matter of fact, I'm running 32 bit linux and compiling therefore an elf32 file, not win64. Apologies are in order.
As a matter of fact, I later worked out how to do what I wanted to achieve. Here is the solution for the call to the libm log function:
;math.s. A NASM program that calls several functions in the C math library <math.h>
SEGMENT .data
input dq 25.0
SEGMENT .bss
double resq 1
SEGMENT .text
global _start
extern log
extern sqrt
_start:
nop
finit
fld qword [input]
fstp qword [double]
lea esi, [double]
sub esp, 8
lea edi, [esp]
mov ecx, 8
rep movsb
call log
fstp qword [esp]
add esp, 4
mov eax, 1
mov ebx, 0
int 0x80
There are probably a half dozen better solutions, but this has the virtue of my being able to understand what's happening.
Regards,
Mark Allyn