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

📄 thumb.c

📁 英培特嵌入式开发系统IDE软件包
💻 C
字号:
/*********************************************************************************************
* File:	thumb.c
* Author:	G.F.XU
* Desc:	c program of Thumb instruction
* History:	
*********************************************************************************************/

/*------------------------------------------------------------------------------------------*/
/*	 								global variables					 				    */
/*------------------------------------------------------------------------------------------*/
char szArm[22];
char szThumb[22];
unsigned long ulTemp = 0;

/*------------------------------------------------------------------------------------------*/
/*	 								extern function 					 			 	    */
/*------------------------------------------------------------------------------------------*/
extern void arm_function(void);

/*********************************************************************************************
* name:		delayt
* func:		delay functin with Thumb instruction
* para:		nTime --- input			
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
static void delayt(int nTime)
{
	int i, j, k;
	
	k = 0;
	for(i = 0; i < nTime; i++)
	{
		for(j = 0; j < 10; j++)
			k++;
	}
}

/*********************************************************************************************
* name:		thumb_function
* func:		The following  example use Thumb instruction
* para:		none		
* ret:		none
* modify:
* comment:		
********************************************************************************************/
int thumb_function(void)
{
	int i;
	char * p = "Hello from Thumb World";
	
	ulTemp ++;
	arm_function();
    
    delayt(2);
	
	for(i = 0; i < 22; i++)
		szThumb[i] = (*p++);

}

⌨️ 快捷键说明

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