From 2d04cacc5322951f187bb17e017c12920ac8ebe2 Mon Sep 17 00:00:00 2001 From: Mark Zbikowski Date: Thu, 25 Apr 2024 21:24:10 +0100 Subject: MZ is back! --- v4.0/src/DOS/CRIT.ASM | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 v4.0/src/DOS/CRIT.ASM (limited to 'v4.0/src/DOS/CRIT.ASM') 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 @@ +; SCCSID = @(#)crit.asm 1.1 85/04/10 +TITLE CRIT - Critical Section Routines +NAME CRIT +; +; Critical Section Routines +; +; Critical section handlers +; +; Modification history: +; +; Created: ARR 30 March 1983 +; + +.xlist +; +; get the appropriate segment definitions +; +include dosseg.asm + +CODE SEGMENT BYTE PUBLIC 'CODE' + ASSUME SS:NOTHING,CS:DOSGROUP + +.xcref +INCLUDE DOSSYM.INC +.cref +.list + + I_need User_In_AX,WORD + i_need CurrentPDB,WORD +if debug + I_need BugLev,WORD + I_need BugTyp,WORD +include bugtyp.asm +endif + +Break + +; +; Each handler must leave everything untouched; including flags! +; +; Sleaze for time savings: first instruction is a return. This is patched +; by the sharer to be a PUSH AX to complete the correct routines. +; +Procedure EcritDisk,NEAR + public EcritMem + public EcritSFT +ECritMEM LABEL NEAR +ECritSFT LABEL NEAR + RET +; PUSH AX + fmt TypSect,LevReq,<"PDB $x entering $x">, + MOV AX,8000h+critDisk + INT int_ibm + POP AX + return +EndProc EcritDisk + +Procedure LcritDisk,NEAR + public LcritMem + public LcritSFT +LCritMEM LABEL NEAR +LCritSFT LABEL NEAR + RET +; PUSH AX + fmt TypSect,LevReq,<"PDB $x entering $x">, + MOV AX,8100h+critDisk + INT int_ibm + POP AX + return +EndProc LcritDisk + +Procedure EcritDevice,NEAR + RET +; PUSH AX + fmt TypSect,LevReq,<"PDB $x entering $x">, + MOV AX,8000h+critDevice + INT int_ibm + POP AX + return +EndProc EcritDevice + +Procedure LcritDevice,NEAR + RET +; PUSH AX + MOV AX,8100h+critDevice + INT int_ibm + POP AX + return +EndProc LcritDevice + +CODE ENDS + END -- cgit v1.2.3