home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / BEEHIVE / ZSUS / Z3HELP-5.LBR / V.LBR / VLIB2.HZP / VLIB2.HLP
Text File  |  2000-06-30  |  10KB  |  296 lines

  1.  Screen Clearing  - CLS, CLREOS
  2.  Erase to EOL     - EREOL
  3.  Goto XY          - AT, GOTOXY
  4.  Initialization   - VIDINIT, Z3VINIT
  5.  Print            - GXYMSG, VPRINT, VPSTR
  6.  Standout Mode    - STNDOUT, STNDEND
  7.  Term Init        - TINIT, DINIT
  8.  Insert/Delete    - DELLIN, INSLIN
  9.  Test Cursor key  - ISCUR
  10.  Version ID       - VVERS
  11. :CLS - Clear Entire Screen and Home Cursor
  12.  
  13.   ENTER: None
  14.   EXIT :  A <> 0 Zero Flag Reset (NZ) if screen cleared
  15.           A = 0, Zero Flag Set (Z) if fcn Not available
  16.   USES : AF
  17.  
  18.  Usage: Most often used to provide initial entry conditions,
  19.   or to divide functions of a program for ergonomic reasons.
  20.  
  21. CLREOS - Clear from current Cursor Position to End-of-Screen
  22.         leaving Cursor in present position
  23.  
  24.   ENTER: None
  25.   EXIT :  A <> 0 Zero Flag Reset (NZ) if screen cleared
  26.           A = 0, Zero Set (Z) if function Not available
  27.   USES : AF
  28.  
  29.  Usage: Most often used to remove transient information from
  30.   the lower part of a screen while retaining information on
  31.   the upper part.
  32.  
  33. :EREOL - Erase line from cursor position to End-of-Line
  34.  
  35.   ENTER: None
  36.   EXIT :  A <> 0 Zero Flag Reset (NZ) if line erased
  37.           A = 0, Zero Flag Set (Z) if fcn Not available
  38.   USES : AF
  39.  
  40.  Usage: Used to insure that remaining information on a line
  41.   is cleared
  42.  
  43. :AT - Position cursor from In-Line code coordinate positions
  44.  
  45.   ENTER: None.  Address of XY coordinates are on Stack Top
  46.   EXIT : None.  Execution resumes at instr after XY coordinates
  47.   USES : None
  48.  
  49.  Usage: Position the cursor at row and column address pointed
  50.   to by the return address.  Used where the desired Row and
  51.   Column position is known by the program, and does not change
  52.   with program flow.  See GOTOXY for positioning routine that
  53.   may be varied within a program.  Note: There is no checking
  54.   of terminal limits in the Environment.
  55.  
  56. Example:
  57.     EXT    AT        ; Declare the routine
  58.     ...            ; ..other parts of program
  59.     CALL    AT        ; Call the positioning routine
  60.     DEFB    ROW,COL        ; ..Row and Column (1,1 is home)
  61.     ...            ; Program flow resumes here
  62.  
  63. GOTOXY - Position cursor from Row & Column data in registers
  64.  
  65.   ENTER: HL = Desired Cursor position (H=Row, H=Column)
  66.   EXIT :  A <> 0 Zero Flag Reset (NZ) if Cursor positioned
  67.           A = 0, Zero Set (Z) if function Not available
  68.   USES : AF
  69.  
  70.  Usage: Position the cursor at Row (in Register H) and Column
  71.   (in L).  The Home position (Top left corner) is H=1 and L=1.
  72.   When the desired Cursor position is fixed, you may want to
  73.   use AT (above).  (*) Bits 1 and 2 of the new Mode Byte should
  74.   be sensed before positioning to last Column in a Row to avoid
  75.   Screen Wrap/Scroll problems.
  76.  
  77. Example:
  78.     EXT    GOTOXY        ; Declare the routine
  79.     ...            ; ..intervening code
  80.     LD    HL,10*256+3    ; Load coords (Row 10, Col 3)
  81.     CALL    GOTOXY        ; Try to position the Cursor
  82.     JR    NZ,MOVOK    ; ..jump if successful
  83.     ...            ; Else try something else
  84.  
  85. :               VLIB Initialization 
  86.  
  87. VIDINIT - Initialize the VLIB routines to a specified TCAP.
  88.  
  89.   ENTER: HL = Address of a Z3 formatted TCAP
  90.   EXIT : None
  91.   USES : None
  92.   EFFECTS : VIDPTR global ptr is initialized to TCAP, VLIB set
  93.  
  94.  Usage: This routine provides the ability to use a TCAP other
  95.   than that provided in the ZCPR3 Environment.  For added
  96.   safety in programming, you should also set the Z3LIB variable
  97.   ENVPTR to an address pointing to an ENV construct which
  98.   provides terminal parameters to some routines.
  99.  
  100. Example:
  101.     EXT    VIDINIT        ; Declare the routine
  102.     ...            ; ..program initialization code
  103.     LD    HL,(Z3EADR)    ; Load ENV address
  104.     LD    DE,80H        ; Offset to TCAP portion
  105.     ADD    HL,DE
  106.     CALL    VIDINIT        ; ..and initialize VLIB
  107.     ...            ; Carry on with program
  108.  
  109. Z3VINIT - Initialize Z3LIB and VLIB routines for use.
  110.  
  111.   ENTER: HL = Address of a ZCPR3 Environment Descriptor
  112.   EXIT : None
  113.   USES : None
  114.  
  115.  Usage: This routine combines the functions of the Z3LIB
  116.   routine Z3INIT and VIDINIT covered above.  It assumes that
  117.   the TCAP begins 80H (128) bytes after the specified Environ-
  118.   ment pointer passed in HL.
  119.  
  120. Example:
  121.     EXT    Z3VINIT        ; Declare the routine
  122.     ...            ; ..Initial program code
  123.     LD    HL,(Z3EADR)    ; Get the Environment address
  124.     CALL    Z3VINIT        ; ..set ENVPTR and init VLIB
  125.     ...            ; Carry on!
  126.  
  127. :                     Print Routines 
  128.  
  129. GXYMSG - Position Cursor and print text with highlighting
  130.  
  131.   ENTER: None.  Addr of XY coords followed by text on stack top
  132.   EXIT : None.  Execution resumes after text terminating Null
  133.   USES : None
  134.  
  135.  Usage: This routine is used to print a text message at a pre-
  136.   defined location on the Terminal screen.  It is analagous to
  137.   positioning the cursor with AT followed by a string print
  138.   with VPRINT.  Standout and Standend attributes are recognized
  139.   with binary 1 and 2 respectively.  Note: There is no
  140.   checking of terminal limits in the Environment.
  141.  
  142. Example:
  143.     EXT    GXYMSG        ; Declare the routine
  144.     ...            ; ..intervening code
  145.     CALL    GXYMSG        ; Print as...
  146.     DEFB    2,15        ; Position to Row 2, Column 15
  147.     DEFB    1,'Hi',2    ; ..and print this message
  148.     DEFB    ' There!',0    ; ...highlighting "Hi"
  149.     ...            ; Execution resumes here
  150.  
  151. VPRINT - Print null-terminated Inline text with Highlighting
  152.  
  153.   ENTER: None.  The String starting address in on Stack Top
  154.   EXIT : None.  Execution resumes after String terminator
  155.   USES : None
  156.  
  157.  Usage: This routine is used to print a text string from Inline
  158.   code with Highlighting ability by enabling STNDOUT mode with
  159.   a binary 1, and resuming normal print via STNDEND with a
  160.   binary 2.  This is VLIB's version of the SYSLIB routine PRINT.
  161.  
  162. Example:
  163.     EXT    VPRINT        ; Declare the routine
  164.     ...            ; ..intervening code
  165.     CALL    VPRINT        ; Print the following line
  166.     DEFB    2,'Hi',1    ; ..hilighting "Hi" and
  167.     DEFB    ' There',0    ; ...the remainder in normal
  168.     ...            ; Execution resumes here
  169.  
  170. VPSTR - Print a null-terminated message with Highlighting
  171.  
  172.   ENTER: HL = Address of Null-terminated string to print
  173.   EXIT : HL = Points to byte after terminating Null
  174.       A = 0, Zero Flag Set (Z)
  175.   USES : AF,HL
  176.  
  177.  Usage: This routine is used to print text messages with High-
  178.   lighting capabilities provided by STNDOUT/STNDEND from
  179.   locations other than the executing code.  It is the VLIB
  180.   corollary of PSTR in SYSLIB.
  181.  
  182. :                    Standout Mode 
  183.  
  184. STNDOUT - Begin Standout mode.  For terminals with Reverse
  185.   Video, this routine will start that mode.  For those with DIM
  186.   or reduced video, use TINIT to set the terminal to that mode
  187.   for normal print, and STNDOUT to place in Normal mode.  DINIT
  188.   should then reverse on exit.
  189.  
  190.   ENTER: None
  191.   EXIT :  A <> 0 Zero Flag Reset (NZ) if Standout Mode Entered
  192.           A = 0, Zero Flag Set (Z) if Not available
  193.   USES : AF
  194.  
  195.  Usage: This mode is used to provide visual attributes for
  196.   better man-machine interface.  CAUTION: Do NOT reposition
  197.   the cursor or issue Carriage Returns or Line Feeds while the
  198.   Standout mode is in effect since unknown effects can occur on
  199.   some types of terminals.  Use STNDEND to disable this mode.
  200.  
  201. STNDEND - End Standout Mode, return to Normal Screen Display
  202.  
  203.   ENTER: None
  204.   EXIT :  A <> 0 Zero Flag Reset (NZ) if Standout Mode Ended
  205.           A = 0, Zero Set (Z) if function Not available
  206.   USES : AF
  207.  
  208.  Usage: This reverses the mode set by STNDOUT above.  See notes
  209.   for STNDOUT
  210.  
  211. :          Terminal Initialization and Deinitialization 
  212.  
  213. TINIT - Initialize terminal for use with VLIB routines
  214.  
  215.   ENTER: None
  216.   EXIT : None
  217.   USES : None
  218.  
  219.  Usage: When writing programs based on VLIB routines, TINIT
  220.   should be called early in the program flow.  If you are using
  221.   video attributes to provide highlighting with STNDOUT/STNDEND
  222.   and your terminal only provides a DIM or reduced-intensity
  223.   attribute, TINIT should set the normal mode to the DIM or
  224.   Reduced mode, and STNDOUT used for normal intensity print.
  225.   The corresponding DINIT should be used to restore normal mode
  226.   just priot to program exit.
  227.  
  228. DINIT - De-initialize the terminal.  Return to Normal
  229.  
  230.   ENTER: None
  231.   EXIT : None
  232.   USES : None
  233.  
  234.  Usage: Normally used to restore terminal default conditions
  235.   upon program termination.  See Usage notes for TINIT.
  236.  
  237. Example:
  238.     EXT    TINIT,DINIT    ; Declare the routines
  239.     ...            ; ..initial program code
  240.     CALL    TINIT        ; Initialize the terminal
  241.     ...            ; ..main program code
  242.     CALL    DINIT        ; Do just before exitting pgm
  243.     JP    EXIT        ; ..and return to normal
  244.  
  245. :DELLIN - Delete the currently addressed line
  246.  INSLIN - Insert a new line at the current cursor position
  247.  
  248.   ENTER: None
  249.   EXIT :  A <> 0, Zero Flag Clear (NZ) if action completed,
  250.           A = 0, Zero Set (Z) if function Not defined.
  251.   USES : AF
  252.  
  253.  Usage: These routines may be used to enhance screen editor
  254.   functions under ZCPR3 with appropriate TERMCAP definitions.
  255.  
  256.  Example:
  257.     EXT    DELLIN,INSLIN    ; Declare the routines
  258.     ...            ; ..pos'n cursor to desired line
  259.     CALL    DELLIN        ; Kill it!
  260.     JR    Z,NOTDONE    ; ..jump if not defined
  261.     ...            ; ..position to new line pos'n
  262.     CALL    INSLIN        ; New line here, push others down
  263.     JR    Z,NOINSL    ; ..jump if not defined
  264.     ...            ; Else continue on
  265.  
  266. :ISCUR - Test character for Cursor Movement Key
  267.  
  268.   ENTER:  A = Character to test
  269.   EXIT :  A = 1..4 (1=Up, 2=Down, 3=Right, 4=Left), Zero Clear
  270.         (NZ) if Character is Cursor key from TCAP or
  271.         WordStar Cursor key
  272.           A = Character, Zero Set (Z) if NOT Cursor key
  273.   USES : AF
  274.  
  275.  Usage: This routine may be called to determine if a character
  276.   is a command to move the cursor Up, Down, Right or Left.
  277.   Both single char commands from the Extended TCAP as well as
  278.   WordStar ^E, ^X, ^D and ^S are checked.
  279.  
  280. Example:
  281.     EXT    ISCUR, CIN    ; Declare some routines
  282.     ...            ; ..preceding code
  283.     CALL    CIN        ; Get a char from the keyboard
  284.     CALL    ISCUR        ; Is it a cursor key?
  285.     JR    Z,NOCUR        ; ..jump if not a cursor key
  286.  
  287. :VVERS - Return the VLIB version number.
  288.  
  289.   ENTER: None
  290.   EXIT : HL - contains VLIB version number (H=major, L=minor)
  291.   USES : HL
  292.  
  293.  Usage: This routine is most often called for debugging or
  294.   documentation purposes to include the VLIB library version
  295.   number linked in programs.
  296.