User guide

74 DC 900-1338I
Protocol Software Toolkit Programmer Guide
4.2.3 Task Initialization Routine
You must supply a task initialization routine in one of the downloaded modules to be
used at the start-up of the ICP. The task initialization routine is executed at the comple-
tion of the download sequence and must perform the following functions:
1. Load the configuration table address into register A0.
2. Obtain the operating system initialization entry point address from the global sys-
tem table at fixed address 0x801600 for the ICP2424 or ICP2432, or 0x40001600
for the ICP6000. Load this address into register A1.
3. Jump to the operating system initialization entry point osinit.
Figure 410 shows a sample task initialization routine associated with the configuration
table shown previously in Figure 49.
4.2.4 OS/Impact Initialization
After your task initialization routine passes control to OS/Impacts system initialization
entry point with the address of the configuration table in register A0, the osinit rou-
tine performs the following operations:
1. Initialize system stack pointer, exception vector table, and clock interrupts (using
the tick length specified in the configuration table).
2. Build data structures (task control blocks, queue control blocks, and so on)
according to parameters specified in the configuration table.
XDEF _sysinit
_sysinit
move.l #spscon,a0 address of config table
move.l RAM+$1600,a1 address of OS/Impact init
jmp (a1) jump to OS/Impact's init
Figure 410: Sample Task Initialization Routine