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

📄 os_cpu_c.s

📁 将本站的UCOSFORAVR128V276版本升级到了280版
💻 S
📖 第 1 页 / 共 2 页
字号:
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,3
	movw R30,R2
	std z+0,R24
	.dbline 188
;     *psoft_stk-- = (INT8U)0x04;             /* R4    = 0x04                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,4
	movw R30,R2
	std z+0,R24
	.dbline 189
;     *psoft_stk-- = (INT8U)0x05;             /* R5    = 0x05                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,5
	movw R30,R2
	std z+0,R24
	.dbline 190
;     *psoft_stk-- = (INT8U)0x06;             /* R6    = 0x06                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,6
	movw R30,R2
	std z+0,R24
	.dbline 191
;     *psoft_stk-- = (INT8U)0x07;             /* R7    = 0x07                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,7
	movw R30,R2
	std z+0,R24
	.dbline 192
;     *psoft_stk-- = (INT8U)0x08;             /* R8    = 0x08                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,8
	movw R30,R2
	std z+0,R24
	.dbline 193
;     *psoft_stk-- = (INT8U)0x09;             /* R9    = 0x09                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,9
	movw R30,R2
	std z+0,R24
	.dbline 194
;     *psoft_stk-- = (INT8U)0x10;             /* R10   = 0x10                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,16
	movw R30,R2
	std z+0,R24
	.dbline 195
;     *psoft_stk-- = (INT8U)0x11;             /* R11   = 0x11                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,17
	movw R30,R2
	std z+0,R24
	.dbline 196
;     *psoft_stk-- = (INT8U)0x12;             /* R12   = 0x12                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,18
	movw R30,R2
	std z+0,R24
	.dbline 197
;     *psoft_stk-- = (INT8U)0x13;             /* R13   = 0x13                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,19
	movw R30,R2
	std z+0,R24
	.dbline 198
;     *psoft_stk-- = (INT8U)0x14;             /* R14   = 0x14                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,20
	movw R30,R2
	std z+0,R24
	.dbline 199
;     *psoft_stk-- = (INT8U)0x15;             /* R15   = 0x15                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,21
	movw R30,R2
	std z+0,R24
	.dbline 200
;     tmp          = (INT16U)p_arg;
	movw R22,R18
	.dbline 201
;     *psoft_stk-- = (INT8U)tmp;              /* 'p_arg' passed in R17:R16                                */
	movw R2,R20
	subi R20,1
	sbci R21,0
	movw R30,R2
	std z+0,R22
	.dbline 202
;     *psoft_stk-- = (INT8U)(tmp >> 8);
	movw R2,R20
	subi R20,1
	sbci R21,0
	movw R4,R22
	mov R4,R5
	clr R5
	movw R30,R2
	std z+0,R4
	.dbline 203
;     *psoft_stk-- = (INT8U)0x18;             /* R18   = 0x18                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,24
	movw R30,R2
	std z+0,R24
	.dbline 204
;     *psoft_stk-- = (INT8U)0x19;             /* R19   = 0x19                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,25
	movw R30,R2
	std z+0,R24
	.dbline 205
;     *psoft_stk-- = (INT8U)0x20;             /* R20   = 0x20                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,32
	movw R30,R2
	std z+0,R24
	.dbline 206
;     *psoft_stk-- = (INT8U)0x21;             /* R21   = 0x21                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,33
	movw R30,R2
	std z+0,R24
	.dbline 207
;     *psoft_stk-- = (INT8U)0x22;             /* R22   = 0x22                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,34
	movw R30,R2
	std z+0,R24
	.dbline 208
;     *psoft_stk-- = (INT8U)0x23;             /* R23   = 0x23                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,35
	movw R30,R2
	std z+0,R24
	.dbline 209
;     *psoft_stk-- = (INT8U)0x24;             /* R24   = 0x24                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,36
	movw R30,R2
	std z+0,R24
	.dbline 210
;     *psoft_stk-- = (INT8U)0x25;             /* R25   = 0x25                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,37
	movw R30,R2
	std z+0,R24
	.dbline 211
;     *psoft_stk-- = (INT8U)0x26;             /* R26   = 0x26                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,38
	movw R30,R2
	std z+0,R24
	.dbline 212
;     *psoft_stk-- = (INT8U)0x27;             /* R27   = 0x27                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,39
	movw R30,R2
	std z+0,R24
	.dbline 215
;                                             /* R28     R29:R28 is the software stack which gets ...     */
;                                             /* R29     ... stored in the task's OS_TCB.                 */
;     *psoft_stk-- = (INT8U)0x30;             /* R30   = 0x30                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,48
	movw R30,R2
	std z+0,R24
	.dbline 216
;     *psoft_stk-- = (INT8U)0x31;             /* R31   = 0x31                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,49
	movw R30,R2
	std z+0,R24
	.dbline 217
;     *psoft_stk-- = (INT8U)0x00;             /* RAMPZ = 0x00                                             */
	movw R2,R20
	subi R20,1
	sbci R21,0
	clr R4
	movw R30,R2
	std z+0,R4
	.dbline 218
