I'm trying to duplicate the code, and its execution, in my post from June 08, 2021, 10:29:54 PM, the one that gave G ABCDEFG. In that I compiled krot8left64.asm, eliminating the need for INHALT, so I must have changed your rot8left64.asm to krot8left64.asm, and its call from fortran to krot8left64, as below. But now the link step fails and I'm failing to see why. Your code is as it was in that post, except for the addition of the "K". Do
you see a problem?
;;;;;;;;;;;;;;;;;;;;;
100 FORMAT(A8)
READ(*,100) LW
WRITE(*,100) LW
MW=KROT8LEFT64(LW)
WRITE(*,100) MW
END
;;;;;;;;;;;;;;;;;;;;;
bits 32 ; to be sure.
struc krot8left64_stk
resd 1
.ptr: resd 1
endstruc
global krot8left64_
rot8left64_:
mov eax,[esp+krot8left64_stk.ptr] ; get pointer
mov edx, [eax+4] ; get QWORD from pointer.
mov eax, [eax]
mov ecx,edx
shld edx,eax,8
shld eax,ecx,8
ret
;;;;;;;;;;;;;;;;;;;;;
mrice@debian10-uni:~$ nasm -f elf krot8left64.asm
mrice@debian10-uni:~$ gfortran -c -fdefault-integer-8 -fdefault-real-8 -fno-range-check test.f95 -o test.o
mrice@debian10-uni:~$ gfortran test.o krot8left64.o -o test
/usr/bin/ld: test.o: in function `MAIN__':
test.f95:(.text+0x115): undefined reference to `krot8left64_'
collect2: error: ld returned 1 exit status
mrice@debian10-uni:~$