<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sat, 25 Jun 1983 1031-:00EDT
From   : Andrew Scott Beals <SJOBRG.ANDY%MIT-OZ@mit-mc>
Subject: simulating ^P from software

Long long ago, someone asked how to simulate a ^P ...
well, there is a magic location in the BDOS that contains a 1
if the output to the console is to be echoed to the printer,
and a 0 for no echo to the printer...

here are two (bds) c functions to turn the printer echo on
and off:

prt_on() {
       char    *pbyte;
       char    **bdosp;

       bdosp = 6;      /* the jump address into bdos */

       pbyte = *bdosp + 0x307; /* pbyte now points to the printer flag */

       *pbyte = 1;
}

prt_off() {
       char    *pbyte;
       char    **bdosp;

       bdosp = 6;      /* bdos jump address */

       pbyte = *bdosp + 0x307;

       *pbyte = 1;
}

and now you have it.

this is for cp/m 2.2 only (as far as i know), and i can provide
the same two functions in another language, if you like...

later,
       -andy
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>