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.

Example<br />

$INCLUDE ‘MAXR$/’<br />

$(2)<br />

PSFNUM $EQU 3<br />

FUNCT $EQU ‘GETPSF$’<br />

VALUE + 3<br />

BUFFER $RES 13<br />

BUFFLN $EQU $-BUFFER<br />

CSFIMG ‘@USE SF,PSF ‘<br />

$(1)<br />

START .<br />

G$ETPSF,‘CB’ FUNCT,3 BUFFER<br />

J PSFERR<br />

LXI,U X11,0<br />

G$ETPSF ‘GETPSFN$’,PSFNUM BUFFER<br />

J PSFERR<br />

S A1, CSFIMG + 2<br />

L A0, (3, CSFIMG)<br />

ER CSF$<br />

JN A0, PSFERR<br />

LA,U A1,BUFFER<br />

G$ETPSF,‘CB’ ‘GETPSF$’,VALUE<br />

J PSFERR<br />

J DONE<br />

PSFERR .<br />

L$SNAP ‘PSFERR’,2,0,0<br />

DONE .<br />

ER EXIT$<br />

$END START<br />

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

The preceding examples all call the GETPSF$ routine to assign four temporary files to<br />

the run (files PSF$, PSF1$, PSF2$, and PSF3$). The last call does not include BUFFER<br />

as a parameter. Prior to making the call, the address of BUFFER must have been loaded<br />

into register A1. The internal filename "SF" is attached to filename "PSF3$."<br />

7833 1733–004 10–5

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

Saved successfully!

Ooh no, something went wrong!