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

📄 taihu.s

📁 利用开发板上的/dev/mem设备,进行内存映射,驱动cpu的GPIO口,点亮和熄灭led灯.附makefile文件
💻 S
字号:
#include <config.h>#include <mpc8xx.h>#include <ppc4xx.h>#include <version.h>#include <ppc_asm.tmpl>#include <ppc_defs.h>#include <asm/cache.h>#include <asm/mmu.h>	.section ".text"/*------------------------------------------------------------------------------- *//* Function:	 out32 *//* Description:	 Output 32 bits *//*------------------------------------------------------------------------------- */	.globl	out32out32:	stw	4,0x0000(3)	/*原来是:stw r4,0x0000(r3),但是#include <ppc_asm.tmpl>没成功,就只能直接填写4,3了*/	blr/*------------------------------------------------------------------------------- *//* Function:	 in32 *//* Description:	 Input 32 bits *//*------------------------------------------------------------------------------- */	.globl	in32in32:	lwz	3,0x0000(3)	blr	

⌨️ 快捷键说明

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