Instruction manual
WRITE
WRITE
Write to an I/O device.
Format
status = DISPATCH(WRITE,
channel_nbr,
byte_count,
buffer_ptr,
block);
Arguments
WRITE
WRITE function code (14
16
).
channel_nbr
Channel number of the device to be written.
byte_count
The number of bytes to be written to the device.
buffer_ptr
Virtual address of the buffer from which to fetch the write data.
block
Logical block number of the data to be written. For disks, the physical block
number; for FLASH ROMS, a section of the FLASH ROM.
Description
This routine writes byte_count bytes to the device associated with channel_nbr;it
writes the bytes to the portion of the device associated with block.
The number of bytes to be written to the device should be a multiple of the
device’s record length. If the count is greater than a multiple of the record length,
the byte_count is rounded down to the nearest multiple of the record length.
For tape devices, WRITE does not differentiate between ANSI formatted or
unformatted tapes. The routine writes the number of bytes starting at the
current tape position.
For disk devices, WRITE does not understand the file structure of the device. It
writes the number of bytes to the specified logical block number.
For a network device, WRITE takes the number of bytes and transmits them
over the network using the proper network protocol. The size of the packet is
protocol-dependent. The protocol is selected by the OPEN command.
For a FLASH ROM device, WRITE writes the number of bytes to the portion of
the FLASH ROM specified by the BLOCK.
16–74 Console