;     *psoft_stk-- = (INT8U)0x80;             /* SREG  = Interrupts enabled                               */
	movw R2,R20
	subi R20,1
	sbci R21,0
	ldi R24,128
	movw R30,R2
	std z+0,R24
	.dbline 219
;     tmp          = (INT16U)phard_stk;
	movw R22,R10
	.dbline 220
;     *psoft_stk-- = (INT8U)(tmp >> 8);       /* SPH                                                      */
	movw R2,R20
	subi R20,1
	sbci R21,0
	movw R4,R22
	mov R4,R5
	clr R5
	movw R30,R2
	std z+0,R4
	.dbline 221
;     *psoft_stk   = (INT8U) tmp;             /* SPL                                                      */
	movw R30,R20
	std z+0,R22
	.dbline 222
;     return ((void *)psoft_stk);
	movw R16,R30
	.dbline -2
L7:
	xcall pop_gset3
	.dbline 0 ; func end
	ret
	.dbsym r phard_stk 10 pc
	.dbsym r tmp 22 i
	.dbsym r psoft_stk 20 pc
	.dbsym l opt 8 i
	.dbsym l ptos 6 pc
	.dbsym r p_arg 18 pV
	.dbsym r task 16 pfV
	.dbend
	.dbfunc e OSTaskSwHook _OSTaskSwHook fV
	.even
_OSTaskSwHook::
	.dbline -1
	.dbline 243
; }
; 
; /*$PAGE*/
; /*
; *********************************************************************************************************
; *                                           TASK SWITCH HOOK
; *
; * Description: This function is called when a task switch is performed.  This allows you to perform other
; *              operations during a context switch.
; *
; * Arguments  : none
; *
; * Note(s)    : 1) Interrupts are disabled during this call.
; *              2) It is assumed that the global pointer 'OSTCBHighRdy' points to the TCB of the task that
; *                 will be 'switched in' (i.e. the highest priority task) and, 'OSTCBCur' points to the 
; *                 task being switched out (i.e. the preempted task).
; *********************************************************************************************************
; */
; #if (OS_CPU_HOOKS_EN > 0) && (OS_TASK_SW_HOOK_EN > 0)
; void  OSTaskSwHook (void)
; {
	.dbline -2
L8:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e OSTCBInitHook _OSTCBInitHook fV
;           ptcb -> R16,R17
	.even
_OSTCBInitHook::
	.dbline -1
	.dbline 263
; #ifdef OS_VIEW_MODULE
; //    OSView_TaskSwHook();
; #endif
; }
; #endif
; 
; /*
; *********************************************************************************************************
; *                                           OS_TCBInit() HOOK
; *
; * Description: This function is called by OS_TCBInit() after setting up most of the TCB.
; *
; * Arguments  : ptcb    is a pointer to the TCB of the task being created.
; *
; * Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
; *********************************************************************************************************
; */
; #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
; void  OSTCBInitHook (OS_TCB *ptcb)
; {
	.dbline 264
;     ptcb = ptcb;                                           /* Prevent Compiler warning                 */
	.dbline -2
L9:
	.dbline 0 ; func end
	ret
	.dbsym r ptcb 16 pS[os_tcb]
	.dbend
	.area bss(ram, con, rel)
	.dbfile E:\ypt050912\XIAZAI\xinzai\UCOSAVR128\ICC\os_cpu_c.c
_OSTaskHardStkSize::
	.blkb 2
	.dbfile E:/ypt050912/XIAZAI/xinzai/UCOSAVR128/ICC/os_cpu.h
	.dbsym e OSTaskHardStkSize _OSTaskHardStkSize i
_OSTaskStkSize::
	.blkb 2
	.dbsym e OSTaskStkSize _OSTaskStkSize i

⌨️ 快捷键说明

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