User`s manual
.NETFRD
5-42
5
.NETFRD
Name
.NETFRD - Retrieve speciÞed Þle blocks
Code
$001C
Description
This routine allows you to retrieve the speciÞed Þle blocks. You
would use this routine multiple times to retrieve the entire Þle.
Prior to using this routine a .NETFOPN system call must have been
performed. For each Þle block retrieved the Þrmware will transmit
a TFTP ACK packet to acknowledge the receipt of data. The end of
data will be signiÞed when the number of bytes transferred is
smaller than the block size. The block size is set at 512 bytes (TFTP
convention). For each .NETFRD system call performed, you must
update (increment by one) the block number Þeld of the command
packet. Initially the block number is one.
Information about the Þle block is passed in a command packet
which has been built in memory. (The user program must Þrst
manually prepare the packet.) The address of the packet is passed
as an argument to the routine. All packets must be word-aligned.
The format of the packet structure, NFILEREAD, is shown below:
FEDCBA9876543210
$00 Controller LUN Device LUN
$02 Status Word
$04
Data Transfer Address
Most SigniÞcant Word
$06 Least SigniÞcant Word
$08 Transfer Byte Count
$0A Block Number
$0C
Data Packet (File Block) Timeout
Most SigniÞcant Word
$0E Least SigniÞcant Word