From: utzoo!decvax!ucbvax!C70:info-cpm
Newsgroups: fa.info-cpm
Title: [RGF: submit with printer control]
Article-I.D.: ucb.1602
Posted: Sun Jul 25 23:21:15 1982
Received: Thu Jul 29 05:19:04 1982

>From RGF@Mit-Mc Sun Jul 25 23:20:44 1982

Date: 25 July 1982 23:38-EDT
From: Ronald G. Fowler 
Subject:  submit with printer control
To: reece at NADC
cc: RGF at MIT-MC

Jim, the "^P" feature of CP/M is a "real-time" function...that is,
the ^P is trapped immediately after calling BIOS for a character;
if the BIOS is not called, the function is not activated (as is the
case from within a SUBMIT file).  The only way to activate it in a
batch stream would be to determine where the BDOS keeps its "printer
on" flag, then manually set it from within a special transient you'd
have to write.  This transient would, of course, be version dependant,
since the location would change from one assembly of BDOS to the next.
  For you information, the flag is located BDOS base +030DH.  Thus,
the following code should set the flag (this is *not* tested!):
		LHLD	6	;find BDOS
		LXI	D,030DH	;offset to LISTCP
		DAD	D
		MVI	M,1	;turn it on. (MVI M,0 to turn off).
  If you need a toggle, change the "MVI M,1" to "MOV A,M ! XRI 1 !
MOV M,A".  
  Note that these locations are for CP/M 2.2 and will not work under
any other version.  Further, they won't work under DDT or SID, since
the address field at 6 is modified by these programs.
			--Ron Fowler