a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 exec.library
  AVL_AddNode
  AVL_FindFirstNode
  AVL_FindLastNode
  AVL_FindNextNodeByAddress
  AVL_FindNextNodeByKey
  AVL_FindNode
  AVL_FindPrevNodeByAddress
  AVL_FindPrevNodeByKey
  AVL_RemNodeByAddress
  AVL_RemNodeByKey
  AbortIO
  AddDevice
  AddHead
  AddIntServer
  AddLibrary
  AddMemHandler
  AddMemList
  AddPort
  AddResource
  AddSemaphore
  AddTail
  AddTask
  Alert
  AllocAbs
  AllocEntry
  AllocMem
  AllocPooled
  AllocSignal
  AllocTrap
  AllocVec
  Allocate
  AttemptSemaphore
  AttemptSemaphoreShared
  AvailMem
  CacheClearE
  CacheClearU
  CacheControl
  CachePostDMA
  CachePreDMA
  Cause
  CheckIO
  CloseDevice
  CloseLibrary
  ColdReboot
  CopyMem
  CopyMemQuick
  CreateIORequest
  CreateMsgPort
  CreatePool
  Deallocate
  Debug
  DeleteIORequest
  DeleteMsgPort
  DeletePool
  Disable
  DoIO
  Enable
  Enqueue
  FindName
  FindPort
  FindResident
  FindSemaphore
  FindTask
  Forbid
  FreeEntry
  FreeMem
  FreePooled
  FreeSignal
  FreeTrap
  FreeVec
  GetCC
  GetMsg
  InitCode
  InitResident
  InitSemaphore
  InitStruct
  Insert
  MakeFunctions
  MakeLibrary
  ObtainQuickVector
  ObtainSemaphore
  ObtainSemaphoreList
  ObtainSemaphoreShared
  OldOpenLibrary
  OpenDevice
  OpenLibrary
  OpenResource
  Permit
  Procure
  PutMsg
  RawDoFmt
  ReleaseSemaphore
  ReleaseSemaphoreList
  RemDevice
  RemHead
  RemIntServer
  RemLibrary
  RemMemHandler
  RemPort
  RemResource
  RemSemaphore
  RemTail
  RemTask
  Remove
  ReplyMsg
  SendIO
  SetExcept
  SetFunction
  SetIntVector
  SetSR
  SetSignal
  SetTaskPri
  Signal
  StackSwap
  SumKickData
  SumLibrary
  SuperState
  Supervisor
  TypeOfMem
  UserState
  Vacate
  Wait
  WaitIO
  WaitPort
Include
GuruMeditation
Docs » Autodocs » exec.library » InitResident

NAME

	InitResident - initialize resident module

SYNOPSIS

	object = InitResident(resident, segList)
D0 A1 D1
APTR InitResident(struct Resident *,ULONG);

FUNCTION

	Initialize a ROMTag.  ROMTags are used to link system modules
together. Each disk based device or library must contain a
ROMTag structure in the first code hunk.
Once the validity of the ROMTag is verified, the RT_INIT pointer
is jumped to with the following registers:
D0 = 0
A0 = segList
A6 = ExecBase

INPUTS

	resident - Pointer to a ROMTag
segList - SegList of the loaded object, if loaded from disk.
Libraries & Devices will cache this value for later
return at close or expunge time. Pass NULL for ROM
modules.

RESULT

	object	- Return value from the init code, usually the library
or device base. NULL for failure.
AUTOINIT FEATURE
An automatic method of library/device base and vector table
initialization is also provided by InitResident(). The initial code
hunk of the library or device should contain "MOVEQ #-1,d0; RTS;".
Following that must be an initialized Resident structure with
RTF_AUTOINIT set in rt_Flags, and an rt_Init pointer which points
to four longwords. These four longwords will be used in a call
to MakeLibrary();
- The size of your library/device base structure including initial
Library or Device structure.
- A pointer to a longword table of standard, then library
specific function offsets, terminated with -1L.
(short format offsets are also acceptable)
- Pointer to data table in exec/InitStruct format for
initialization of Library or Device structure.
- Pointer to library initialization function, or NULL.
Calling sequence:
D0 = library base
A0 = segList
A6 = ExecBase
This function must return in D0 the library/device base to be
linked into the library/device list. If the initialization
function fails, the device memory must be manually deallocated,
then NULL returned in D0.

SEE ALSO

"exec/resident.i", FindResident()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Alpha Flight 1970

SNT
AOA
AFL
SPB

Comments:

$VER: d0.se 1.14 Copyright © 2011-2020 Tobias Geijersson support at d0 dot se