delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/1997/08/22/18:35:05

Date: Fri, 22 Aug 1997 15:31:36 -0700 (PDT)
From: Evan Dickinson <evand AT wsunix DOT wsu DOT edu>
Reply-To: evand AT scn DOT org
cc: opendos AT delorie DOT com
Subject: Re: Control P
In-Reply-To: <m0wzYWo-001TdpC@psfpc.ih.lucent.com>
Message-ID: <Pine.OSF.3.95.970822152407.7221A-100000@unicorn.it.wsu.edu>
MIME-Version: 1.0

On Fri, 15 Aug 1997, Peter Fales wrote:

> evand AT scn DOT org:
> > Is there any command, TSR, or magical incantation to keep Ctrl-P from
> > echoing everything to the printer?
> 
> I find this quite annoying also.  Prior to the availability of OpenDOS 
> source, I worked around it by patching DOS.  For example, in DR-DOS
> 6.0, a dissassembly of IBMDOS.COM reveals
> 
> 1CC1:0736 3C10          CMP     AL,10
> 1CC1:0738 750F          JNZ     0749
> 
> Changing the JNZ to JMP eliminates the Ctrl-P problem forever.  You
> could probably find the same check in other versions of DR-DOS or 
> OpenDOS.  (If you've built OpenDOS from source, it's at line 519 ofcio.a86 :-)

That keeps the Ctrl-P key in the buffer, where (on my computer) I get a
"Device not ready" error.  (probably from the BIOS, but I'm not sure).
This code eats the keystroke:

        cmp     al,CTLP                 ; has the user typed ^P
        jne  cooked_s10                 ;  flush the buffer and
        ;xor   cio_state,CIO_CTLP       ;  toggle ^P flag
        call    char_get                ;  flush the character from buffer
        ;call  open_or_close_prn        ;  open/close printer device
        test    ax,ax                   ; ZF clear, ie. no char available
        jmps    cooked_s50

Just comment out the xor and call lines.  This code appears around line
520 of cio.a86, which is Copyrighted by Caldera.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019