Article View: comp.sys.ibm.pc
Article #14239Re: Damn Ctrl-P
From: Neil Pitman
Date: Mon, 10 Jun 1991 18:25
Date: Mon, 10 Jun 1991 18:25
45 lines
2017 bytes
2017 bytes
In article <PRZEMEK.91May30155306@rrdstrad.nist.gov> przemek@rrdstrad.nist.gov (Przemek Klosowski) writes:
>Hello!
>
>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
>editor, and I sometimes instinctively type it in MSDOS when I want
>to correct a typo I did. Since some of my computers do not have a printer
>attached, it hangs the poor thing. I looked for a program to disable it on
>the usual archives, to no avail. Any ideas? I see two avenues:
> 1) disable something in the software
What you can try is to delete the printer port address in the BIOS data
area. This will cause all primitive print requests to return with an
error immediately. Normally the ^P will still echo commands to the PRN:
but, because it does not exist, it takes no time. (well very little)
To delete you will need a small programme, so type the following commands:
DEBUG<-
N LPT-DEL.COM<- ; future name
A 100<-
MOV AX,40<- ; point to BIOS DATA AREA segment
MOV DS,AX<-
XOR AX,AX<-
MOV [8],AX<- ; delete LPT1
MOV [A],AX<- ; delete LPT2
MOV [C],AX<- ; delete LPT3
MOV AH,4C<-
INT 21<- ; return to DOS
<-
R CX<-
100<- ; set size of programme -- 100H is plenty
W<- ; write programme
Q<- ; back to DOS
("<-" = Carriage Return.)
(comments after "<-" are for your edification (not DEBUG's))
Now run the programme LPT-DEL.COM in your AUTOEXEC.BAT to rid yourself of
your printer ports.
Bonne chance,
Neil Pitman
Technical Details
Message-ID:
<1991Jun10.182505.7541@philmtl.philips.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!philmtl!neilReferences:
<PRZEMEK.91May30155306@rrdstrad.nist.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!philmtl!neil From: neil@philmtl.philips.ca (Neil Pitman) Newsgroups: comp.sys.ibm.pc Subject: Re: Damn Ctrl-P Message-ID: <1991Jun10.182505.7541@philmtl.philips.ca> Date: 10 Jun 91 18:25:05 GMT Article-I.D.: philmtl.1991Jun10.182505.7541 References: <PRZEMEK.91May30155306@rrdstrad.nist.gov> Organization: Philips Electronics Limited, St. Laurent QC, Canada Lines: 45