Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!ucsd!rutgers!gatech!cwjcc!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon S. Allbery) Newsgroups: comp.sys.ibm.pc Subject: Re: ...INT 21 ... Message-ID: <13355@ncoast.UUCP> Date: 21 Jan 89 19:46:07 GMT References: <6798@killer.DALLAS.TX.US> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.sys.ibm.pc Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 63 As quoted from <6798@killer.DALLAS.TX.US> by dono@killer.DALLAS.TX.US (Don OConnell): +--------------- | >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-^ +--------------- (1) The actual return was AX=3. Use of actual nonexistent paths returned AX=2, as expected. And my DOS manual seemed to be saying that AX=3 means the same thing as AX=2. Anyone know what it was *really* trying to tell me? +--------------- | >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.: +--------------- I obviously should have been more clear; although the fact that I explicitly mentioned some of the other pathnames *should* have given people a clue. THIS WAS NOT THE QUESTION -- I'm quite aware of the "virtual" \DEV\* pathnames. My question was: why does "find first" on \DEV\CON work, but "find first" of \DEV\NUL, etc. fail? After all, DOS recognizes them in e.g. "open". (Oh, \DEV\CON1 was a typo, I meant \DEV\COM1.) [Sorry for the tone, I seem to be getting lots of responses of this type.] The surprise came from the fact that I thought "open" did something special with \DEV\*, and that other DOS calls didn't recognize it; after all, my HD doesn't *have* a \DEV directory. And yet at least one device path was recognized by "find first". I would have expected either all of them or none of them -- *not* just \DEV\CON and nothing else. +--------------- | >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 structure set 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) > ... | bytes 18h-19h: file date | bytes 1Ah-1Dh: file size +--------------- Please note I said "numbers", *not* "structures". I was after the format of the date and time, not of the "find first/next" buffer which I already have. I've already received this information from others; thanks to all who responded. ++Brandon -- Brandon S. Allbery, moderator of comp.sources.misc allbery@ncoast.org (soon) uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu Send comp.sources.misc submissions to comp-sources-misc@ NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser