Path: utzoo!utgpu!attcan!uunet!lll-winken!ames!mailrus!tut.cis.ohio-state.edu!rutgers!bellcore!texbell!killer!dono From: dono@killer.DALLAS.TX.US (Don OConnell) Newsgroups: comp.sys.ibm.pc Subject: Re:...INT 21 ... Keywords: INT 21 Message-ID: <6798@killer.DALLAS.TX.US> Date: 15 Jan 89 10:45:04 GMT Organization: The Unix(R) Connection, Dallas, Texas Lines: 61 >From allbery@ncoast.UUCP Sat Jan 14 23:28:32 1989 >invoking it on the pathname \DEV\CON -- and, to my surprise, it returned >with an attribute byte of 40H! In playing with it, I discovered that >\DEV\CON was the *only* device that produced this behavior; other devices, >and \DEV\*.*, returned AX=3 (path not found). SHOULD BE 2-^ >This was done in a Turbo Pascal 3.01 program running under MS-DOS 3.21. >Anyone know if I hit a fluke or if this actually happens? Does it have to >do with the device being open by the program (i.e. \DEV\CON is >stdin/stdout/stderr -- but then, \DEV\CON1 should be open as stdaux and >\DEV\LPT1 as stdprn)? Yes DOS does have some /dev files, though they are not the standard UNIX names, ie.: /dev/con console /dev/prn printer /dev/com? communications dev [1/2] I don't know about /dev/con1 but I doubt that it exists. Nor do I know what stdaux would be called. >From allbery@ncoast.UUCP Sat Jan 14 23:34:04 1989 > >The only copy of the Interrupt List I can find on ncoast and my almost >useless DOS manual agree that the structureset by INT 21, AH=4EH/4FH >contains one 16-bit entity each for file date and time. Question: does >anyone know the format of these numbers? INT 21 - DOS 2+ - FIND FIRST ASCIZ (FIND FIRST) AH = 4Eh CX = search attributes DS:DX -> ASCIZ filename Return: CF set on error AX = error code [DTA] = data block undocumented fields PC-DOS 3.10 byte 00h: drive letter bytes 01h-0Bh: search template byte 0Ch: search attributes DOS 2.x (and DOS 3.x except 3.1???) byte 00h: search attributes byte 01h: drive letter bytes 02h-0Ch: search template bytes 0Dh-0Eh: entry count within directory bytes 0Fh-12h: reserved bytes 13h-14h: cluster number of parent directory byte 15h: attribute of file found bytes 16h-17h: file time bytes 18h-19h: file date bytes 1Ah-1Dh: file size bytes 1Eh-3Ah: ASCIZ filename+extension -------------------------------------------------- INT 21 - DOS 2+ - FIND NEXT ASCIZ (FIND NEXT) AH = 4Fh [DTA] = data block from last AH = 4Eh/4Fh call Return: CF set on error AX = error code [DTA] = data block, see AH = 4Eh above --------------------------------------------------