A Server Library occupies 2 Stack Cells.
At the lowest address is an Untouched Data Descriptor describing the Library Template, with Bit [18:1] Set to indicate that it is a CodeFile Array. There is nothing to indicate to the MCP that this is a Library Template, other than the context in which it is used, which is either directly by a call on LinkLibrary, or indirectly by touching an Entrypoint.
Immediately above the Untouched Data Descriptor is a word reserved for a Library Template Marker. The Compiler generates a ZERO.
003B (02,0025) 0 000000 000000 003A (02,0024) 5 000003 E40005 SERVERLIBRARY (Library) Untouched, Length=62 (Codefile address=5)
The Library Template Untouched Data Descriptor has this layout.
Tag 5 - Library Structure UnTouched DataDesc | ||
---|---|---|
Field | Name | Description |
[39:20] | LengthF | Length of Data in Words |
[18:1] | CodeFileF | 1 = Template Data In Codefile |
[17:18] | DiskAddressF | Codefile Segment Address of the Library Template. |
If a Library is declared in a Block, then BlockExit must be called and the BELibTemplateF field of the Software Control Word must be set to ensure the Library is deallocated.
The Library Template Layout is described in the Library Template and Library Directory Section.
The compiler need only generate the Untouched Data Descriptor which references the Library Template, and the slot for the Library Template Marker.
The Procedure Entrypoints for the Library contain a reference to the Library's Untouched Data Descriptor.
After the Library Template has been touched, the Library Structure and Library Template Marker are modified by LinkLibrary.
003B (02,0025) 6 842000 000000 SCW: Library structure marker 003A (02,0024) C 000000 001D21 SERVERLIBRARY (Library) Library structure desc: Present-mom, ASD=00E908, Length=62
The Library Structure Marker is described in the MCP at 24833920
Tag 6 - Library Structure Marker | ||
---|---|---|
Field | Name | Description |
[47:2] | SWCW_TypeF | SW_MarkerV = 2. (BSET 47) |
[45:1] | SW_MarkerF | Block_MarkerV = 0 |
[42:1] | Block_MarkerF | Special_BlockV = 1 |
[41:6] | Special_BlockF | Library_MarkV = 2 |