Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

assembly - Assembler can't locate existing files

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:

enter image description here

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

enter image description here

What went wrong?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

You can also just rename the files to shorter names so that they fit in the 8.3-limit.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...