🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #14164

Re: Damn Ctrl-P

#14164
From: DJ Delorie
Date: Fri, 31 May 1991 13:09
36 lines
1923 bytes
In article <6642@vela.acs.oakland.edu>, dlcogswe@vela.acs.oakland.edu (Dan Cogswell) writes:
> przemek@rrdstrad.nist.gov (Przemek Klosowski) writes:
> >I apologize if this is very easy---but how does one prevent Ctrl-P key from
> >always trying to send something to the printer? I use C-P often under Emacs
> 
> I wanna know how to do this, too!  I'm using 4DOS and remapped the keys
> to act as Emacs keys, but ctrl-P always prints instead to feeding an
> up-arrow as in Emacs.  How can I disable the ctrl-P?

It can be done - I've done it.  It's ugly, though.

How it works: (don't blame me if your system gets toasted, though!)

In msdos.sys, there's a spot where it watches for the ^P.  It
only does this if stdout is in "cooked" mode, so theoretically
putting stdout in "raw" mode will disable it.  However, you
can't control what other applications do.

SO, what you do is find the spot where msdos.sys checks for
the ^P, and GET RID OF IT.

Notes:

1. You have to look for the CMP AL,10 instruction that's followed by a
conditional jump.  I found two places that this happens in my version,
and only one (trial & error) was the ^P check.

2. You have to edit MSDOS.SYS *in place*.  You can't copy & rename the
file, as it's special.  I used Norton's Utilities to patch it, plus I
have a patch program that patches it in place.

3. The safest way to patch is to replace "JZ" with "NOP NOP", or
replace "JNZ" with "JMP".

DJ
dj@ctron.com
Technical Details
Message-ID: <1597@balrog.ctron.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!balrog!ctron.com
References: <PRZEMEK.91May30155306@rrdstrad.nist.gov> <6642@vela.acs.oakland.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!balrog!ctron.com
From: dj@ctron.com (DJ Delorie)
Newsgroups: comp.sys.ibm.pc
Subject: Re: Damn Ctrl-P
Message-ID: <1597@balrog.ctron.com>
Date: 31 May 91 13:09:04 GMT
References: <PRZEMEK.91May30155306@rrdstrad.nist.gov> <6642@vela.acs.oakland.edu>
Sender: news@balrog.ctron.com
Reply-To: dj@ctron.com
Organization: None whatsoever
Lines: 36
Nntp-Posting-Host: bragi