Unit 'exec' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

MakeLibrary

Construct a library

Declaration

Source position: exec.pas line 1774

function MakeLibrary(

  funcInit: Pointer;

  structInit: Pointer;

  libInit: Pointer;

  dataSize: Cardinal;

  segList: Cardinal

):PLibrary;

Arguments

funcInit

  

A pointer to an array of function pointers or function displacements. If the first word of the array is -1, then the array contains relative word displacements (based off of vectors); otherwise, the array contains absolute function pointers. The vector list is terminated by a -1 (of the same size as the pointers).

structInit

  

points to an InitStruct" data region. If nil, then it will not be used.

libInit

  

Entry point for the library, used for initcode, function must return the library address or nil

dataSize

  

the size of the library data area, including the standard library node data. This must be at leas SizeOf(TLibrary).

segList

  

A pointer to an Amiga SegList (segment list). This is passed to a library's init code, and is used later for removing the library from memory.

Function result

The reference address of the library. This is the address used in references to the library, not the beginning of the memory area allocated. If the library vector table require more system memory than is available, this function will return nil.

Description

This function is used for constructing a library vector and data area. The same call is used to make devices. Space for the library is allocated from the system's free memory pool. The data portion of the library is initialized. Init may point to a library specific entry point.

See also

InitStruct

  

Initialize memory from a table

InitResident

  

Initialize resident module


Documentation generated on: 2021-07-30