OpenCores
URL https://opencores.org/ocsvn/sardmips/sardmips/trunk

Subversion Repositories sardmips

[/] [sardmips/] [trunk/] [PROGRAMMING_CLASSIC/] [crt0.S] - Diff between revs 4 and 18

Only display areas with differences | Details | Blame | View Log

Rev 4 Rev 18
/*
/*
 * Starting point for everything (bootstrap)
 * Starting point for everything (bootstrap)
 *
 *
 * Initializes the stack pointer and jumps to main().
 * Initializes the stack pointer and jumps to main().
 */
 */
#include "regdef.h"
#include "regdef.h"
        .text
        .text
        .align  2
        .align  2
        .globl  _start
        .globl  _start
        .ent    _start
        .ent    _start
_start:
_start:
        .set noreorder
        .set noreorder
        /* Setup stack pointer */
        /* Setup stack pointer */
        la      sp, _sp
        la      sp, _sp
        /* Clear bss */
        /* Clear bss */
        la      t0, 0x00000000      /* First address */
        la      t0, 0x00000000      /* First address */
        la      t1, _end        /* Last  address */
        la      t1, _end        /* Last  address */
bbs_zero:
bbs_zero:
        /*sw      zero, 0(t0)
        /*sw      zero, 0(t0)
        bne     t0, t1, bbs_zero
        bne     t0, t1, bbs_zero
        addiu   t0, 4*/
        addiu   t0, 4*/
        /* Jump to main */
        /* Jump to main */
        jal     main
        jal     main
        nop
        nop
        /* Run endless loop when the program terminates */
        /* Run endless loop when the program terminates */
loop:
loop:
        j       loop
        j       loop
        .set    reorder
        .set    reorder
        .end    _start
        .end    _start
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.