News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Help: Unresolved symbol

Started by Joel7, April 29, 2014, 04:52:23 AM

Previous topic - Next topic

Joel7

Hello MASM32 forum
I have two .asm files with procedures and I'm trying to call from different asm file:

file1.asm ( Entry )

.586
include masm32rt.inc
.code
start:
        call MyProc
push eax
call ExitProcess

end start


file2.asm

include masm32rt.inc

.code
n1 proc
mov eax,10
ret

n1 endp
end



Also, I don't want to use invoke method I prefer using push/Call instructions how can I do it?
plus noticed that the use of a '@X' is needed in the procedure declaration then in the code:

push 0
Call Procedure@X

How can I do it without that? I really don't like...
Thanks!

gelatine1

This code compiles and gets linked without problem except it doesn't get executed very well...
Maybe it can help you anyway: (file1 and file2 are in the same folder)

File1.asm:


.586
include \masm32\include\masm32rt.inc
include file2.asm
.code
start:
    call n1
push eax
call ExitProcess

end start


file2.asm

.code
strt:
n1 Proc

mov eax,10
ret

n1 ENDP
end strt

Joel7

Quote from: gelatine1 on April 29, 2014, 06:40:14 AM
This code compiles and gets linked without problem except it doesn't get executed very well...
Maybe it can help you anyway: (file1 and file2 are in the same folder)

File1.asm:


.586
include \masm32\include\masm32rt.inc
include file2.asm
.code
start:
    call n1
push eax
call ExitProcess

end start


file2.asm

.code
strt:
n1 Proc

mov eax,10
ret

n1 ENDP
end strt

Yeah, You are right
I learned that RadAsm doesn't was assembling all asm files, thanks!