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.

SDFI, SDFO–System Data Format I/O Routines<br />

The SDFIOA$ entry point is the same as SDFIO$ except that the calling program can<br />

specify a word offset into the initial read sector address. This allows SDFI to begin<br />

reading on a word boundary instead of a sector boundary. The word offset must be in<br />

the range of 0 through 27. If the word offset is 0, SDFIOA$ performs the same as<br />

SDFIO$.<br />

Calling Sequence for SDFIO$<br />

Auto Switch Common Bank or Relocatable Relocatable<br />

L,U A0,address-of-packet<br />

LMJ X11,CBSDFIO$-1<br />

error return<br />

normal return<br />

Calling Sequence for SDFIOA$<br />

L,U A0,address-of-packet<br />

I$BJ X11,CBSDFIO$<br />

error return<br />

normal return<br />

L,U A0,address-of-packet<br />

LMJ X11,SDFIO$<br />

error return<br />

normal return<br />

Auto Switch Common Bank or Relocatable Relocatable<br />

L,U A0,address-of-packet<br />

L A1,word-offset<br />

LMJ X11,CBSDFIOA$-1<br />

error return<br />

normal return<br />

L,U A0,address-of-packet<br />

L A1,word-offset<br />

I$BJ X11,CBSDFIOA$<br />

error return<br />

normal return<br />

L,U A0,address-of-packet<br />

L A1,word-offset<br />

LMJ X11,SDFIOA$<br />

error return<br />

normal return<br />

If SDFI takes the error return, register A4 contains the error code. See 21.3 for an<br />

explanation of error codes.<br />

If SDFI takes the normal return, SDFI is opened and ready to read images.<br />

21.1.2.2. Read an Image<br />

Each call to SDFI$ or SDFINT$ reads one image from the file or element. SDFI returns<br />

the image in the image buffer and returns the image control word (ICW) in word 10 of<br />

the packet. There are two entry points to read an image.<br />

SDFI$ read an image (truncation if image overflows image buffer)<br />

SDFINT$ read an image (no truncation)<br />

The only difference between SDFI$ and SDFINT$ is how they handle an image buffer<br />

overflow. The SDFI$ entry point truncates images that are too long to fit in the image<br />

buffer. The image buffer is filled, and the rest of the image is lost. SDFI returns the total<br />

length of the image in word 10 (T1) of the FCT if the image is truncated. Therefore, the<br />

caller may detect if an image was truncated by checking whether the image length<br />

returned in word 10 (T1) of the FCT is greater than the image buffer length.<br />

21–8 7833 1733–004

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

Saved successfully!

Ooh no, something went wrong!