]> wirehaze git hosting - MS-DOS.git/blob - v4.0/src/DOS/DUP.ASM

wirehaze git hosting

MZ is back!
[MS-DOS.git] / v4.0 / src / DOS / DUP.ASM
1 ; SCCSID = @(#)dup.asm 1.1 85/04/10
2 ; SCCSID = @(#)dup.asm 1.1 85/04/10
3 TITLE DOS_DUP - Internal SFT DUP (for network SFTs)
4 NAME DOS_DUP
5 ; Low level DUP routine for use by EXEC when creating a new process. Exports
6 ; the DUP to the server machine and increments the SFT ref count
7 ;
8 ; DOS_DUP
9 ;
10 ; Modification history:
11 ;
12 ; Created: ARR 30 March 1983
13 ;
14
15 ;
16 ; get the appropriate segment definitions
17 ;
18 .xlist
19 include dosseg.asm
20
21 CODE SEGMENT BYTE PUBLIC 'CODE'
22 ASSUME SS:DOSGROUP,CS:DOSGROUP
23
24 .xcref
25 INCLUDE DOSSYM.INC
26 INCLUDE DEVSYM.INC
27 .cref
28 .list
29
30 i_need THISSFT,DWORD
31
32 BREAK <DOS_DUP -- DUP SFT across network>
33
34 ; Inputs:
35 ; [THISSFT] set to the SFT for the file being DUPed
36 ; (a non net SFT is OK, in this case the ref
37 ; count is simply incremented)
38 ; Function:
39 ; Signal to the devices that alogical open is occurring
40 ; Returns:
41 ; ES:DI point to SFT
42 ; Carry clear
43 ; SFT ref_count is incremented
44 ; Registers modified: None.
45 ; NOTE:
46 ; This routine is called from $CREATE_PROCESS_DATA_BLOCK at DOSINIT
47 ; time with SS NOT DOSGROUP. There will be no Network handles at
48 ; that time.
49
50 procedure DOS_DUP,NEAR
51 ASSUME ES:NOTHING,SS:NOTHING
52
53 LES DI,ThisSFT
54 Entry Dos_Dup_Direct
55 Assert ISSFT,<ES,DI>,"DOSDup"
56 invoke IsSFTNet
57 JNZ DO_INC
58 invoke DEV_OPEN_SFT
59 DO_INC:
60 Assert ISSFT,<ES,DI>,"DOSDup/DoInc"
61 INC ES:[DI.sf_ref_count] ; Clears carry (if this ever wraps
62 ; we're in big trouble anyway)
63 return
64
65 EndProc DOS_DUP
66
67 CODE ENDS
68 END