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.

18.2.2. MASM WRITE Procedures Buffers and Tables<br />

SAR$ WRITE<br />

All buffers and tables must be provided by the calling program. The recommended<br />

lengths for the buffers and tables are equated to labels in the S$ARWPDEF PROC.<br />

These lengths and labels are listed in Table 18–5. These definitions simplify the creation<br />

of required buffers and tables for the calling program.<br />

Table 18–5. SAR$: MASM WRITE Buffer and Table<br />

Lengths<br />

Label Value<br />

SW$OUTBUFDL (Output buffer word length) 448<br />

SW$IMGBUFDL (Image buffer word length) 63<br />

SW$TEXBUFDL (Text buffer byte length) 132<br />

SW$ATTRIBDL (Attribute table word length) 40<br />

18.2.3. WRITE Procedures Called from MASM<br />

The procedures for the WRITE function are<br />

• S$AROPENO (open output)<br />

• S$ARWRITE (write an image)<br />

• S$ARCLOSO (close output)<br />

The calling sequences for these procedures are generated by MASM PROCs, contained<br />

in the <strong>SYSLIB</strong> file (SYS$LIB$*<strong>SYSLIB</strong>) or SYS$*RLIB$.<br />

18.2.3.1. Open-Output Procedure Call (S$AROPENO)<br />

The WRITE packet and data area must be initialized before any images are written out.<br />

The S$AROPENO PROC performs the WRITE packet initialization.<br />

Initial Conditions<br />

The calling program sets the following parameters in the WRITE packet to appropriate<br />

values before calling S$AROPENO:<br />

• Required parameters (described in 18.2.1.1)<br />

SW$PKTVER<br />

SW$OUTBUFL<br />

W$FIPADDR<br />

W$IMGBUF<br />

W$OUTBUF<br />

W$IMGBUFL<br />

7833 1733–004 18–29

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

Saved successfully!

Ooh no, something went wrong!