问题描述
我的TASM安装到我的我的TASM,TLINK,和文件夹。特别是在 C:/ TASM / BIN
。我没有问题,运行单个.ASM文件时,但是当我包括另一个文件中,这样我的code看起来模块化,总会有这个问题。
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.
我已经包括6个文件,截至目前,包括 printMzpos1.kt
。 (文件扩展名并不重要组件文件包含)。我的主要文件的名称是 c.asm
。上图显示的 printMzpos1.kt
是我的TASM安装文件夹中:
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:
下面是我的code的快照。我包括 printMzpos1.kt
在主要ENDP
和前结束主
。 printMzpos1.kt
包含打印盒的过程。
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
出了什么问题?
推荐答案
名称 printMzPos1.kt
过长。 DOSBox中和TASM只接受的。 DIR
在DOSBox中键入(或 DIR / X
在Windows中),你看到的东西像 PRINTM〜1.KT
。这是printMzPos1.kt的8.3名,这必须使用。你可能看到几个PRINTM〜X.KT文件。所以你要搜索的这些名字关联到你的名字。的'〜X'是仅由操作系统唯一性创建的顺序号。
The name printMzPos1.kt
is too long. DOSBox and TASM accept only 8.3-names. Type in DIR
in DOSBox (or DIR /X
in Windows) and you see something like PRINTM~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.
您也可以直接将文件,使它们适合在8.3限重命名为较短的名称。
You can also just rename the files to shorter names so that they fit in the 8.3-limit.
这篇关于汇编程序无法找到现有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!