Availability:
     Level T    , 'w'

  Quick Help:
     Write File, w[FileId],[VolumeNum],[CopyNum],[ByteOffset]

  Description:
    This command receives file data from the host over the serial port interface using the
    YMODEM transfer protocol, then write the received data to the file specified by the user.
    This file transfer protocol is supported by most terminal programs, like Windows
    HyperTerminal. The File Volume, File ID and copy number are entered to select the file.

  Input Parameters:

    0 - File ID Number.
    
        This parameter specifies the File ID number of the file to write.
        Please refer to the following list of File IDs to select the value of this parameter.
        File IDs
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: None
    
    1 - File Volume Number.
    
        This parameter specifies the File Volume number of the file to write.
        Please refer to the following list of File Volume numbers to select the value of this parameter.
        File Volume numbers
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: 3 (System Disc Volume)
    
    2 - Copy Number.
    
        This parameter specifies the File Copy number of the file to write.
    
          Type:    Unsigned 16-bit value
    
          Range:   0 to 0xFFFF
    
          Default: 0
    
    3 - File Offset.
    
        This parameter specifies the byte offset in the file where the received data
        will be written to.
    
          Type:    Unsigned 32-bit value
    
          Range:   0 to 0xFFFFFFFF
    
          Default: 0
    
  Output Data:

    The drive will display following message when it's ready to receive the file from the host.
    
          "Start file transfer protocol in aa seconds."
    
       where
    
          aa       is the time-out limit that the drive waits for the host to start file transfer protocol
    

    If an error occurred, the following information will be displayed.
    
          "DiagError aaaaaaaa"
    
       where
    
          aaaaaaaa is the Diagnostic Error Code
    
    If no error occurred, then the output of this command will be displayed as follows.
    
          "File Volume b"
          "File ID ccc"
          "File Copy Number d"
          "File Descriptor eeeeeeee"
          "File Size ffffffff"
          "Byte Offset gggggggg"
          "Bytes to write hhhhhhhh"
    
       where
    
          b        is the File Volume
    
          ccc      is the File ID
    
          d        is the File Copy Number
    
          eeeeeeee is the File Descriptor
    
          ffffffff is the size of the file in bytes
    
          gggggggg is the byte offset within the file where the data is located
    
          hhhhhhhh is the number of bytes of the data to read
    
          iiiiiiii is the diagnostic error code
    
  Examples:
 
    Example #1:
    To receive the file data from the host using the YMODEM protocol then write the
    received data to the Primary Defects super file in the System Disc volume.
 
       F3 T>w1b

    Example #2:
    To receive the file data from the host using the YMODEM protocol at 115200 bps baud
    rate then write the received data to the Primary Defects super file in the System
    Disc volume.
 
       F3 T>B115200
       User should change the baud rate setting to 115200 bps in the terminal program.
       F3 T>w1b

    Example #3:
    To receive the file data from the host using the YMODEM protocol then write the
    received data to the SPT 1 disc file file in the System Disc volume.
 
       F3 T>q319

  Revision History:

    0001.0000   Initial revision.