;
                                    REG.COM                                   

             Size (recs) CRC   Version    Author/Latest Issue      Disk
REG.COM        2k (11)   A302  1.2        Howard Goldstein 1/89    Z3COM5
REG.3OM        2k (11)   BD20  1.2        Howard Goldstein 1/89    Z3COM5
REG.4OM        2k (14)   80C1  1.2        Howard Goldstein 1/89    Z3COM5

  1- Syntax  2- Notes  3- Error Messages  4- Examples of Use                   


   REG  displays,  adds 1 to,  subtracts 1 from,  or loads a value  into,  the 
indicated register.   A ZCPR3 Register is a one-byte buffer (values may  range 
from 0 to 255 decimal).

   The value  used to indicate a register is a character from '0' to '9'.  The
character '#' indicates all registers.
:1


   Syntax:  REG Dr or REG r        <-- display Register

            REG Mr (or -r)         <-- Minus (Set Register r=r-1)

            REG Pr (or +r)         <-- Plus (Set Register r=r+1)

            REG Sr value           <-- Set (Set Register r=value)

   where "r" may be 0-31 for one reg, E for error flag,
   # for regs 0-9 or * for all regs.

   Add Q at end of command for quiet mode.
:2

REG Notes:

   a. Registers  are used  1) to  support looping  in  ZEX  command files  (do 
      something N  times), and  2) to  pass parameter  values from one program
      to another program which is executed later.

   b. REG  has a  counterpart command  in the  System Resident Command Package
      provided in the ZCPR3 distribution.

   c. Vs. 1.1 adds type  3 format  with safety header.  Illegal set values get 
      error message and Program Error Flag indication.  "+" & "-" are synonyms
      for "P" and "M" for increment/decrement functions.

   d. Vs 1.2  adds support  for all 32 registers plus  error flag (denoted  by
      "E").  "#" still  represents regs 0-9;  "*" is 0-31.   All references to 
      the system quiet flag  are removed  in  favor  of  a  "Q"  option  which 
      suppresses display on set,  decrement and increment functions.   Support 
      added for type-4 environment.   Load address now shown in banner on help
      message.
:3


Error Messages:

   Invld Reg ID:  c              <-- REG (Transient)

      - the register indicated was not symbolized by '0' to '9' or '#'
:4


Examples of Use:

   a. REG S0 4     <-- reg 0 = 4
      
   b. REG S5       <-- reg 5 = 0
   
   c. REG P        <-- reg 0 = reg 0 + 1

   d. REG P5       <-- reg 5 = reg 5 + 1

   e. REG M9       <-- reg 9 = reg 9 - 1

   f. REG D        <-- show values

   g. REG          <-- show values  
