Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!linus!genrad!decvax!harpo!seismo!hao!hplabs!sri-unix!SJOBRG.ANDY%MIT-OZ@mit-mc
From: SJOBRG.ANDY%MIT-OZ%mit-mc@sri-unix.UUCP
Newsgroups: net.micro.cpm
Subject: simulating ^P from software
Message-ID: <2553@sri-arpa.UUCP>
Date: Sat, 25-Jun-83 10:31:00 EDT
Article-I.D.: sri-arpa.2553
Posted: Sat Jun 25 10:31:00 1983
Date-Received: Mon, 27-Jun-83 22:50:04 EDT
Lines: 40

From:  Andrew Scott Beals 

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
-------