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.

BSP$-Program File Basic Service Package<br />

The following are considerations when reading or initializing the program file FTI with the<br />

RFTI$ or RFTI$$ functions (see 5.1.1):<br />

• Calling programs that use the RFTI$ function will not recognize existing LEPFs and<br />

cannot initialize an empty file as an LEPF. These programs must be modified to use<br />

the RFTI$$ function to read the FTI.<br />

• Calling programs that use the RFTI$$ function must be modified to specify the new<br />

parameter, BSP$ interface level, in register A1, H1. A value of 1 is required to<br />

recognize existing LEPFs and to initialize an empty file as an LEPF.<br />

• The parameter specified in register A2 is ignored if the file is an existing program file.<br />

• On a normal return, the value in register A1 describes the basic program file<br />

characteristics of the file that was read or initialized. Bit 29 of A1 is clear if this file is<br />

a PF or LPF; bit 29 of A1 is set if this file is an LEPF. The calling program should<br />

save the A1 return value so that the contents of existing element table entries can<br />

be correctly interpreted and so that new element table entries can be correctly<br />

formatted.<br />

To correctly interpret the length of element text when reading element table entries with<br />

the ETIS$ function (see 5.1.3) or the ETNL$ function (see 5.1.5), the following need to be<br />

considered:<br />

• When reading elements from a PF or LPF:<br />

− The maximum element text size is 262,143 sectors.<br />

− The element text length in word 7 is stated in sectors for all element types.<br />

− For all element types, the flag bits field, element-text-length granularity (word 3,<br />

bits 1 and 2) is not used and should be ignored.<br />

− For symbolic elements, element-text-length word 7, bits 6 through 17 (S2 and<br />

S3) are not used and should be ignored.<br />

− For omnibus elements, element-text-length word 7, bits 12 through 17 (S3) are<br />

not used and should be ignored.<br />

• When reading elements from an LEPF:<br />

− The maximum element text size is limited only by maximum file size. The<br />

theoretical maximum is 07777764400 or 1,073,735,936 sectors. This is based<br />

on the maximum possible file size minus 1,792 sectors reserved for the TOC of<br />

a standard LEPF.<br />

− Make sure the correct field size is used when loading element-text length from<br />

word 7. For symbolic elements the field size is 30 bits (bits 6 through 35) and<br />

for omnibus elements the field size is 24 bits (bits 12 through 35).<br />

− Once the correct element-text-length value is loaded, the element-text-length<br />

granularity field (word 3, bits 1 and 2) must be examined:<br />

ο If it is 0, element text length is stated in sectors.<br />

ο If it is 1, element text length is stated in tracks. Track granularity can be<br />

converted to sector granularity by multiplying by 64 or by shifting left by 6<br />

bits.<br />

5–36 7833 1733–004

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

Saved successfully!

Ooh no, something went wrong!