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

wirehaze git hosting

MZ is back!
[MS-DOS.git] / v4.0 / src / DOS / CRIT.ASM
1 ; SCCSID = @(#)crit.asm 1.1 85/04/10
2 TITLE CRIT - Critical Section Routines
3 NAME 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 ;
18 include dosseg.asm
19
20 CODE SEGMENT BYTE PUBLIC 'CODE'
21 ASSUME SS:NOTHING,CS:DOSGROUP
22
23 .xcref
24 INCLUDE DOSSYM.INC
25 .cref
26 .list
27
28 I_need User_In_AX,WORD
29 i_need CurrentPDB,WORD
30 if debug
31 I_need BugLev,WORD
32 I_need BugTyp,WORD
33 include bugtyp.asm
34 endif
35
36 Break <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 ;
44 Procedure EcritDisk,NEAR
45 public EcritMem
46 public EcritSFT
47 ECritMEM LABEL NEAR
48 ECritSFT 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
56 EndProc EcritDisk
57
58 Procedure LcritDisk,NEAR
59 public LcritMem
60 public LcritSFT
61 LCritMEM LABEL NEAR
62 LCritSFT 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
70 EndProc LcritDisk
71
72 Procedure 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
80 EndProc EcritDevice
81
82 Procedure LcritDevice,NEAR
83 RET
84 ; PUSH AX
85 MOV AX,8100h+critDevice
86 INT int_ibm
87 POP AX
88 return
89 EndProc LcritDevice
90
91 CODE ENDS
92 END