Availability:
     All Level  , 'A'

  Quick Help:
     Set Test Space, A[OptsOrParmSelect],[ParmValue],[AddrType],[HdForCylLimit]

  Description:
    The Set Test Space command configures the diagnostic Test Space based on the parameters
    entered.

  Input Parameters:

          0 - Test Space Parameter select / Test Space Options low.
         
              If Parameter 0 bit 3 is set, Parameter 0 bits 2-0 specify the Test Space
              Parameter to be modified and Parameter 1 contains the new parameter value.
              If Parameter 0 bit 3 is cleared, Parameter 0 bits 7-4 and 2-0 select the
              following Test Space Options.  If Parameter 0 is not entered, the Test Space
              will not be modified and the current Test Space configuration will be
              displayed.
         
                  Bit F-B: not used
         
                  Bit A: Sequential 80% and Random 20%
         
                         If set, the cylinder and head address will be updated sequentially
                         80% of the time and randomly 20% of the time.
         
                  Bit 9: Random Transfer Length
         
                         If set, a random transfer length will be used for read/write
                         operations.
         
                  Bit 8: Random Starting Sector
         
                         If set, a random starting sector will be used for read/write
                         operations.  If cleared, read/write operations will start at
                         sector 0.
         
                  Bit 7: Random Data
         
                         If set, random data will be used for disk write operations.  If
                         cleared, the existing buffer data will be used for write operations.
         
                  Bit 6: Sequential Out
         
                         If set, the cylinder and head address will be updated sequentially
                         from the Inner Diameter to the Outer Diameter.  If cleared, the
                         cylinder and head address will be updated sequentially from the
                         Outer Diameter to the Inner Diameter.
         
                  Bit 5: Odd Cylinders
         
                         If set, only odd numbered cylinders will be accessed.
         
                  Bit 4: Even Cylinders
         
                         If set, only even numbered cylinders will be accessed.
         
                  Bit 3: Update Test Space Parameter
         
                         If set, bits 7-4 will not be used and bits 2-0 will select the
                         following Test Space Parameters to be modified:
         
                           0 = Set Minimum Cylinder to Parameter 1 value.
         
                           1 = Set Maximum Cylinder to Parameter 1 value.
         
                           2 = Set Maximum Head to Parameter 1 value.
         
                           3 = Set Minimum LBA to Parameter 1 value.
         
                           4 = Set Maximum LBA to Parameter 1 value.
         
                           5 = Select the default Test Space.
         
                           6 = Set Minimum Head to Parameter 1 value.
         
                           7 = Set Target Buffer Sector Offset to Parameter 1 value.
         
                  Bit 2: Random Cylinder and / or Head
         
                         If Bit 1 (All Cylinders) is set and this bit is set, all cylinders
                         (Minimum Cylinder to Maximum Cylinder) will be accessed in a
                         pseudo-random fashion.  If Bit 1 (All Cylinders) is set and this
                         bit is cleared, all cylinders (Minimum Cylinder to Maximum Cylinder)
                         will be accessed in a sequentially fashion.  If Bit 1 (All Cylinders)
                         is cleared and this bit is set or cleared, only the current cylinder
                         will be accessed.
         
                         If Bit 0 (All Heads) is set and this bit is set, all heads (Minimum
                         Head to Maximum Head) will be accessed in a pseudo-random fashion.
                         If Bit 0 (All Heads) is set and this bit is cleared, all heads (Minimum
                         Head to Maximum Head) will be accessed in a sequentially fashion.  If
                         Bit 0 (All Heads) is cleared and this bit is set or cleared, only the
                         current head will be accessed.
         
                  Bit 1: All Cylinders
         
                         If set, all cylinders (Minimum Cylinder to Maximum Cylinder) will be
                         accessed.  If cleared, only the current cylinder will be accessed.
         
                         If this bit is set, Bit 2 will specify if the cylinder address is to be
                         updated randomly or sequentially.
         
                  Bit 0: All Heads
         
                         If set, all heads (Minimum Head to Maximum Head) will be accessed.
                         If cleared, only the current head will be accessed.
         
                         If this bit is set, Bit 2 will specify if the head address is to be
                         updated randomly or sequentially.
         
                Type:    Unsigned 16-bit value
         
                Range:   0 to 0xFFFF
         
                Default: None
         
          1 - Test Space Parameter value.
         
              If Parameter 0 bit 3 is set, Parameter 0 bits 2-0 specify the Test Space
              Parameter to be modified and Parameter 1 contains the new parameter value.
              If Parameter 0 bit 3 is cleared, Parameter 1 is not used.
         
                Type:    Unsigned 32-bit value
         
                Range:   0 to 0xffffffff
         
                Default: None
         
          2 - Test Space Address Type.
         
              When specifying a new Test Space minimum or maximum address, this parameter
              specifies the type of address as follows.
         
                   0 = User Area
                   1 = System Area
                   2 = Physical
         
              For example:
         
                If Parameter 2 is equal to 0 (User Area) and a new maximum cylinder address
                is being specified (Parameter 0 equal to 9), Parameter 1 will specify the
                new maximum logical cylinder address for commands that access the User Area
                in LLL CHS mode.
         
                If Parameter 2 is equal to 1 (System Area) and a new maximum cylinder address
                is being specified (Parameter 0 equal to 9), Parameter 1 will specify the
                new maximum logical cylinder address for commands that access the System Area
                in LLL CHS mode.
         
                If Parameter 2 is equal to 2 (Physical) and a new maximum cylinder address is
                being specified (Parameter 0 equal to 9), Parameter 1 will specify the maximum
                physical cylinder address for commands that use PLP CHS or PLP CHW address
                modes.
         
                Type:    Unsigned 8-bit value
         
                Range:   0 to 2
         
                Default: 0 (User Area)
          3 - Head Address of Minimum or Maximum Cylinder.
         
              When specifying a new Test Space minimum or maximum cylinder address (Parameter 0
              equal to 8 or 9), this parameter specified the head address for which the minimum
              or maximum cylinder address is to be set.  This parameter is not used if the
              minimum or maximum cylinder address is not being set.
              If head is not specified, return not valid so that it will default to current target
              head.
              If head is not
         
                Type:    Unsigned 8-bit value
         
                Range:   0 to maximum head address
         
                Default: 0

  Output Data:


    If an error occurred, the following information will be displayed.
    
          "DiagError aaaaaaaa"
    
       where
    
          aaaaaaaa is the Diagnostic Error Code
    
    If no error occurred, the Test Space Limits for the currently selected Address Modes
    will be displayed as follows.
    
    One of the following strings will be displayed to indicate the diagnostic address
    mode that is currently selected.
    
          "User LBA"            or
          "User LLL CHS"        or
          "User LLP CHW"        or
          "System LBA"          or
          "System LLL CHS"      or
          "System LLP CHW"      or
          "PLP CHS"             or
          "PLP CHW"
    
    This may be followed by one or more of the following strings indicating which Test
    Space options are selected.
    
          "80% Rnd 20% Seq"    (Update the Cylinder and Head Address randomly 80% of
                                the time and sequentially 20% of the time)
    
          "Rnd Cyls"           (Update the Cylinder Address randomly)
    
          "Rnd Hds"            (Update the Head Address randomly)
    
          "Seq Out"            (Update the Cylinder and Head Address sequentially outward
                                from ID to OD)
    
          "Seq In"             (Update the Cylinder and Head Address sequentially inward
                                from OD to ID)
    
          "Even Cyls"          (Only test even numbered cylinders)
    
          "Odd Cyls"           (Only test odd numbered cylinders)
    
          "Rnd Sec"            (Update the Sector address or LBA randomly)
    
          "Rnd Wedge"          (Update the Wedge address randomly)
    
          "Rnd Lngth"          (Use a random Transfer Length for read and write operations)
    
          "Rnd Data"           (Use random data for write operations)
    
    This will be followed by strings indicating the range of addresses being tested.
    
    For the User LBA and System LBA address modes, the followed string indicates the
    range of LBAs being tested.
    
          "LBAs cccccccc - dddddddd"
    
       where
    
          cccccccc is the minimum LBA to be tested
    
          dddddddd is the maximum LBA to be tested
    
    For all other address modes, the following strings indicate the range of heads and
    cylinders being tested.
    
          "Hd e"                        (when testing a single head)
    
          "Hds f - g"                   (when testing a range of heads)
    
          "Cyl hhhhhh"                  (when testing a single cylinder)
    
          "Cyls iiiiii - jjjjjj"        (when testing a range of cylinders)
    
       where
    
          e is the address of the single head being tested
    
          f is the address of the first head being tested
    
          g is the address of the last head being tested
    
          hhhhhh is the address of the single cylinder being tested
    
          iiiiii is the address of the first cylinder being tested
    
          jjjjjj is the address of the last cylinder being tested
    
    The Test Space Limits for all Address Modes will be displayed as follows:
    
          "All Addr Modes"
          "User LBA Mode
          "  LBAs kkkkkkkk - mmmmmmmm"
          "System LBA Mode
          "  LBAs nnnnnnnn - pppppppp"
          "User LLL CHS and User LLP CHW Mode
          "  Hd q Cyls rrrrrr - ssssss"             (repeated for each head in the Test Space)
          "System LLL CHS and System LLP CHW Mode
          "  Hd t Cyls uuuuuu - vvvvvv"             (repeated for each head in the Test Space)
          "PLP CHS and User PLP CHW Mode
          "  Hd w Cyls xxxxxx - yyyyyy"             (repeated for each head in the Test Space)
    
       where
    
          kkkkkkkk is the minimum User Area LBA that will be accessed by commands that use
                   User LBA Address Mode
    
          mmmmmmmm is the maximum User Area LBA that will be accessed by commands that use
                   User LBA Address Mode
    
          nnnnnnnn is the minimum System Area LBA that will be accessed by commands that
                   use System LBA Address Mode
    
          pppppppp is the maximum System Area LBA that will be accessed by commands that
                   use System LBA Address Mode
    
          q        is a Logical Head Address that can be accessed by commands that use
                   User LLL CHS or User LLP CHW Address Modes
    
          rrrrrr   is the minimum User Area Logical Cylinder Address on the specified head
                   that will be accessed by commands that use User LLL CHS or User LLP CHW
                   Address Modes
    
          ssssss   is the maximum User Area Logical Cylinder Address on the specified head
                   that will be accessed by commands that use User LLL CHS or User LLP CHW
                   Address Modes
    
          t        is a Logical Head Address that will be accessed by commands that use
                   System LLL CHS or System LLP CHW Address Modes
    
          uuuuuu   is the minimum System Area Logical Cylinder Address that will be accessed
                   by commands that use System LLL CHS or System LLP CHW Address Modes
    
          vvvvvv   is the maximum System Area Logical Cylinder Address that will be accessed
                   by commands that use System LLL CHS or System LLP CHW Address Modes
    
          w        is a Logical Head Address that will be accessed by commands that use PLP
                   CHS or PLP CHW Address Modes
    
          xxxxxx   is the minimum Physical Cylinder Address on the specified head that will
                   be accessed by commands that use PLP CHS or PLP CHW Address Modes
    
          yyyyyy   is the maximum Physical Cylinder Address on the specified head that will
                   be accessed by commands that use PLP CHS or PLP CHW Address Modes
    
    Following the display above, the Target Buffer Sector Offset will be displayed.
    
          "Buffer Sector Offset bbbbbbbb"
    
       where
    
          bbbbbbbb is the Target Buffer Sector Offset at which from the beginning of
                   diagnostic Read/Write buffer the next Read/Write diagnostic command will
                   transfer data to or from.
    
  Examples:

    Example #1:
    The following command displays without modifying the Test Space that is currently
    selected:

       F3 2>A

    Example #2:
    The following commands specify how the target address is to be updated:

       F3 2>A0           (single cylinder, single head)
       F3 2>A1           (single cylinder, sequential heads)
       F3 2>A2           (sequential inward cylinders, single head)
       F3 2>A3           (sequential inward cylinders, sequential heads)
       F3 2>A5           (single cylinder, random heads)
       F3 2>A6           (random cylinders, single head)
       F3 2>A7           (random cylinders, random heads)

       F3 2>A12          (sequential inward even cylinders, single head)
       F3 2>A13          (sequential inward even cylinders, sequential heads)
       F3 2>A22          (sequential inward odd cylinders, single head)
       F3 2>A23          (sequential inward odd cylinders, sequential heads)

       F3 2>A16          (random even cylinders, single head)
       F3 2>A17          (random even cylinders, random heads)
       F3 2>A26          (random odd cylinders, single head)
       F3 2>A27          (random odd cylinders, random heads)

       F3 2>A42          (sequential outward cylinders, single head)
       F3 2>A43          (sequential outward cylinders, sequential heads)
       F3 2>A52          (sequential outward even cylinders, single head)
       F3 2>A53          (sequential outward even cylinders, sequential heads)
       F3 2>A62          (sequential outward odd cylinders, single head)
       F3 2>A63          (sequential outward odd cylinders, sequential heads)

    Example #3:
    The following commands set the Test Space limits:

       F3 2>A8,123,,0    (sets the minimum user logical cylinder for head 0 to 123)
       F3 2>A9,234,,0    (sets the maximum user logical cylinder for head 0 to 234)
       F3 2>A8,567,,1    (sets the minimum user logical cylinder for head 1 to 567)
       F3 2>A9,890,,1    (sets the maximum user logical cylinder for head 1 to 890)
       F3 2>A8,11,1,0    (sets the minimum system logical cylinder for head 0 to 11)
       F3 2>A9,23,1,0    (sets the maximum system logical cylinder for head 0 to 23)
       F3 2>A8,567,2,0   (sets the minimum physical cylinder for head 0 to 567)
       F3 2>A9,876,2,0   (sets the maximum physical cylinder for head 0 to 876)
       F3 2>AA,3         (sets the maximum head to 3)
       F3 2>AB,4567      (sets the minimum user LBA to 4567)
       F3 2>AC,9876      (sets the maximum user LBA to 9876)
       F3 2>AB,223,1     (sets the minimum system LBA to 223)
       F3 2>AC,7845,1    (sets the maximum system LBA to 7845)
       F3 2>AE,1         (sets the minimum head to 1)

    Example #4:
    The following command resets the Test Space to its default state:

       F3 2>AD

    Example #5:
    The following command sets the Target Buffer Sector Offset to 0

       F3 2>AF,0
 
  Revision History:

    0001.0000   Initial revision.
    0002.0000   Modified for VBAR to support minimum and maximum cylinder address values
                for each head.
    0002.0001   Added new capability that enables users to set the Target Buffer Sector Offset
                to any value they want.
    0011.0000   Combined the PSG Diagnostic Error Codes (PSGDEC) and the Diagnostic External
                Test Service Error Codes (DETSEC) into a single set of Diagnostic Error Codes
                (DiagError).