18.08.2013 Views

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SAR$ READ<br />

17.2. READ Function/MASM Interface<br />

The SAR$ READ procedures can be called directly from MASM. The SAR$ data<br />

structure definitions and procedure calls are defined by MASM procedures (PROCs).<br />

The element SAR$PROCS contains these PROCs.<br />

17.2.1. READ Packet and Data Area Description<br />

The SAR$ READ function requires a READ packet and data area for the open-input, read,<br />

and close-input calls. The S$ARRPDEF PROC generates the EQUFs defining the READ<br />

packet fields. The word length of the MASM READ packet and data area is at label<br />

SR$PKTWLEN defined by the S$ARRPDEF PROC (the current length is 72 words).<br />

17.2.1.1. Required Information for READ Procedures<br />

The calling program must set the following fields of the READ packet to appropriate<br />

values:<br />

SR$PKTVER<br />

The READ packet data structure version. The current version is equal to the label<br />

SR$CURVER defined by the S$ARRPDEF PROC. SR$PKTVER must not be modified<br />

between calls to the SAR$ READ routine.<br />

SR$FIPADDR<br />

The address of the input file information packet. This packet is supplied by the caller<br />

(see 16.1). Set this field to zero if input is from the runstream.<br />

SR$INPBUF<br />

The address of the input buffer, used to read images from the input file or element.<br />

This field is defined only if input is from an SDF file or element. It is omitted if input<br />

is from the runstream or an alternate READ$ file. Subsection 16.1.2 describes the<br />

input buffer.<br />

SR$INPBUFL<br />

The length in words of the input buffer. It must be of length 28 * dpf * n, where dpf<br />

is the disk prepping factor and n is a positive integer. This field is defined only if<br />

input is from an SDF file or element. It is omitted if input is from the runstream or<br />

an alternate READ$ file.<br />

SR$IMGBUF<br />

The address of the input image buffer into which SAR$ places individual images<br />

from the input buffer. Subsection 16.1.2 describes the image buffer.<br />

17–20 7833 1733–004

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!