3

My TASM is mounted to the folder where my TASM, TLINK, and other files are. Specifically it is at C:/TASM/BIN. I have no problems when running a single .ASM file but when I include 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?

Sep Roland
  • 33,889
  • 7
  • 43
  • 76
ellekaie
  • 337
  • 1
  • 7
  • 21
  • Why did you put your includes in TASM\BIN ? Put them in the same directory as c.asm. – Paul R Jun 03 '14 at 07:15
  • My `c.ASM` is also in the `TASM\BIN` where my included files are located. All my files for assembly programming are in that folder. – ellekaie Jun 03 '14 at 07:16
  • OK - I see now you mapped C to TASM\BIN - you really shouldn't be using that directory for user code but I don't think that's the cause of your problem. – Paul R Jun 03 '14 at 07:18
  • I'm using DOSBox btw, not my command prompt because Win 8 doesn't allow running 16-bit programs. The C: drive in my DOSbox is different from my PC's C: drive. – ellekaie Jun 03 '14 at 07:23
  • Yes, I saw that - I don't really know much about Windows and DOS, especially running ancient software like this, but I've fixed up the image links in your question and hopefully someone else who remembers this stuff from 20 years ago can help you. (BTW, are you sure it doesn't matter about the suffix for the include files ? I would try using .INC or .ASM and see if that helps.) – Paul R Jun 03 '14 at 07:30
  • Thank you! I'll try using those file extensions and see if it works. Edit: Still not working.. – ellekaie Jun 03 '14 at 07:33

1 Answers1

12

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.

rkhb
  • 14,159
  • 7
  • 32
  • 60