summaryrefslogtreecommitdiff
path: root/v4.0/src/DOS/CRIT.ASM
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--v4.0/src/DOS/CRIT.ASM92
1 files changed, 92 insertions, 0 deletions
diff --git a/v4.0/src/DOS/CRIT.ASM b/v4.0/src/DOS/CRIT.ASM
new file mode 100644
index 0000000..dfb1ccd
--- /dev/null
+++ b/v4.0/src/DOS/CRIT.ASM
@@ -0,0 +1,92 @@
1; SCCSID = @(#)crit.asm 1.1 85/04/10
2TITLE CRIT - Critical Section Routines
3NAME CRIT
4;
5; Critical Section Routines
6;
7; Critical section handlers
8;
9; Modification history:
10;
11; Created: ARR 30 March 1983
12;
13
14.xlist
15;
16; get the appropriate segment definitions
17;
18include dosseg.asm
19
20CODE SEGMENT BYTE PUBLIC 'CODE'
21 ASSUME SS:NOTHING,CS:DOSGROUP
22
23.xcref
24INCLUDE DOSSYM.INC
25.cref
26.list
27
28 I_need User_In_AX,WORD
29 i_need CurrentPDB,WORD
30if debug
31 I_need BugLev,WORD
32 I_need BugTyp,WORD
33include bugtyp.asm
34endif
35
36Break <Critical section handlers>
37
38;
39; Each handler must leave everything untouched; including flags!
40;
41; Sleaze for time savings: first instruction is a return. This is patched
42; by the sharer to be a PUSH AX to complete the correct routines.
43;
44Procedure EcritDisk,NEAR
45 public EcritMem
46 public EcritSFT
47ECritMEM LABEL NEAR
48ECritSFT LABEL NEAR
49 RET
50; PUSH AX
51 fmt TypSect,LevReq,<"PDB $x entering $x">,<CurrentPDB,sect>
52 MOV AX,8000h+critDisk
53 INT int_ibm
54 POP AX
55 return
56EndProc EcritDisk
57
58Procedure LcritDisk,NEAR
59 public LcritMem
60 public LcritSFT
61LCritMEM LABEL NEAR
62LCritSFT LABEL NEAR
63 RET
64; PUSH AX
65 fmt TypSect,LevReq,<"PDB $x entering $x">,<CurrentPDB,sect>
66 MOV AX,8100h+critDisk
67 INT int_ibm
68 POP AX
69 return
70EndProc LcritDisk
71
72Procedure EcritDevice,NEAR
73 RET
74; PUSH AX
75 fmt TypSect,LevReq,<"PDB $x entering $x">,<CurrentPDB,sect>
76 MOV AX,8000h+critDevice
77 INT int_ibm
78 POP AX
79 return
80EndProc EcritDevice
81
82Procedure LcritDevice,NEAR
83 RET
84; PUSH AX
85 MOV AX,8100h+critDevice
86 INT int_ibm
87 POP AX
88 return
89EndProc LcritDevice
90
91CODE ENDS
92 END