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.

GETPSF$–Get a Scratch File Routine<br />

Normal Return<br />

If the normal return is taken, the requested files are assigned to the run as track granular,<br />

sector-addressable mass storage files with a maximum size of 3,000 granules. The<br />

GETPSF$ routines do not reassign PSF files. If a PSF file is already assigned and<br />

GETPSF$ is called to assign it again, the normal return is taken and the file remains<br />

exactly as it was before the call to GETPSF$.<br />

The first three characters of all files assigned by the GETPSF$ routines are always PSF.<br />

The last three characters vary, depending on how the GETPSF$ routine was called.<br />

These three characters are returned to the calling program in H1 of register A1 on a<br />

normal return.<br />

On a normal return from GETPSF$ when func-code=GETPSF$, H1 of register A1<br />

contains "$∆∆" if only the file PSF$ was requested or "n$∆", where "n" is the highest<br />

numbered PSF$ file requested. The symbol "∆" represents a blank.<br />

On a normal return from GETPSF$ when func-code=GETPSFN$, H1 of register A1<br />

contains "n$∆", where "n" is the number of the file requested or "$∆∆" if file PSF$ is<br />

requested.<br />

After a normal return, the calling program can store the content of register A1 into a<br />

Fieldata string that can be submitted by ER CSF$ to attach an internal file name to the<br />

PSF file using the @USE command. See the example.<br />

Error Return<br />

When the error return is taken, register A0 contains an error code with auxiliary<br />

information in other registers. The error codes are as follows:<br />

A0 = 0<br />

A0 = 1<br />

A0 = 2<br />

The input value n is negative or exceeds 9. Register A1 contains the value.<br />

A file is assigned to the run that is not in sector-addressable format. Register A1<br />

points to the FACIL$ packet.<br />

A CSF$ request was rejected. Register A1 points to the FACIL$ packet. Register A2<br />

contains the status bits returned by CSF$.<br />

10–4 7833 1733–004

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

Saved successfully!

Ooh no, something went wrong!