home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
sysutils
/
denynone
/
denynone.asm
next >
Wrap
Assembly Source File
|
1992-05-05
|
2KB
|
66 lines
; This small program was created to help eliminate some of the file sharing
; problems I was encountering with OS/2 2.00. The problem, it seems, is that
; some MS-DOS programs open files with sharing denied, when they really don't
; need to (Borland C in particular). This makes it hard to compile in the
; background while viewing header files that are being compiled. Denynone is
; an MS-DOS TSR that simply intercepts all MS-DOS file open requests
; (function 3D) and ensures the sharing mode is 'deny none'. In other words,
; with denynone loaded, most of the sharing problems should be eliminated. If
; you know what I'm talking about you probably want denynone, if not, you
; probably don't.
;
; !!BEWARE!!
; Obviously, if a program really needs to deny sharing, denyone will
; circumvent it, possibly causing serious data loss. Use denynone at
; your own risk.
; !!BEWARE!!
;
; It may be that OS/2 2.00 provides an easier way to do this, but I haven't
; found it. If you find it, I would be grateful if you would let me know.
;
; Eugene Nelson
; 70662,2501
CODE SEGMENT
ASSUME cs:CODE, ds:NOTHING, es:NOTHING
ORG 100H
START: jmp Initialize
OldDos dd 0
NewDos proc far
sti
cmp ah,3DH
je NewDos1
GetOut: jmp OldDos ;could check for extend open 6C here
NewDos1: and al,10001111b
or al,01000000b
jmp OldDos
NewDos endp
Initialize:
mov ax,3521H ;OldDos <- Int 21H
int 21H
mov word ptr [OldDos], bx
mov word ptr [OldDos + 2],es
mov ax,2521H ;Int 21H -> NewDos
mov dx,offset NewDos
int 21H
mov ax, offset initialize
shr ax,1
shr ax,1
shr ax,1
shr ax,1
inc ax ;ax = (offset initialize)/16 + 1
mov dx,ax
mov ax,3100H
int 21H ;DOS exit and remain resident
CODE ENDS
END START