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

📄 main.s

📁 用AVR单片机做的一些程序,包括跑马灯显示,PWM产生,ADC转换等
💻 S
字号:
	.module main.c
	.area vector(rom, abs)
	.org 64
	jmp _OSTickISR
	.area text(rom, con, rel)
	.even
_main::
	sbiw R28,3
; /*
; 高级实验UCOS:
; 	UCOS操作系统实验。
; 	1、UCOS简单移植实验,运行了三个小任务,用来改变指示灯闪烁。
; 	2、使用外部3.6864M晶振。
; 	3、进行此实验请插上LED短路块。
; 	4、此实验只是UCOS的简单应用,可以作为UCOS学习的开始,有了一个平台。
; 
; 	AVR  mega128学习板
; 	www.iccavr.com 阿发
; 	1:15 2007-10-20
; */
; #include	<ucos_ii.h>									/*头文件统一包含*/
; 
; extern OS_STK TaskSSTK[OS_TASK_STK_SIZE];				/*定义任务堆栈*/
; extern void TaskS(void *temp);							/*声明任务*/
; 
; void main (void) {
; 
; 	OSTaskStkSize     = OS_TASK_STK_SIZE;
	ldi R24,128
	ldi R25,0
	sts _OSTaskStkSize+1,R25
	sts _OSTaskStkSize,R24
; 	OSTaskHardStkSize = OS_TASK_HARD_STK_SIZE;
	ldi R24,64
	sts _OSTaskHardStkSize+1,R25
	sts _OSTaskHardStkSize,R24
; 
; 	OSInit();
	xcall _OSInit
; 	OSTaskCreate(TaskS, (void *)0, (OS_STK *)&TaskSSTK[OS_TASK_STK_SIZE - 1], 0);
	clr R2
	std y+2,R2
	ldi R24,<_TaskSSTK+127
	ldi R25,>_TaskSSTK+127
	std y+1,R25
	std y+0,R24
	clr R18
	clr R19
	ldi R16,<PL_TaskS
	ldi R17,>PL_TaskS
	xcall _OSTaskCreate
; 	OSStart();
	xcall _OSStart
L1:
	adiw R28,3
	.dbline 0 ; func end
	ret
	.area func_lit
PL_TaskS:	.word `_TaskS

⌨️ 快捷键说明

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