When you create a pseudoterminal, you must provide at least
one page to be used as an I/O buffer.
On Alpha and I64 systems, you can allocate one page and divide
it into I/O buffers as needed.
On VAX systems, each page becomes one I/O buffer. You should
allocate no more than six I/O buffers for each pseudoterminal.
No read or write request should reference more than one I/O
buffer at a time. The I/O buffers must be page aligned; therefore,
you should create these pages with the $EXPREG system service or
the LIB$GET_VM_PAGE routine. The pages are owned by the driver until
you delete the pseudoterminal. The application is responsible for
managing the pages and cannot use buffers that are owned by another pseudoterminal.
The application must decide whether to delete the buffers when they
are freed by the driver or to reuse them.
The I/O buffers must be valid pages in virtual address space.
Creating or deleting an I/O buffer does not alter the contents of
the pages.
The low-order word of the status information longword contains
the status of the request. The high-order word of the status information
longword contains the actual number of bytes that are read or written.
Assume that an I/O buffer starting at 200 hexadecimal is available
for use. If you want to read 20 bytes from the pseudoterminal, the readbuf address
would be 200, and the readbuf_len would be
20. An application can use the rest of this buffer for other purposes,
including reading or writing to the pseudoterminal.
Buffer Layout shows how the buffer would look.