diff options
| author | 2024-04-25 21:24:10 +0100 | |
|---|---|---|
| committer | 2024-04-25 22:32:27 +0000 | |
| commit | 2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch) | |
| tree | 80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/DOS/DUP.ASM | |
| parent | Merge pull request #430 from jpbaltazar/typoptbr (diff) | |
| download | ms-dos-main.tar.gz ms-dos-main.tar.xz ms-dos-main.zip | |
Diffstat (limited to 'v4.0/src/DOS/DUP.ASM')
| -rw-r--r-- | v4.0/src/DOS/DUP.ASM | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/v4.0/src/DOS/DUP.ASM b/v4.0/src/DOS/DUP.ASM new file mode 100644 index 0000000..0f8c768 --- /dev/null +++ b/v4.0/src/DOS/DUP.ASM | |||
| @@ -0,0 +1,68 @@ | |||
| 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 | ||