?? asmstartup.s
字號(hào):
/* *---------------------------------------------------------------------- * T-Kernel * * Copyright (C) 2004-2006 by Ken Sakamura. All rights reserved. * T-Kernel is distributed under the T-License. *---------------------------------------------------------------------- * * Version: 1.02.01 * Released by T-Engine Forum(http://www.t-engine.org) at 2006/1/10. * *---------------------------------------------------------------------- *//* * @(#)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 lui $t0, %hi(__data_org) // When data area does not need to be moved, addiu $t0, $t0, %lo(__data_org) lui $t1, %hi(__data_start) // OS loads addiu $t1, $t1, %lo(__data_start) beq $t0, $t1, l_noinit lui $t2, %hi(_edata) // initialize data area addiu $t2, $t2, %lo(_edata) dsubu $t3, $t2, $t1 blez $t3, nocopy_data copy_data: lw $t4, 0($t0) daddu $t0, $t0, 4 sw $t4, 0($t1) daddu $t1, $t1, 4 dsubu $t3, $t2, $t1 bgtz $t3, copy_data nocopy_data: lui $t0, %hi(__bss_start) // clear bss area addiu $t0, $t0, %lo(__bss_start) lui $t1, %hi(_end) addiu $t1, $t1, %lo(_end) dsubu $t2, $t1, $t0 blez $t2, nobss clrbss: sw $zero, 0($t0) daddu $t0, $t0, 4 bne $t0, $t1, clrbss nobss: l_noinit: j Csym(_P_startup)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -