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.

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

ο If it is 2, element text length is stated in positions. Position granularity can<br />

be converted to sector granularity by multiplying by 4,096 or by shifting left<br />

by 12 bits.<br />

ο Combinations of element text length and element text length granularity can<br />

result in a number of sectors that are over the theoretical maximum<br />

described above. The result may even be over 36 bits, so maximum value<br />

checks or double-word operations are recommended to determine the<br />

validity of the calculated element text length.<br />

The following are considerations when creating element table entries with the ETIA$<br />

function (see 5.1.7):<br />

• When creating elements in a PF or LPF:<br />

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

− The element-text-length granularity (word 3, bits 1 and 2) field should be 0.<br />

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

S3) should be 0.<br />

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

should be 0.<br />

• When creating elements in an LEPF:<br />

− If the element text is at most 262,143 sectors, use the previous PF and LPF<br />

format for the element table item.<br />

− For efficiency and to avoid wasted mass storage, select the smallest granularity<br />

possible. Sector granularity is the smallest, followed by track and then position.<br />

ο For symbolic elements, the 30-bit element-text-length field is large enough<br />

to describe any element text using sector granularity. Neither track nor<br />

position granularity is needed for symbolic elements.<br />

ο For omnibus elements, the 24-bit element-text-length field is large enough to<br />

describe element text of 16,777,152 sectors using sector granularity. For<br />

element text larger that this, use track granularity. Position granularity is not<br />

needed for omnibus elements.<br />

− When using track or position granularity, make sure that element text length is<br />

rounded up to the next granule, if necessary. For example, 5,000 tracks plus 1<br />

sector (320,001 sectors) must be rounded up to 5,001 tracks (320,064 sectors);<br />

70 positions plus 1 sector (286,721 sectors) must be rounded up to 71 positions<br />

(290,816 sectors).<br />

− If element text length is rounded up, as described above, additional sectors must<br />

be written to pad the element to the proper granule boundary. It is<br />

recommended that sectors containing zeroes be used for the padding. In the<br />

previous examples, the track granularity element would require 63 sectors of<br />

padding and the position granularity element would require 4,095 sectors of<br />

padding.<br />

− When using track or position granularity, make sure that the final element text<br />

length is converted back to number of sectors when updating the FTI next write<br />

location in word FCT+7 (see Figure 5–1).<br />

7833 1733–004 5–37

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

Saved successfully!

Ooh no, something went wrong!