return value
From: elekis (elekis_at_gawab.com)
Date: 04/14/04
- Next message: Michal Janeczek: "Re: Extremely slow SSE code on Athlon XP"
- Previous message: Siberian Husky: "Question on memcpy() -- 64k aliasing"
- Next in thread: pacman128_at_hotmail.com: "Re: return value"
- Reply: pacman128_at_hotmail.com: "Re: return value"
- Reply: Tim Roberts: "Re: return value"
- Reply: Ro : "Re: return value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 14 Apr 2004 17:49:14 +0000 (UTC)
hi
I m learning asm with nasm and I have some prob whith the value return
if I have that in a file.asm
mov eax [ebp+8]
mov ebx [ebp+12]
pusha
push eax
push ebx
call getAndSetIndiceASM
pop eax
pop ebx
popa
and in a other file.asm wher find the getAndSetIndiceASM function
CPU 386
GLOBAL mainASM
getAndSetIndiceASM:
push ebp
mov ebp, esp
mov eax [ebp+8]
mul dword [ebp+12]
mov esp, ebp
pop ebp
ret
PS that code is very stupid , it 'just to learn something and test linking.
my question is how can I do to have eax (the value return of the
getAndSetIndiceASM function) in after the call getAndSetIndiceASM
where must I put that value return . if I push in the stack, he will be
invisible because there is a mov esp ebp, . IF I leave in eax, the popa
eax and the popa destroy the value.
So how can i have a return value of the assembler function in other
assembler fonction.
merci
a++
- Next message: Michal Janeczek: "Re: Extremely slow SSE code on Athlon XP"
- Previous message: Siberian Husky: "Question on memcpy() -- 64k aliasing"
- Next in thread: pacman128_at_hotmail.com: "Re: return value"
- Reply: pacman128_at_hotmail.com: "Re: return value"
- Reply: Tim Roberts: "Re: return value"
- Reply: Ro : "Re: return value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|