crt0.s
来自「ADC图形图像例子」· S 代码 · 共 65 行
S
65 行
##==============================================================================
## crt0.S
## SE3208 startup code
##==============================================================================
## Copyright (c) 1995, 1996, 1997, 1998 Cygnus Solutions
## The authors hereby grant permission to use, copy, modify, distribute,
## and license this software and its documentation for any purpose, provided
## that existing copyright notices are retained in all copies and that this
## notice is included verbatim in any distributions. No written agreement,
## license, or royalty fee is required for any of the authorized uses.
## Modifications to this software may be copyrighted by their authors
## and need not follow the licensing terms described here, provided that
## the new terms are clearly indicated on the first page of each file where
## they apply.
##==============================================================================
.file "crt0.S"
.section .text
.global _start
_start:
/* initialize stack pointer : move unline from GPR upline*/
ldi _stack-8, %r3 # Load up the stack pointer and allocate stack=0x020f:ffff
lea (%r3), %sp # our current frame.
###################################################################
# PIN MUX SET
###################################################################
ldi 0x01800018, %R6 # Pin Mux Control Register 1
ldi 0x00000400, %R7
st %R7, (%R6,0)
ldi 0x0180001C, %R6 # Pin Mux Control Register 2
ldi 0x00000000, %R7
st %R7, (%R6,0)
###################################################################
# < LED ON/OFF LOOP >
###################################################################
ldi 0x01802000, %R6 # Pin Mux Control Register 1
ldi 0x00000000, %R7
st %R7, (%R6,0)
.LEDLOOP:
ldi 0x01802004, %R6
ldi 0x08000000, %R7 #LED On(PIO27)
st %R7, (%R6,0)
ldi 0x0003ffff, %r0
.DELAYLOOP1:
sub %r0, 1, %r0
jnz .DELAYLOOP1
ldi 0x01802004, %R6
ldi 0x00000000, %R7 #LED Off(PIO27)
st %R7, (%R6,0)
ldi 0x0003ffff , %r0
.DELAYLOOP2:
sub %r0, 1, %r0
jnz .DELAYLOOP2
jp .LEDLOOP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?