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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SIR$–Symbolic Input/Output Routine<br />

If the buffer is longer than the image, the buffer is filled to the end. If the image is<br />

Fieldata, the buffer is filled with Fieldata spaces, octal 05. If the image is ASCII or<br />

ASCII-like, the buffer is filled with ASCII spaces, octal 040. If the image is in an "other"<br />

CCS, the buffer is filled with binary zero characters, octal 0. If the buffer is shorter than<br />

the image, only “buffer-length” words are returned; the remainder of the image is lost.<br />

SIR$ reads images up to 63 words and can be configured to read images up to 2,047<br />

words.<br />

If symbolic output is specified, SIR$ writes the image. Note that even though the image<br />

is passed to the calling program without translation, this does not affect the CCS of the<br />

image when it is written to the source output. As previously described, the P and Q<br />

options determine the CCS of the output image.<br />

If SIR$ takes an error return, the information returned is the same as described for<br />

GETAS$ in 23.2.3.<br />

SIR$ takes the end-of-file return when there are no more symbolic images to read in<br />

either the source input or the runstream.<br />

When SIR$ takes a normal return, information is returned to the calling program in<br />

registers A0 through A5. If the passed image is Fieldata, the return information is as<br />

described in 23.2.4 for GETSR$. If the passed image is not Fieldata (ASCII, ASCII-like,<br />

or “other”), the return information is as described in 23.2.3 for GETAS$.<br />

23.2.6. CLOSR$–Close SIR$ Input and Output<br />

CLOSR$ closes the symbolic input file. If there is symbolic output, CLOSR$ closes the<br />

symbolic output file.<br />

CLOSR$ provides termination for the first and all subsequent passes. SIR$ closes the<br />

SDFI routine. If symbolic output was specified, SIR$ closes the SDFO routine. If the call<br />

to SIR$ is a first pass and the symbolic output is an element, an entry is made in the<br />

symbolic output program file through the Program File Package Insert routine (ER PFI$).<br />

Calling Sequence<br />

LMJ X11,CLOSR$<br />

error return<br />

normal return<br />

Error Return<br />

SIR$ takes the error return when SDFO is unable to close the symbolic output. Two<br />

other error returns are possible when source output is to be written to a program file<br />

element. SIR$ takes the error return when the text length is over 262,143 sectors or<br />

when ER PFI$ returns an error to SIR$.<br />

In the case of an SDFO error, register A5 contains the I/O error status code. In the two<br />

other cases, A5 is zero. In the case of the text length over 262,143 sectors, register A2<br />

contains the sector count, which is always at least octal 01000000. In the case of an<br />

ER PFI$ error, register A2 contains the PFI$ error status code, which is always less than<br />

octal 0100. (See the ER <strong>Programming</strong> <strong>Reference</strong> <strong>Manual</strong>.)<br />

7833 1733–004 23–19

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

Saved successfully!

Ooh no, something went wrong!