summaryrefslogtreecommitdiff
path: root/v4.0/src/DOS/DISPATCH.ASM
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--v4.0/src/DOS/DISPATCH.ASM214
1 files changed, 214 insertions, 0 deletions
diff --git a/v4.0/src/DOS/DISPATCH.ASM b/v4.0/src/DOS/DISPATCH.ASM
new file mode 100644
index 0000000..0f50ef0
--- /dev/null
+++ b/v4.0/src/DOS/DISPATCH.ASM
@@ -0,0 +1,214 @@
1; SCCSID = @(#)dispatch.asm 1.1 85/04/10
2; SCCSID = @(#)dispatch.asm 1.1 85/04/10
3;
4; Major dispatch code and table for MSDOS 2.X and above.
5;
6; Modification history:
7;
8; Created: MZ 30 March 1983
9;
10; The system calls are dispatched to in such a fashion as to have their entire
11; register set passed to them except for CS:IP and SS:SP. This reduces the
12; need for retreiving information from the user's stack.
13;
14; There are also critical sections that need to be observed when running in a
15; multitasking environment. These sections are:
16;
17; 1 critDisk any of the disk code that will twiddle the buffer cache
18; 2 critDevice all device drivers
19;
20; 4 critMem memory allocation stuff
21; 5 critNet network critical section
22;
23; The system calls below are noted as to which of these critical sections they
24; belong. The critical sections are noted in the source files by the macros
25; EnterCrit and LeaveCrit.
26;
27; The break-down of the individual system calls into source files is as
28; follows (* means done):
29;
30; * handle.asm: Close, Read, Write, LSeek, XDup, XDup2, FileTimes
31; IOCTL.INC: IOCTL
32; * file.asm: Open, Creat, ChMod, Unlink, Rename, CreateTemp,
33; CreateNew
34; * srvcall.asm: $ServerCall
35; * path.asm: MkDir, RmDir, ChDir, CurrentDir
36; * alloc.asm: $Alloc, $Dealloc, $SetBlock, $AllocOper
37; arena_free_process, arena_next -> LOW LEVEL <-
38; check_signature, Coalesce
39; * search.asm: DirSearchFirst, DirSearchNext, FindFirst, FindNext,
40; PackName -> LOW LEVEL <-
41; * proc.asm: Exec, Exit, Abort, Wait, KeepProcess
42; * cpmio.asm: StdConInput, StdConOutput, StdAuxInput, StdAuxOutput,
43; StdPrinterOutput, RawConIO, RawConInput,
44; StdConInputNoEcho, StdConStringInput,
45; StdConStringOutput, StdConInputStatus,
46; StdConInputFlush
47; OUT, BUFOUT, RAWOUT, RAWOUT2 -> LOW LEVEL <-
48; * fcbio.asm: FCBOpen, FCBClose, FCBDelete, FCBSeqRead, FCBSeqWrite,
49; FCBCreate, FCBRename, FCBRandomRead, FCBRandomWrite,
50; GetFCBFileLength, GetFCBPosition, FCBRandomReadBlock,
51; FCBRandomWriteBlock
52; * Time.asm: GetDate, SetDate, GetTime, SetTime
53; * Parse.asm: Parse_file_descriptor, PathParse
54; * GetSet.asm: GetInterruptVector, SetInterruptVector,
55; GetVerifyOnWrite, SetVerifyOnWrite, GetDMA, SetDMA,
56; GetVersion, SetCTRLCTrapping, GetDriveFreespace,
57; CharOper, International, SetDefaultDrive,
58; GetDefaultDrive
59; * Misc.asm: Sleazefunc, SleazefuncDL, GetDefaultDPB, GetDPB,
60; CreateProcessDataBlock, GetINDOSFlag, GetInVars,
61; SetDPB, DupPDB, DiskReset
62; StrCmp, StrCpy, Ucase -> LOW LEVEL <-
63;
64; STUB MODULES
65; Net.asm **** This will get broken down more???
66; * Share.asm Share_Check, Share_Violation
67; * Lock.asm $LockOper
68; DOS_LOCK,DOS_UNLOCK,Lock_Check, Lock_Violation
69
70; INTERNAL INTERFACE MODULES
71; * Lock.asm DOS_LOCK, DOS_UNLOCK -->> STUBS <<--
72; * Dinfo.asm DISK_INFO
73; * Finfo.asm GET_FILE_INFO, SET_FILE_ATTRIBUTE
74; * Create.asm DOS_CREATE, DOS_CREATE_NEW,
75; Set_Mknd_Err --> Low level routine <--
76; * Dup.asm DOS_DUP
77; * Open.asm DOS_OPEN,
78; SetBadPathError, --> Low level routines <--
79; Check_Access_AX, Share_Error, Set_SFT_Mode
80; * Close.asm DOS_CLOSE, DOS_COMMIT, DOS_CLOSE_GOT_SFT,
81; Free_SFT --> Low level routine <--
82; * Abort.asm DOS_ABORT
83; * ISearch.asm DOS_SEARCH_FIRST, DOS_SEARCH_NEXT,
84; RENAME_NEXT --> Low level routine <--
85; * Dircall.asm DOS_MKDIR, DOS_CHDIR, DOS_RMDIR
86; * Rename.asm DOS_RENAME
87; * Delete.asm DOS_DELETE,
88; REN_DEL_Check --> Low level routine <--
89; * Disk.asm DOS_READ, DOS_WRITE
90
91; LOW LEVEL MODULES
92; * Fat.asm UNPACK, PACK, MAPCLUSTER, FATREAD_SFT,
93; FATREAD_CDS, FAT_operation
94; * Ctrlc.asm --> STD/IBM versions <--
95; FATAL, FATAL1, reset_environment, DSKSTATCHK,
96; SPOOLINT, STATCHK, CNTCHAND, DIVOV, RealDivOv,
97; CHARHARD, HardErr
98; * Buf.asm SETVISIT, ScanPlace, PLACEBUF, PLACEHEAD, PointComp,
99; GETBUFFR, GETBUFFRB, FlushBuf, BufWrite,
100; SKIPVISIT
101; * Disk.asm SWAPBACK, SWAPCON, get_io_sft, DirRead, FATSecRd,
102; DskRead, SETUP, BREAKDOWN, DISKREAD, DISKWRITE,
103; FIRSTCLUSTER, DREAD, DWRITE, DSKWRITE,
104; READ_LOCK_VIOLATION, WRITE_LOCK_VIOLATION,
105; SETSFT, SETCLUS, AddRec
106; * Mknode.asm BUILDDIR, SETDOTENT, MakeNode, NEWENTRY, FREEENT,
107; NEWDIR, DOOPEN,RENAME_MAKE
108; * FCB.asm MakeFcb, NameTrans, PATHCHRCMP, GetLet, TESTKANJ,
109; NORMSCAN, CHK, DELIM
110; * Rom.asm GET_random_record, GETRRPOS1, GetRRPos, SKPCLP,
111; FNDCLUS, BUFSEC, BUFRD, BUFWRT, NEXTSEC,
112; OPTIMIZE, FIGREC, GETREC, ALLOCATE, RESTFATBYT,
113; RELEASE, RELBLKS, GETEOF
114; * Dev.asm IOFUNC, DEVIOCALL, SETREAD, SETWRITE, GOTDPB,
115; DEVIOCALL2, DEV_CLOSE_SFT, DEV_OPEN_SFT
116; * Dir.asm SEARCH, SETDIRSRCH, GETPATH, ROOTPATH, StartSrch,
117; MatchAttributes, DEVNAME, Build_device_ent,
118; FindEntry, Srch, NEXTENT, GETENTRY, GETENT,
119; NEXTENTRY, GetPathNoSet, FINDPATH
120;
121
122; critical section information for the system calls
123
124; System Call Who takes care of the reentrancy
125; Abort 0 (flushbuf) DOS_Close
126; Std_Con_Input 1 DOS_Read
127; Std_Con_Output 2 DOS_Write
128; Std_Aux_Input 3 DOS_Read
129; Std_Aux_Output 4 DOS_Write
130; Std_Printer_Output 5 DOS_Write
131; Raw_Con_IO 6 DOS_Read/DOS_Write
132; Raw_Con_Input 7 DOS_Read
133; Std_Con_Input_No_Echo 8 DOS_Read
134; Std_Con_String_Output 9 DOS_Write
135; Std_Con_String_Input A DOS_Read
136; Std_Con_Input_Status B DOS_Read
137; Std_Con_Input_Flush C DOS_Read
138; Disk_Reset D (FlushBuf, ScanPlace, SkipVisit)
139; Set_Default_Drive E *none*
140; FCB_Open F DOS_Open
141; FCB_Close 10 DOS_Close
142; Dir_Search_First 11 DOS_Search_First
143; Dir_Search_Next 12 DOS_Search_Next
144; FCB_Delete 13 DOS_Delete
145; FCB_Seq_Read 14 DOS_Read/DOS_Write
146; FCB_Seq_Write 15 DOS_Read/DOS_Write
147; FCB_Create 16 DOS_Create
148; FCB_Rename 17 DOS_rename
149; Get_Default_Drive 19 *none*
150; Set_DMA 1A *none*
151; Get_Default_DPB 1F *none*
152; FCB_Random_Read 21 DOS_Read/DOS_Write
153; FCB_Random_Write 22 DOS_Read/DOS_Write
154; Get_FCB_File_Length 23 Get_file_info
155; Get_FCB_Position 24 *none*
156; Set_Interrupt_Vector 25 *none*
157; Create_Process_Data_Block 26 *none*
158; FCB_Random_Read_Block 27 DOS_Read/DOS_Write
159; FCB_Random_Write_Block 28 DOS_Read/DOS_Write
160; Parse_File_Descriptor 29 *none*
161; Get_Date 2A DEVIOCALL
162; Set_Date 2B DEVIOCALL
163; Get_Time 2C DEVIOCALL
164; Set_Time 2D DEVIOCALL
165; Set_Verify_On_Write 2E *none*
166; Get_DMA 2F *none*
167; Get_Version 30 *none*
168; Keep_Process 31 $abort...
169; Get_DPB 32 *none*
170; Set_CTRL_C_Trapping 33 *none*
171; Get_InDOS_Flag 34 *none*
172; Get_Interrupt_Vector 35 *none*
173; Get_Drive_Freespace 36 Disk_Info
174; Char_Oper 37 *none*
175; International 38 *none*
176; MKDir 39 DOS_MkDir
177; RMDir 3A DOS_RmDir
178; CHDir 3B DOS_ChDir
179; Creat 3C DOS_Create
180; Open 3D DOS_Open
181; Close 3E DOS_Close
182; Read 3F DOS_Read
183; Write 40 DOS_Write
184; Unlink 41 DOS_Delete
185; LSeek 42 *none*
186; CHMod 43 Get_file_info, Set_File_Attribute
187; IOCtl 44 DEVIOCALL
188; XDup 45 *none*
189; XDup2 46 *none*
190; Current_Dir 47 $Current_Dir
191; Alloc 48 $Alloc
192; Dealloc 49 $Dealloc
193; Setblock 4A $SetBlock
194; Exec 4B
195; Exit 4C $abort...
196; Wait 4D *none*
197; Find_First 4E DOS_Search_First
198; Find_Next 4F DOS_Search_Next
199; Set_Current_PDB 50 *none*
200; Get_Current_PDB 51 *none*
201; Get_In_Vars 52 *none*
202; SetDPB 53 *none*
203; Get_Verify_On_Write 54 *none*
204; Dup_PDB 55
205; Rename 56 DOS_Rename
206; File_Times 57 *none*
207; AllocOper 58 *none*
208; GetExtendedError 59 *none*
209; CreateTempFile 5A DOS_Create_New
210; CreateNewFile 5B DOS_Create_New
211; LockOper 5C
212; ServerCall 5D
213; UserOper 5E
214; AssignOper 5F