:roll:Does anyone know anything about long filename support in assembly. My first info came in print from microsoft and it said to point ds:dx at my DTA and int 21 func 1a, then point ds:dx at my null terminated filename and int 21 func 714E. this does not work. Someone else wrote and said that ES:DI point to where the name comes back, but I looked at every scrap of memory and couldn't find it anywhere. I really want to be able to use the OS (win98) for this since implementing my own lookup table means that any files sent from one machine to another must also be accompanied by their database entries(a cryptic fName followed by whatever the user wanted to name them.
Any help would be appreciated.
Posted on 2006-11-30 10:34:02 by Jeronimo0d0a

try API GetFullPathName. Could be that, what you looking for?

Posted on 2006-11-30 14:41:05 by Nordwind64
That's kind of what I'm looking for but my assembler doesn't have a "GetFullPathName." I'm forced to INT 21 FUNC 714E. It gets it, I just don't know where it puts it. And, by the way, thanks for answering.
Posted on 2006-12-01 09:01:24 by Jeronimo0d0a
well that api is a win32 api, so from your post im guessing you're using dos or something, hence the api not existing? if not, the api is from kernel32.dll GetFullPathName
Posted on 2006-12-01 14:21:44 by evlncrn8
Judging from this 'int 21h' stuff, I guess that you want a DOS function (actually, Windows DOES use long filenames, so there would be no problem if you coded under Win32).

That's not a winapi-related problem and I doubt anyone remembers how to get long filename under DOS xD I can tell you how to get long filename under my OS, though xD
Posted on 2006-12-01 15:55:10 by ti_mo_n
From the description in the original post, I would guess you would need to set the ES and DI registers to point to memory that YOU provide. The system will not generate that memory area for you.
Posted on 2006-12-01 17:31:11 by tenkey

That's kind of what I'm looking for but my assembler doesn't have a "GetFullPathName." I'm forced to INT 21 FUNC 714E. It gets it, I just don't know where it puts it. And, by the way, thanks for answering.


The file name is at offset 2Ch from the pointer in ES:DI, this function uses the FindData structure...

    Attributes DD  ; 00h
    CreateTime DQ ; 04h
    LastAccess DQ ; 0Ch
    LastModification DQ ; 14h
    FileSizeHigh DD ; 1Ch
    FileSizeLow DD ; 20h
    Reserved DB 8 DUP (?) ; 24h
    LongFileName DB 260 DUP (?) ; 2Ch
    ShortFileName DB 14 DUP (?) ; 130h

Note that it will not function unless IFSMgr is running and I don't believe it is supported below DOS 7.00.

Posted on 2006-12-01 20:09:43 by donkey
Donkeys right

mov ax,714E    ;Find 1st
int 21         ;matching entry
mov bx,ax
add di,2C

will get you there

You also need that mov bx,ax to get 714F entries if memory serves me.

The file string is null terminated.
You can view all that stuff on the ketman interpreter.
Posted on 2006-12-01 20:16:25 by eek
This is a great place for figuring out those lesser known interrupts.


and the one you want
Posted on 2006-12-01 21:10:03 by eek
I just wanted to say thanks to all who replied. The info and links were very helpful. By the way, the program is running in a DOS window under win98 which does support long filenames. I have figured out that if you put 'command' in the startup folder you can get them while if you put it it autoexec you don't. I don't know why, there is only one command.com on the system but that's the way it goes. Thanks again to everyone.
Posted on 2006-12-05 09:29:42 by Jeronimo0d0a
On 9x, autoexec.bat is executed before windows loads, and thus doesn't support long filenames.
Posted on 2006-12-05 17:28:17 by f0dder
I wonder how many 9x machines are still in active use.. and by that I don't mean operating as glorified printer servers or other banal purposes.. :P

Posted on 2006-12-06 07:03:56 by Homer
I still see a lot of 9x machines in "actual use", even though there are printerstoday  that are more advanced.  Question to the world: How many years of service do we expect from an operating system before we just can it?
Posted on 2006-12-06 10:58:02 by Jeronimo0d0a
Hmmz, I use C64s to automate industrial machinery, so that's a good question :P
Posted on 2006-12-08 03:21:00 by Homer
I wouldn't touch the newer windows OSs with a pole in case there were any registration problems.
In the future you will probably need to re-register every 12 months....until they pull the plug on that OS and force you to upgrade.

Win ME will be my last OS, all the stuff I need works fine on it.
Posted on 2006-12-08 06:47:49 by eek
I run Win2K on my dev box, there are a few things that 9x lacks, the NTFS file system is vastly superior to FAT32, there are many NT only APIs that I prefer to use like PSAPI, 9x just doesn't cut it for me but I agree that the step up to XP is not worth the effort, nothing significant has been added since Win2K except for eye candy which I don't need.
Posted on 2006-12-09 12:13:03 by donkey
XP is able to run without paging file, which is pretty nice...
Posted on 2006-12-10 15:12:23 by f0dder