I have 2 files:
m2:
.model small
.stack 100h
.data
global print ;######4######
.code
main:
MOV AX, @data
MOV DS, AX
print proc ;expects information from DX
MOV AH,9
INT 21h
ENDP
MOV AH, 4ch
INT 21h
END main
m1:
.model small
.stack 100h
.data
str1 DB 'hello $'
.code
EXTRN print:far
main:
MOV AX, @data
MOV DS, AX
MOV DX, OFFSET str1
CALL print
MOV AH, 4ch
INT 21h
END main
I tried to figure out how to link the two files using this explanation but it is for NASM, while I am using TASM and I had a problem.
I linked both files, but while assembling m2 I got a warning :
global type doesn't match symbol : PRINT.
I tried to remove line 4 , but then I couldn't link m1, m2 and recieved a warning :
undefined symbol PRINT in module M1.ASM
I also tried to remove the keyword far
from the m1.asm file... no use either.
My question is how to remove the warning and be able to link the two files?