Hi, my problem is I have to do a multifile project for homework.
I have some information about how to do this. But I have a problem, It doesn't work in my program. I didn't find anything about it on the Internet so I ask you here.7

I'm working with HiEditor and TASM 4.1

The information is in Spanish but I'll try to translate it:


The procedure X is codified as a module contained in a file called function1.asm. This procedure is declared public and it's defined in the segment "f1"

public X
f1 SEGMENT 'code'
ASSUME CS:f1

X PROC FAR ; Codificación
------------------------ CODE
X ENDP
f1 ENDS
END

To use the previous procedure in other modules (for example, the main program), it has to be declared as EXTERN.

extern X:far
CALL X



That previous part works OK



At last, if the program consist of several modules (function1.asm, function2.asm & function3.asm), the executable prog.exe is obtained by:
TASM function1.asm
TASM function2.asm
TASM function3.asm

It will produce the object files (function1.obj, function2.obj, function3.obj). The obtaining of the executable is made by the link of the 3 object files
TLINK funcion1.obj funcion2.obj funcion3.obj prog.exe


I didn't know what to do with this. I don't know what option means! .___.
I write it in the main and I saw it didn't work so I used "include function1.asm", "include function2.asm" and so on...

That seemed to work but there's a problem left, The other procedures cannot see the variables of main.

Can I create a data segment for all files? in each file and pass them through stack?

If that's a tough solution, please, suggest me something easier. I don't know much about ASM.


Thanks for all
Posted on 2012-07-13 05:59:30 by Javain
hi,
1) how about the tasm-documentation
2)your prog.exe has only the three procedures
3)in your case what is main?
Posted on 2012-07-16 03:30:32 by aw48
I think multifile project simply refers to "includes" (possibly also "libs").

Posted on 2012-07-16 04:25:37 by Homer