asmstartup.s

来自「使用广泛的日本著名的开源嵌入式实时操作系统T-Kernel的源码」· S 代码 · 共 56 行

S
56
字号
/* *---------------------------------------------------------------------- *    T-Kernel * *    Copyright (C) 2004-2006 by Ken Sakamura. All rights reserved. *    T-Kernel is distributed under the T-License. *---------------------------------------------------------------------- * *    Version:   1.02.02 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/9. * *---------------------------------------------------------------------- *//* *	@(#)asmstartup.S (crttk) * *	Driver/manager startup  */#include <machine.h>#include <tk/asm.h>	.text	.balign	4	.globl	Csym(_C_startup)	.type	Csym(_C_startup), %functionCsym(_C_startup):        bltz    $a0, l_noinit		// Initialization sequence is performed only when ac >= 0        la      $t0, __data_org		// When data area does not need to be moved,        la      $t1, __data_start	// OS loads        beq     $t0, $t1, l_noinit        la      $t2, _edata             // initialize data area        bleu    $t2, $t1, nocopy_data  copy_data:        lw      $t4, 0($t0)        daddu   $t0, $t0, 4        sw      $t4, 0($t1)        daddu   $t1, $t1, 4        bne     $t1, $t2, copy_data  nocopy_data:        la      $t0, __bss_start	// clear bss area        la      $t1, _end        bleu    $t1, $t0, nobss  clrbss:        sw      $zero, 0($t0)        daddu   $t0, $t0, 4        bne     $t0, $t1, clrbss  nobss:  l_noinit:        j       Csym(_P_startup)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?