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...
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;
thanks...
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
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
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.
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"
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
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
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
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
My 16 bit programs are made using Tasm in case that makes a difference.
Later dudes,
Andy
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.....
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:
No need to be scared.
Take some deep breaths.
Andy
As far as XP is concerned, long file name progs do NOT work, both Masm and Tasm produced.
And using Senor Dave's code.
C:\16_BIT>longmasm7.com
Bad Command or file name
C:\16_BIT>
Hi,
Works here with Windows 98, Windows 2000, and Windows XP.
G:\WORK>COPY TEST44.COM BLABLABLABLA.COM
1 file(s) copied.
G:\WORK> BLABLABLABLA
G:\WORK\BLABLA~1.COM
G:\WORK>
Steve
IIRC, the NTVDM supports LFNs, but XP's built-in DOS-Extender DOSX does not automatically translate those functions - which is a regression compared to Win9x. So it might be that some old DOS-extended programs ( i.e. Tasm ), which were written in the Win9X era, may indeed have problems with LFNs on XP.
it's a .COM (tiny) program
shouldn't matter which assembler is used, as it does not have a header
adding ".com" to the end of the commandline probably isn't helping, though
it may be a matter of xp version
i have xp mce2005 sp3, which is a "professional" edition of xp
it may not be the same on xp home editions
Hi,
I seem to recall from another thread that he has short filename
support turned off. That could hurt things like Dave's program.
Regards,
Steve N.
.model tiny
.code
org 100h
start:
mov ah, 09h ; write string to STDOUT
mov dx, 82h ; get command line
int 21h ; show it... ;-)
ret
end start
Commandline:
HelloWorldDOS.com And I told you that long filenames are fine on Win7-32....
Result:
And I told you that long filenames are fine on Win7-32.... ;)
Thanks Steve,
I temporarily re-enabled 8.3 name creation and the progs run.
http://support.microsoft.com/kb/121007
Why I turned it off.
The creation of 8.3 filenames and directories for all long filenames and directories on NTFS partitions may decrease directory enumeration performance.
It would be nice if I could actually test if performance did actually improve.
Andy
it would seem that the console is a 32-bit console window, until you run a 16-bit program under it
after that, it's a 16-bit console
so - i doubt you really want to optimize your system for 16-bit programs to run
Read this. Nothing to do with 16 bit programs.
http://support.microsoft.com/kb/121007
i read that
not sure how much difference it makes though
let me put it this way...
i haven't disabled 8.3 indexing on my machine, and i'm happy with the performance
not to say it couldn't be faster, of course
as for the per-instance console window
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 =>
something changed from before to after
it would seem that the console became "8.3 aware", only after a 16-bit program was executed
in the past, i have tried disabling indexing, altogether
performance improved, in some respects, but suffered in others
i no longer do that
Hi,
Quote from: dedndave on November 19, 2013, 03:45:05 AM
it would seem that the console is a 32-bit console window, until you run a 16-bit program under it
after that, it's a 16-bit console
Yes. As far as I can deduce, CMD.EXE runs COMMAND.COM to
support 16-bit programs. Run a program that lets you shell out
to a command line and run "MEM /D | MORE".
Regards,
Steve N.
shell - interesting notion, Steve
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Masm32\Asm16\16-Bit Templates => cmd /c blahblahblah
C:\MASM32\ASM16\16-BIT~1\BLAHBL~1.COM
C:\Masm32\Asm16\16-Bit Templates =>
so, if you want to run a 16-bit program without making it a 16-bit window :P
if you run command.com, it converts to 16-bit, but....
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Masm32\Asm16\16-Bit Templates => cmd /c command
Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.
C:\MASM32\ASM16\16-BIT~1 => ver
Microsoft Windows XP [Version 5.1.2600]
C:\MASM32\ASM16\16-BIT~1 => exit
C:\Masm32\Asm16\16-Bit Templates =>
cmd.exe gives a larger exe program size than command.com.
much larger, i suspect
but - command.com also requires NTVDM.dll