📄 start.s
字号:
/*
* File : start.S
* This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://openlab.rt-thread.com/license/LICENSE * * Change Logs: * Date Author Notes * 2006-09-23 Vai first version (For ARM7TDMI core)
*/
.globl _entry;
_entry:
mov r0, #0x12 @ Switch to IRQ MODE
msr cpsr, r0
ldr sp, =__sp_irq @ Set stack pointer for IRQ mode
mov r0, #0x1f @ Switch to SVC32
msr cpsr, r0
ldr sp, =__sp_svc @ Set stack pointer for SVC mode
/* Then Clear BSS section */
mov r0, #0
ldr r1, =__bss_start
ldr r2, =_end
1: cmp r1, r2
strcc r0, [r1], #4
bcc 1b
/* Jump to main function */
b main
/* Special SWI */
.globl swiDelay
swiDelay:
swi 0x030000
bx lr
.globl swiIntrWait
swiIntrWait:
swi 0x040000
bx lr
.globl swiWaitForVBlank
swiWaitForVBlank:
swi 0x050000
bx lr
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -