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 » InitStruct

NAME

	InitStruct - initialize memory from a table

SYNOPSIS

	InitStruct(initTable, memory, size);
A1 A2 D0
void InitStruct(struct InitStruct *, APTR, ULONG);

FUNCTION

	Clear a memory area, then set up default values according to
the data and offset values in the initTable. Typically only assembly
programs take advantage of this function, and only with the macros
defined in "exec/initializers.i".
The initialization table has byte commands to
|a ||byte| |given||byte| |once |
load |count||word| into |next ||rptr| offset, |repetitively |
|long|
Not all combinations are supported. The offset, when specified, is
relative to the memory pointer provided (Memory), and is initially
zero. The initialization data (InitTable) contains byte commands
whose 8 bits are interpreted as follows:
ddssnnnn
dd the destination type (and size):
00 no offset, use next destination, nnnn is count
01 no offset, use next destination, nnnn is repeat
10 destination offset is in the next byte, nnnn is count
11 destination offset is in the next 24-bits, nnnn is count
ss the size and location of the source:
00 long, from the next two aligned words
01 word, from the next aligned word
10 byte, from the next byte
11 ERROR - will cause an ALERT (see below)
nnnn the count or repeat:
count the (number+1) of source items to copy
repeat the source is copied (number+1) times.
initTable commands are always read from the next even byte. Given
destination offsets are always relative to the memory pointer (A2).
The command %00000000 ends the InitTable stream: use %00010001 if you
really want to copy one longword without a new offset.
24 bit APTR not supported for 68020 compatibility -- use long.

INPUTS

	initTable - the beginning of the commands and data to init
Memory with. Must be on an even boundary unless only
byte initialization is done. End table with "dc.b 0"
or "dc.w 0".
memory - the beginning of the memory to initialize. Must be
on an even boundary if size is specified.
size - the size of memory, which is used to clear it before
initializing it via the initTable. If Size is zero,
memory is not cleared before initializing.
size must be an even number.

SEE ALSO

"exec/initializers.i"

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:

Red Sector Inc.

DJ
AYS
SPB
RSI

Comments:

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