[comp.os.msdos.apps] Thanks!

er1m+@andrew.cmu.edu (Ethan J. Rasiel) (04/19/91)

Thanks to all the people who answered my deskview question.  Special thanks to
Doug Dougherty, who posted a program to fix the `problem'.  I can rest
easy now...

Ethan (no longer without a clue) Rasiel

valley@gsbsun.uchicago.edu (Doug Dougherty) (04/19/91)

er1m+@andrew.cmu.edu (Ethan J. Rasiel) writes:

>Thanks to all the people who answered my deskview question.  Special thanks to
>Doug Dougherty, who posted a program to fix the `problem'.  I can rest
>easy now...

>Ethan (no longer without a clue) Rasiel

I think you mean, thanks to Ralf Brown, for the program.

But I appreciate the thought...

BTW, the program was:

	MOV AX,5D01
	MOV DX,10A
	INT 21
	INT 20

right?  Anyone care to explain the magic numbers in further detail?
(I know that AH=5D is some kind of network services, but am not familiar
with the rest)
--

	(Another fine mess brought to you by valley@gsbsun.uchicago.edu)

ralf+@cs.cmu.edu (Ralf Brown) (04/19/91)

In article <1991Apr18.220155.2630@midway.uchicago.edu> valley@gsbsun.uchicago.edu (Doug Dougherty) writes:
}	MOV AX,5D01
}	MOV DX,10A
}	INT 21
}	INT 20
}
}right?  Anyone care to explain the magic numbers in further detail?

It's (where else?) in the interrupt list:

----------215D01-----------------------------
INT 21 - DOS 3.1+ internal - COMMIT ALL FILES FOR SPECIFIED COMPUTER/PROCESS
        AX = 5D01h
        DS:DX -> DOS parameter list (see AX=5D00h), only computer ID and
                process ID fields used
Return: CF set on error
            AX = error code (see AH=59h)
        CF clear if successful
Notes:  flushes buffers and updates directory entries for each file which has
          been written to; if remote file, calls INT 2F/AX=1107h
        the computer ID and process ID are stored but ignored under DOS 3.3
SeeAlso: AH=0Dh,AH=68h,INT 2F/AX=1107h

Format of DOS parameter list:
Offset  Size    Description
 00h    WORD    AX
 02h    WORD    BX
 04h    WORD    CX
 06h    WORD    DX
 08h    WORD    SI
 0Ah    WORD    DI
 0Ch    WORD    DS
 0Eh    WORD    ES
 10h    WORD    reserved (0)
 12h    WORD    computer ID (0 = current system)
 14h    WORD    process ID (PSP segment on specified computer)
--
{backbone}!cs.cmu.edu!ralf  ARPA: RALF@CS.CMU.EDU   FIDO: Ralf Brown 1:129/3.1
BITnet: RALF%CS.CMU.EDU@CMUCCVMA   AT&Tnet: (412)268-3053 (school)   FAX: ask
DISCLAIMER?  Did  | It isn't what we don't know that gives us trouble, it's
I claim something?| what we know that ain't so.  --Will Rogers

amb43790@uxa.cso.uiuc.edu (Anthony M Brummett) (04/20/91)

valley@gsbsun.uchicago.edu (Doug Dougherty) writes:

>er1m+@andrew.cmu.edu (Ethan J. Rasiel) writes:

>>Thanks to all the people who answered my deskview question.  Special thanks to
>>Doug Dougherty, who posted a program to fix the `problem'.  I can rest
>>easy now...

>>Ethan (no longer without a clue) Rasiel

>I think you mean, thanks to Ralf Brown, for the program.

>But I appreciate the thought...

>BTW, the program was:

>	MOV AX,5D01
>	MOV DX,10A
>	INT 21
>	INT 20

>right?  Anyone care to explain the magic numbers in further detail?
>(I know that AH=5D is some kind of network services, but am not familiar
>with the rest)

From the book _Undocumented DOS_ by Andrew Schulmen et al:        
   "INT 21H Function 5D01
    Commit all files
    Flush all disk buffers and update the directory entry for each file which
    has been written to since opening or the last commit.
    Call with:
       AX     5D01H
       DS:DX  pointer to DOS parameter list..."
The DOS parameter list is a record that that holds AX,BX,CX,DX,SI,DI,DS,ES and
the computer ID and process ID, in that order, however, one word is listed as
reserved between ES and the computer ID.  The only fields which matter to 
function 5D01H is the computer ID(current system=0000H) and the process ID
(the PSP segment on the specified computer).  When the function returns, the
carry flag is set and AX holds the error code if an error occurred.