⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 thumbcode.s

📁 s3c44b0 thumb指令实验
💻 S
字号:
#*********************************************************************************************
# NAME:		ThumbCode.s																		 *
# Author: 	Embest																			 *
# Desc:		ThumbCode examples																 *
# History:	shw.He 2005.02.22																 *
#*********************************************************************************************

/*------------------------------------------------------------------------------------------*/
/*	 								constant define						 				    */
/*------------------------------------------------------------------------------------------*/
.global _start                             

/*------------------------------------------------------------------------------------------*/
/*				unable to locate source file.					code								 				    */
/*------------------------------------------------------------------------------------------*/
.text
_start:
.arm										/*  Subsequent instructions are ARM */
header:
		adr		r0, Tstart + 1				/*  Processor starts in ARM state, */
		bx		r0							/*  so small ARM code header used */
											/*  to call Thumb main program. */
		nop    
.thumb
Tstart:
		mov		r0, #10						/*  Set up parameters */
		mov		r1, #3
		bl		doadd						/*  Call subroutine */
        
stop:
		b		stop

/*------------------------------------------------------------------------------------------*/
/*	Subroutine code:R0 = R0 + R1 and return								 				    */
/*------------------------------------------------------------------------------------------*/
doadd:
		add		r0, r0, r1					/*  Subroutine code */
		mov		pc, lr						/*  Return from subroutine. */
 
.end										/*  Mark end of file */

⌨️ 快捷键说明

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