News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

what is the maximum length of masm 16 file Name

Started by Ehsanullah, November 10, 2013, 01:07:18 AM

Previous topic - Next topic

Ehsanullah

Hi,

in one of my lab task i name my masam file like : "Lab1_Question_1.ams" (which is 15 character long  :biggrin: ) when i assembled that file using make16 it gave this error LINK:fatal error L1093 object not found. but when i renamed the file into lab1q1.asm then it assembled the file. Here i must mention that i didn't bring any changing in the code ;Not a single character was changed..

so my question is that is there a limitation in file name length of masm?
If yes then what is the maximum length?
and which characters should be avoided while naming a file..

Thank you...

jj2007

Just tried to build a 16-bit app with a long name, and it works with RichMasm, even with the old 6.14 assembler. What is make16, a batch file?

If the problem persists, use these two lines in your batch file:
\masm32\bin\ml /c %1.asm
\masm32\bin\Link16 %1.obj;


Tedd

DOS file names were limited to 8 characters for the 'name,' plus 3 more for the file-type extension.
Valid characters were limited to: ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$%'-_@~`!(){}^#&
And that's all; no lower case, no spaces, no other characters. (Lowercase is automatically converted to upper.)

That was 'old' DOS, and those names should be safe and valid.
However, various attempts at extending compatibility were added to the 'new' DOS functions in Windows, which should allow for most programs to still work correctly with 'long' file names (a 'short' 8+3 file name is automatically generated.) So that may or may not be your problem :P

Potato2

Rockphorr

length of path returned by get_current_folder of int 21h is 40h
length of file name is 0Ch
length of first <drive_name>:\ is 3
length of last zero is 1

total required bytes are 3+40h+0Ch+1 to load something like

db c:\windows\command\edit.com
db 0

Magnum

I renamed a com file by a name greater than the 8 + 3 convention.

When run, it returned "Bad command."

Outta here,
                    Andy

But you can use a lot of extended characters in the filename to come up with many thousands of file name possibilities.
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

dedndave

seems to work here, Andy
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Masm32\Asm16\16-Bit Templates => blahblahblah
Hello World !

C:\Masm32\Asm16\16-BIT~1 =>


don't forget - if the path/file contains spaces, enclose it with "double quotes"

Gunther

Dave,

Quote from: dedndave on November 17, 2013, 11:59:56 AM
don't forget - if the path/file contains spaces, enclose it with "double quotes"

That's essential. The problem are the spaces.

Gunther
You have to know the facts before you can distort them.

Magnum

longsnowname.com does not run.

longname8.exe don't run on my system either.

Bad command or filename.

Wait a minute, it's a feature.  :t

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Magnum

Quote from: dedndave on November 17, 2013, 11:59:56 AM
seems to work here, Andy
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Masm32\Asm16\16-Bit Templates => blahblahblah
Hello World !

C:\Masm32\Asm16\16-BIT~1 =>


don't forget - if the path/file contains spaces, enclose it with "double quotes"

I found out that if you are infected with Stuxnet, long filename 16 bit exes run correctly.  :t

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

sinsi

Quote from: dedndave on November 17, 2013, 11:59:56 AM
seems to work here, Andy
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Masm32\Asm16\16-Bit Templates => blahblahblah
Hello World !

C:\Masm32\Asm16\16-BIT~1 =>


don't forget - if the path/file contains spaces, enclose it with "double quotes"
NTVDM shouldn't have a problem with a DOS program's long name but the program would (as would real DOS).
Dave, could you debug blahblahblah and look at the environment block? At the end should be the program name.
Wondering if it will be BLAHBL~1.EXE or blahblahblah.exe
🍺🍺🍺

Magnum

My 16 bit programs are made using Tasm in case that makes a difference.

Later dudes,
                    Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

dedndave

lemme see....
SymDeb (or Debug) doesn't like the long file name on the command line - understandable
but, i can make the code dump the string
give me a few minutes.....

dedndave

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Masm32\Asm16\16-Bit Templates => blahblahblah
C:\MASM32\ASM16\16-BIT~1\BLAHBL~1.COM

C:\Masm32\Asm16\16-BIT~1 =>

what i expected
notice the command prompt change   :P

        .MODEL  Tiny
        .386
        OPTION  CaseMap:None

;####################################################################################

        .CODE

;************************************************************************************

        ORG     100h

_main   PROC    NEAR

        mov     ds,ds:[2Ch]
        xor     si,si

loop00: lodsb
        or      al,al
        jnz     loop00

        lodsb
        or      al,al
        jnz     loop00

        mov     di,offset s$Msg
        add     si,2
        mov     dx,di
        jmp short loop02

loop01: stosb

loop02: lodsb
        or      al,al
        jnz     loop01

        mov     ax,0A0Dh
        stosw
        mov     al,24h
        stosb

        push    cs
        pop     ds
        mov     ah,9
        int     21h

        mov     ax,4C00h
        int     21h

_main   ENDP

;####################################################################################

s$Msg   db 1024 dup(0)

;####################################################################################

        END     _main

don't let Hutch see the code - it uses LODS/STOS   :lol:

Magnum

No need to be scared.

Take some deep breaths.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org