The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Don57 on June 13, 2008, 07:37:46 PM

Title: Calling Procs in other Modules
Post by: Don57 on June 13, 2008, 07:37:46 PM
Module_1                                             

.DATA?                                         
Test_Data  dd ?                               
PUBLIC Test_Data

.CODE                                         

WinMain proc ....                           

      mov Test_Data, 1                       
                                                       
      CALL Test_Sub                           
      ....                                                                                                                                             
ret
                                                   
WinMain endp
end





Module _2

.DATA?

EXTERNDEF  Test_Data:DWORD

.CODE

Test_Sub proc

  mov  eax, Test_Data
  nop
  nop
  nop
  nop
  ret
 
Test_Sub endp

end

This assembled and linked alright, but when I run it there is no address for Test_Sub. The program CALLs 0000 0000. I'm assuming that I haven't designated Test_Sub properly?
Title: Re: Calling Procs in other Modules
Post by: lingo on June 13, 2008, 10:01:34 PM
 :wink