Intel i960 Jx Developer's Manual page 398

Microprocessor
Table of Contents

Advertisement

INITIALIZATION AND SYSTEM REQUIREMENTS
Example 12-4. Startup Routine (init.s)
/* Clear the IPND register */
lda
0xff008500, g0
mov
0, g1
st
g1,(g0)
callx
_main
.globl
_intr_stack
.globl
_user_stack
.globl
_supervisor_stack
.bss
_user_stack, 0x0200, 6
.bss
_intr_stack, 0x0200, 6
.bss
_supervisor_stack, 0x0600, 6
.text
_fault_handler:
ldconst 'F', g0
call
_co
ret
_default_sysproc:
ret
_intx:
ldconst 'I', g0
call
_co
ret
Example 12-5. High-Level Startup Code (initmain.c)
unsigned componentid = 0;
main()
{
/* system- or board-specific code goes here */
}
/* this code is called by init.s
co()
{
/* system or board-specific output routine goes here */
}
12-28
(Sheet 4 of 4)
#to main routine
# default applica tion stack
# interrupt stack
# fault (supervis or) stack
*/

Advertisement

Table of Contents
loading

Table of Contents