home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / zcpr33 / v4libhlp.lbr / SYSLIB6.HZP / SYSLIB6.HLP
Encoding:
Text File  |  1989-05-01  |  6.5 KB  |  191 lines

  1.   General
  2.  Char Input Via BDOS             - BIN
  3.  Char Input Status Via BDOS      - BIST
  4.  Char Output Via BDOS            - BOUT
  5.  Char Input & Capitalize w/Echo  - CAPIN, CAPINE
  6.  Char Input                      - CIN, RIN
  7.  Char Output                     - COUT, LOUT, POUT, SOUT
  8.  Char Output with Control Chars  - CCOUT, CLOUT, CPOUT, CSOUT
  9.  Conditional Input               - CONDIN
  10.  New Line Output                 - CRLF, LCRLF, SCRLF
  11.  Console Status                  - CST
  12. :                        General 
  13. This set of routines provides simple I/O capabilities with
  14. absolutely no side effects on any registers.  Direct BIOS
  15. calls are used on all routines except for BIN, BIST, and BOUT,
  16. so functions such as ^P (which are implemented by the BDOS)
  17. will not work by-and-large.
  18.  
  19. The I/O capabilities provided by these routines include:
  20.  
  21.     Character Input from Console and Reader
  22.     Character Output to Console, Printer, and Punch
  23.     Character Output to Console, Printer, and Punch
  24.         with Control-Character Processing
  25.     Console Input Status
  26.     Conditional Input
  27.     New Line (CRLF) Output
  28.     Capitalized Character Input
  29.  
  30. Switched Output is provided in this set of routines; these are
  31. called the S-series of routines, and are complementary to the
  32. S-series numeric print routines.
  33.  
  34. The S-series of routines is different from the other series
  35. in that the S-series uses an external data byte to determine
  36. where the output is to be routed.  This byte is referred to as
  37. SCTLFL (S Control Flag), and its switching function is
  38. illustrated in the following table:
  39.  
  40.     ----- SCTLFL -----
  41.      Binary        Hex       Outputs to
  42.  
  43.     00000000B      00H       Nothing
  44.     00000001B      01H       Console
  45.     10000000B      80H       Printer
  46.     10000001B      81H       Console and Printer
  47.  
  48. If you do not initialize the SCTLFL variable before using an
  49. S-routine, output will go to the console (the default is 01H).
  50.  
  51.  
  52.  An example of code using S-routines is:
  53.  
  54.     EXT    SCTLFL,SOUT    ; SCTLFL flag, SOUT routine
  55.     ...
  56.     LD    A,81H        ; enable printer and console
  57.     LD    (SCTLFL),A
  58.     ...
  59.     LD    A,'A'        ; print character 'A'
  60.     CALL    SOUT
  61.     ...
  62.     LD    A,80H        ; enable printer only
  63.     LD    (SCTLFL),A
  64.     ...
  65.     LD    A,'a'        ; print character 'a'
  66.     CALL    SOUT
  67.     ...
  68.  
  69. :BIN - BDOS Console Char Input Routine
  70.  
  71.   ENTER: None
  72.   EXIT :  A = Character input from CON:
  73.   USES : AF
  74.  
  75.  Usage:  This routine is used to input a character from the
  76.   Console with normal BDOS processing (Echo, ^P/^S sensing).
  77.  
  78. :BIST - BDOS Character Input Status Routine
  79.  
  80.   ENTER: None
  81.   EXIT :  A <> 0, Zero Flag Clear (NZ) if Character ready
  82.           A = 0, Zero Flag Set (Z) if No Char
  83.   USES : AF
  84.  
  85.  Usage:  This routine is used to return the console input
  86.   status via BDOS Function 11.
  87.  
  88. :BOUT - BDOS Character Output Routine
  89.  
  90.   ENTER:  A = Character to send to Console Display
  91.   EXIT : None
  92.   USES : None
  93.  
  94.  Usage:  This routine is used to output a character to the
  95.   Console via BDOS Function 2.
  96.  
  97. :CAPIN  - Capitalized Character Input
  98.  CAPINE - Capitalized Character Input with Echo
  99.  
  100.   ENTER: None
  101.   EXIT :  A = Capitalized Character input from Console
  102.   USES : AF
  103.  
  104.  Usage:  These routines wait for an input character from the
  105.   Console, capitalize it, and return it to your program.  CAPIN
  106.   simply returns the capitalized character, while CAPINE also
  107.   echoes it to the Console Display.
  108.  
  109. :CIN - Input a Character from the Console
  110.  RIN - Input a Character from the Reader (Auxiliary) Device
  111.  
  112.   ENTER: None
  113.   EXIT :  A = Character from Console (CIN) or Reader (RIN)
  114.   USES : AF
  115.  
  116.  Usage:  These routines provide character input functions with
  117.   BIOS-level interfaces avoiding BDOS processing.  They are
  118.   somewhat faster in response than their BDOS counterparts.
  119.  
  120. :COUT - Output a Character to the Console
  121.  COUT7- Output a Character to the Console stripping MSB
  122.  LOUT - Output a Character to the List Device (Printer)
  123.  POUT - Output a Character to the Punch (Auxiliary) Device
  124.  SOUT - Output a Character to the Switched (CON:/LST:) Output
  125.  
  126.   ENTER:  A = Character to Send to Output Device
  127.   EXIT : None  (COUT7 returns Char in A with MSB clear)
  128.   USES : AF
  129.  
  130.  Usage:  These routines are used for direct BIOS-level output
  131.   within a program.  They avoid the BDOS character traps and
  132.   processing, and are therefore somewhat faster than BDOS
  133.   routines.  COUT7 is identical to COUT except that the High-
  134.   order bit is stripped from the Output Character before
  135.   passing it to the driver.
  136.  
  137. :CCOUT - Output to Console with Control Char Display
  138.  CLOUT - Output to List Device with Control Char Display
  139.  CPOUT - Output to Punch Device with Control Char Display
  140.  CSOUT - Output to Switched CON:/LST: with Control Char Display
  141.  
  142.   ENTER:  A = Character to Output
  143.   EXIT : None
  144.   USES : Flags
  145.  
  146.  Usage:  These routines should be used to control printing to
  147.   devices which may be disturbed by non-printing (control)
  148.   characters.  They function as their primary counterparts for
  149.   normal printable characters, but treat all ASCII codes less
  150.   than a space (20H) except for <NULL>, <BEL>, <BS>, <LF>, and
  151.   <CR> in a special manner.  These values are output as an
  152.   Uparrow (^) followed by the corresponding letter generated by
  153.   adding 40H to the character value (i.e. 1 outputs as "^A", 2
  154.   as "^B", etc.).  The following values are output directly:
  155.  
  156.           <NULL>  <BEL>  <BS>  <LF>  <CR>
  157.  
  158. :CONDIN - Conditional Console Input
  159.  
  160.   ENTER: None
  161.   EXIT :  A = Console Character, Zero Clear (NZ) if present
  162.           A indeterminate, Zero Set (Z) if NO Character
  163.   USES : AF
  164.  
  165.  Usage:  This routine is used to test for any waiting character
  166.   on the Console, and return it.  If no character is waiting,
  167.   the routine returns a flag indicating that no character was
  168.   returned.
  169.  
  170. :CRLF  - Send Carriage Return/Line Feed to Console
  171.  LCRLF - Send Carriage Return/Line Feed to LST: (Printer)
  172.  SCRLF - Send Carriage Return/Line Feed to Switched Output
  173.  
  174.   ENTER: None
  175.   EXIT : None
  176.   USES : None
  177.  
  178.  Usage:  These routines simply send a New Line combination of
  179.   Carriage Return/Line Feed to the CON: (CRLF), LST: (LCRLF),
  180.   or switched output (SCRLF).
  181.  
  182. :CST - Return Console Status Routine
  183.  
  184.   ENTER: None
  185.   EXIT :  A = 0, Zero Flag Set (Z) if Console Data Available
  186.           A = 1, Zero Clear (NZ) if NO Data Available
  187.   USES : AF
  188.  
  189.  Usage:  This routine is used to quickly sample the Console
  190.   status with a direct BIOS interface.
  191.