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 />

Returns<br />

A call to GETAS$ obtains the next symbolic image from the source input. The image is<br />

returned in the calling program buffer. The images are always returned in the ASCII<br />

character set. If the image was read in Fieldata, it is translated to ASCII before it is<br />

returned to the calling program.<br />

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

buffer is shorter than the image read, only the part of the image that will fit in the buffer<br />

is returned; the rest of the image is lost. SIR$ reads up to a 63-word image and can be<br />

configured to read up to 2047 word images.<br />

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

is passed to the calling program in ASCII, this does not affect the CCS of the image<br />

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

determine the CCS of the output image. For example, a Fieldata image is translated to<br />

ASCII_ISO when passed to the calling program, but the image would still be written to<br />

the source output in Fieldata if the P option or both the P and the Q options are<br />

specified.<br />

If SIR$ takes an error return because of an unrecoverable I/O error, A5 contains the I/O<br />

error status code. If SIR$ takes an error return because of a line-change statement error,<br />

partial line-change statement error, partial line-change editing statement error, source<br />

input image CCS error, or source output image CCS error, A5 is zero and A0 contains a<br />

print control word for a message describing the error. The calling program can do an<br />

ER PRINT$ to print the Fieldata error message.<br />

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

The following information is returned to the calling program in registers A0 through A5<br />

when the normal return is taken:<br />

A0<br />

A1<br />

(S6)<br />

If SIR$ was initialized with OPNSR$ or if SIR$ was initialized with INISR$ and A4<br />

bits 1 and 2 were both clear, the ASCII_ISO CCS identifier 01 is returned. If<br />

SIR$ was initialized with INISR$ and either A4 bit 1 or 2 was set, the CCS<br />

identifier of the image is returned. For a Fieldata image translated to ASCII, the<br />

ASCII_ISO CCS identifier 01 is returned.<br />

The SDF image control word for the record read. If bit 0 (leftmost bit) of register<br />

A1 = 1, the record returned to the caller is a control record, and registers A2 through<br />

A5 are undefined.<br />

23–14 7833 1733–004

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

Saved successfully!

Ooh no, something went wrong!