CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Posts
    18

    Can't call functions from different files

    Hi, I'm sorry if this question has been answered, I couldn't find it when I searched for it, and I suck at search engines.

    I have two assembly files, main.asm, and vid.asm, in vid.asm it has two global functions called blankw and display. main.asm has them listed as an extern, and when I try to call it, the program just shuts down. If I move the functions into the same file, then the program will work just fine.

    What am I doing wrong?

    I included main.asm and vid.asm, and main_and_vid.asm that has the two put togther

    Thanks,
    David
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2004
    Posts
    34

    Re: Can't call functions from different files

    I'm not familiar with the assembler you are using, but it seems to be a compiling/linking problem. Have you seen other examples of code using multiple modules written in your assembler syntax?

  3. #3
    Join Date
    May 2005
    Location
    Estonia
    Posts
    235

    Re: Can't call functions from different files

    davidguygc
    Comment out or remove the:
    Code:
    EXTERN blankw, display
    Then @ the end of main.asm (ie, the last: int 21h) add this line:
    Code:
    %include "vid.asm"
    Rate my post if i it was useful!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured