/*
 *               Copyright (C) 2005, BroadOn Communications Corp.
 *
 *  These coded instructions, statements, and computer programs contain
 *  unpublished  proprietary information of BroadOn Communications Corp.,
 *  and  are protected by Federal copyright law. They may not be disclosed
 *  to  third  parties or copied or duplicated in any form, in whole or in
 *  part, without the prior written consent of BroadOn Communications Corp.
 *
 */

        .text
        .code 32
        .align 0

_start: .global _start
    /* Set sp to point to top of stack */
    ldr r2, =_initStackSize
    ldr r2, [r2]
    ldr sp, =_initStack
    add sp, sp, r2

    /* Zero the bss */
    ldr r0, =__bss_start
    ldr r1, =__bss_end
    ldr r2, =0
    ldr r3, =4

word_set:
    cmp r0, r1
    bcs 1f
    str r2, [r0], r3
    b   word_set
1:

    /* Jump to main */
    ldr r2, =main
    bx  r2

forever:
    b   forever

.end
