?? asm1_a.s
字號:
#*********************************************************************************************
# NAME: asm1_a.s *
# Author: Embest *
# Desc: ARM instruction examples *
# History: shw.He 2005.02.22 *
#*********************************************************************************************
/*------------------------------------------------------------------------------------------*/
/* constant define */
/*------------------------------------------------------------------------------------------*/
.equ x, 45 /* x=45 */
.equ y, 64 /* y=64 */
.equ stack_top, 0x1000 /* define the top address for stacks */
.global _start
/*------------------------------------------------------------------------------------------*/
/* code */
/*------------------------------------------------------------------------------------------*/
.text
_start: /* code start */
mov sp, #stack_top
mov r0, #x /* put x value into R0 */
str r0, [sp] /* save the value of R0 into stacks */
mov r0, #y /* put y value into R0 */
ldr r1, [sp] /* read the data from stack,and put it into R1 */
ADD r0, r0, r1
STR r0, [sp]
stop:
b stop /* end the code ,cycling */
.end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -