home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / zsus / z3help / y.lbr / ZSLIBS.HZP / ZSLIBS.HLP
Encoding:
Text File  |  1991-10-09  |  1.8 KB  |  41 lines

  1. :
  2.                              SWITCHABLE OUTPUT
  3.  
  4. ZSLIB's switchable output routines allow printing on the console, printing 
  5. on the printer, or printing on both simultaneously.  ZSLIB uses S-series 
  6. routines from SYSLIB to provide this facility, so the switchable output 
  7. routines operate in exactly the same manner as those in SYSLIB.
  8.  
  9. An external data byte SCTLFL (S control flag) is used to control the 
  10. direction of the output as follows:
  11.  
  12.      00000000b      00h       no output
  13.      00000001b      01h       console output
  14.      10000000b      80h       printer output
  15.      10000001b      81h       console and printer output
  16.  
  17. Default output is to the console, if SCTLFL is not initialized.  However, 
  18. if your program is to be re-run with the ZCPR3 GO command, you should 
  19. always initialize SCTLFL to prevent unpredictable results.
  20.  
  21. SCTLFL should always be declared EXTRN if switchable output is used.
  22.  
  23.                         SWITCHABLE OUTPUT EXAMPLES
  24.  
  25.      ld   a,10000000b         ; to printer only
  26.      ld   (sctlfl),a          ; set control flag
  27.      ld   hl,DatBuf           ; point to BCD date buffer
  28.      xor  a                   ; date in American format
  29.      call sdats1              ; print date on printer
  30.  
  31.      ld   a,10000001b         ; to printer and console
  32.      ld   (sctlfl),a          ; set control flag
  33.      ld   hl,DatBuf           ; point to BCD date buffer
  34.      ld   a,0FFh              ; time in military format
  35.      call stims3              ; print time on both console and printer
  36.  
  37.      ld   a,00000001b         ; to console only
  38.      ld   (sctlfl),a          ; set control flag
  39.      ld   hl,DatBuf           ; point to BCD date buffer
  40.      call swday1              ; print day of week on console
  41.