My TASM is mounted to the folder where my my TASM, TLINK, and files are. Specifically it is at C:/TASM/BIN
. I have no problems when running a single .asm file but when I include an another file so that my code would look modular, there comes this problem.
I have included 6 files as of now which includes printMzpos1.kt
. (File extension doesn't matter in assembly file inclusion.) The name of my main file is c.asm
. The image shows that printMzpos1.kt
is in the folder where my TASM is mounted:
Here is the snapshot of my code. I included printMzpos1.kt
after main endp
and before end main
. printMzpos1.kt
contains a procedure that prints boxes.
.model small
.386
.stack 64
.data
colorW db 0Fh
xPos dw ?
currmode db ?
horLineLen dw 120
verLineLen dw 70
include macro.kt
.code
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
MAIN proc far
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
mov ax, @data
mov ds, ax
mov es, ax
setVidMode
cls
call printMzPos1
;call move3Boxes
retVidMode
mov ax, 4c00h
int 21h
MAIN endp
include printMzPos1.kt
include printMzPos2.kt
include printMzPos3.kt
include printMzPos4.kt
include drawRect.kt
include move3Boxes.kt
end MAIN
Though I think I included it properly, I still get this:
**Fatal** c.ASM(39) Can't locate file: printMzPos1.kt
What went wrong?
The name
printMzPos1.kt
is too long. DOSBox and TASM accept only 8.3-names. Type inDIR
in DOSBox (orDIR /X
in Windows) and you see something likePRINTM~1.KT
. This is the 8.3-name of printMzPos1.kt and this you must use. You see probably several PRINTM~X.KT files. So you have to search which of these names correlates to which of your names. The '~X' is only a sequential number created by the operating system for uniqueness.You can also just rename the files to shorter names so that they fit in the 8.3-limit.