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

Example<br />

The following example generates the packet (FCT) for SDFI with the S$DFCT PROC:<br />

1. $ASCII<br />

2. $INCLUDE ‘MAXR$’<br />

3. $INCLUDE ‘SDFP$’<br />

4. $(2)<br />

5. PKT S$DFCT,‘DGL’ ‘TPF$’,R$,1792 448,BUF1,BUF2;<br />

6. 20,LINE ,X7<br />

7. BUF1 $RES 448<br />

8. BUF2 $RES 448<br />

9. LINE $RES 20<br />

.<br />

.<br />

.<br />

10. $(1)<br />

11. START<br />

12. L,U X7,PKT . Get address of packet<br />

.<br />

.<br />

.<br />

13. L A6,PKTICW . Get Image Control Word<br />

In this example, the packet (FCT) for SDFI is generated on line 5 by the S$DFCT PROC.<br />

The D option displays the packet in the MASM assembly. The G option initializes the<br />

packet with the information contained in the S$DFCT parameter fields 1, 2, and 3. The<br />

L option generates dynamic $EQUF definitions using the label field on the S$DFCT<br />

PROC and information in parameter field 4. In this case, the $EQUF labels are prefixed<br />

with 'PKT', use X-register X7, and are externalized to the main assembly level.<br />

Line 13 accesses word 10 of the SDFI packet using the $EQUF generated by the<br />

S$DFCT PROC.<br />

21.1.2. Calling Sequence<br />

The following subsections explain how to open the SDFI routine, read an image, and<br />

close the routine.<br />

21.1.2.1. Open SDFI<br />

The calling program must open SDFI before any images can be read. There are two<br />

entry points that perform the open function.<br />

SDFIO$ Open SDFI at sector address<br />

SDFIOA$ Open SDFI at sector address and word offset<br />

When the SDFIO$ entry point is called, SDFI fills the I/O buffer or buffers and tests if the<br />

file accessed is an SDF file. Reading begins at the sector address specified in word 5 of<br />

the packet.<br />

7833 1733–004 21–7

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

Saved successfully!

Ooh no, something went wrong!