.title Endat .ident *X07* ;+ ; **-Endat-Overlay run-time system work area extensions for use with Entrap ; ; Version X07 ; ; Wayne E. Baisley April 29, 1982 ; ; This module defines and initializes certain values in the overlay work area. ; The work area is located in the $$OVDT psect and is structured as follows : ; ; +-------------------------------+ ; 0 | Overlay Load LUN | .novly, n.ovly * ; +-------------------------------+ ; 2 | Address of First Segment Desc | .nstbl, n.stbl + ; +-------------------------------+ ; 4 | Overlay Load | .niost, n.iost ; +--- I/O ---+ ; 6 | Status Block | ; +-------------------------------+ ; 10 | Overlay Load Error Subroutine | .naler, n.aler + ; +-------------------------------+ ; 12 | Segment Descriptor Size | .nszsg, n.szsg * ; +-------------------------------+ ; 14 | Load and Map Segment Routine | .nrdsg, n.rdsg + ; +-------------------------------+ ; 16 | Unmap Segment(s) Routine | .nmrks, n.mrks + ; +-------------------------------+ ; 20 | Total Number Of Task Segments | .nsegs, n.segs ! ; +-------------------------------+ ; 22 | Top Address Of Segment Stack | .nroot, n.root ! ; +-------------------------------+ ; 24 | Segment Stack Pointer | .nstpt, n.stpt ! ; +-------------------------------+ ; ; * - The Overlay Load LUN and the Segment Descriptor Size words are ; filled in by the Task Builder. The Segment Descriptor size is ; 6, 8, or 9 words long, depending on whether manual loading and ; memory-resident overlays are used. The Task Builder Automati- ; cally allocates a Logical Unit, assigns the load device to it, ; and fills in the number. ; ; + - The address of the first Segment Descriptor, and the addresses ; of the Overlay Load Failure Routine, the Load and Map Segment, ; and Unmap Conflicting Segment(s) Routines are filled in at as- ; sembly time by the Ovdat module. ; ; ! - The Top Address of Segment Stack and Segment Stack Pointer are ; filled in at assembly time by this module. The Number of Task ; Segments is initialized at run-time by the Ovlini routine. The ; Segment Stack area is allocated at assembly time by this mod- ; ule, with a default size of 12. words. This is adequate for a ; task with 4 overlaid segments to have an overlaid SST routine ; interrupt an overlaid AST routine which has itself interrupted ; an overlaid task-level routine. ; .page ; ; The Segment Stack area is located in the $$STCK psect, and has the following format : ; ; +-------------------------------+ ; | 1st Segment's Root Address | <- .nroot ; +-------------------------------+ ; | 2nd Segment's Root Address | ; +-------------------------------+ ; . ; . ; . ; +-------------------------------+ ; | Nth Segment's Root Address | ; +-------------------------------+ ; | Empty | ; +-------------------------------+ ; . ; . ; . ; +-------------------------------+ ; | Empty | ; +-------------------------------+ ; | Nth Set Of N Words Of | <- .nstpt, while running ; +--- Saved Segment ---+ ; | Descriptor Addresses | ; +-------------------------------+ ; . ; . ; . ; +-------------------------------+ ; | 2nd Set Of N Words Of | ; +--- Saved Segment ---+ ; | Descriptor Addresses | ; +-------------------------------+ ; | 1st Set Of N Words Of | ; +--- Saved Segment ---+ ; | Descriptor Addresses | ; +-------------------------------+ ; <- .nstpt, initially ; ; The Segment Stack area may be enlarged by means of the Task-Builder's ; EXTSCT option. For example, ; ; TKB>extsct=$$stck:20 !make the Segment Stack 28. words long. ;- .psect $$ovdt,ovr,d . = .+<8.*2> ;skip over the normal data .nsegs::.blkw 1 ;total number of overlaid task segments .nroot::.word $$stck ;pointer to segment stack area .nstpt::.word $$stnd ;initialized segment stack pointer .psect $$stck d $$stck: .blkw 12. ;segment stack area .psect $$stcl d ;psect that follows the $$stck psect $$stnd: ;address of bottom of segment stack .end