[fa.info-cpm] submit with printer control

C70:info-cpm (07/25/82)

>From reece@Nadc Sun Jul 25 12:14:33 1982
Can anyone help me with this problem?  I am trying to make a submit file
which turns the printer on, prints a directory listing, then turns the
printer off. I tried the "^P" command but keep getting "?" when it executes.
I have tried digital research's SUBMIT patched per their vol.1, #1 newletter.
I also tried Richard Conn's SUB and SUPERSUB ver 1.1 by Ron Fowler. I must
be doing it wrong. 
Jim Reece
-------

C70:info-cpm (07/26/82)

>From rconn@BRL Sun Jul 25 19:18:58 1982
Jim,

        For your particular problem, there are several  directory
utilities,  including  XDIR2, which provide a print option.  That
may be a simple direct solution.

        The use of the character string "^P"  will  probably  not
work since the interpretation for ^P is done in the BDOS, and the
CCP (ZCPR is what I tested against) reads the $$$.SUB  file  from
disk  and  the control character doesn't pass thru the BDOS input
routine, and, hence, is not interpreted.

        Aside from using a  directory  utility  which  gives  you
printer  output,  an  alternative  is  to implement as one of the
redirectable I/O devices a special device driver  which  provides
console  input  and console/printer output in parallel.  Then, by
simply running STAT to select the new device,  you  turn  on  the
printer  for all output to the screen, and you can run STAT again
when you are done to turn off the printer.  I am using  redirect-
able  I/O  to perform a similar function in which the device tied
to my console is a second  microcomputer,  and  I  can  send  all
screen displays to disk in this way.

                                        Rick

C70:info-cpm (07/26/82)

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

Date: 25 July 1982 23:38-EDT
From: Ronald G. Fowler <RGF at MIT-MC>
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