www.pudn.com > ucos port forf240.rar > Ucos_ii.asm, change:2003-10-14,size:69584b


******************************************************* 
* TMS320C2x/C2xx/C5x ANSI C Codegen Version 7.00        
******************************************************* 
;	C:\TIC2XX\C2000\CGTOOLS\BIN\DSPAC.EXE -v2xx Ucos_ii.c C:\WINDOWS\TEMP\Ucos_ii.if  
;	dspopt NOT RUN 
;	C:\TIC2XX\C2000\CGTOOLS\BIN\DSPCG.EXE -o -v2xx -o C:\WINDOWS\TEMP\Ucos_ii.if C:\WINDOWS\TEMP\Ucos_ii.asm C:\WINDOWS\TEMP\Ucos_ii.tmp  
	.port 
	.bss	_OSRunning,1,1 
	.bss	_OSIntNesting,1 
	.bss	_OSLockNesting,1 
	.bss	_OSIntExitY,1 
	.bss	_OSRdyGrp,1 
	.bss	_OSPrioHighRdy,1 
	.bss	_OSPrioCur,1 
	.bss	_OSTCBHighRdy,1 
	.bss	_OSTCBCur,1 
	.bss	_OSTCBList,1 
	.bss	_OSEventFreeList,1 
	.bss	_OSTaskCtr,1 
	.bss	_OSTCBFreeList,1 
	.bss	_OSRdyTbl,2 
	.bss	_OSCtxSwCtr,2,1 
	.bss	_OSTime,2,1 
	.bss	_OSIdleCtr,2,1 
	.bss	_OSEventTbl,12 
	.bss	_OSTCBPrioTbl,13 
	.bss	_OSTaskIdleStk,100 
	.bss	_OSTCBTbl,121 
	.file	"Ucos_ii.c" 
	.file	"os_cpu.h" 
	.sym	_BOOLEAN,0,14,13,16 
	.sym	_INT8U,0,14,13,16 
	.sym	_INT8S,0,4,13,16 
	.sym	_INT16U,0,14,13,16 
	.sym	_INT16S,0,4,13,16 
	.sym	_INT32U,0,15,13,32 
	.sym	_INT32S,0,5,13,32 
	.sym	_FP32,0,6,13,32 
	.sym	_FP64,0,7,13,32 
	.sym	_OS_STK,0,14,13,16 
	.sym	_OS_CPU_SR,0,14,13,16 
	.file	"os_cfg.h" 
	.sym	_OS_FLAGS,0,14,13,16 
	.file	"ucos_ii.h" 
 
	.stag	.fake0,96 
	.member	_OSEventType,0,14,8,16 
	.member	_OSEventGrp,16,14,8,16 
	.member	_OSEventCnt,32,14,8,16 
	.member	_OSEventPtr,48,16,8,16 
	.member	_OSEventTbl,64,62,8,32,,2 
	.eos 
	.sym	_OS_EVENT,0,8,13,96,.fake0 
 
	.stag	.fake1,64 
	.member	_OSCnt,0,14,8,16 
	.member	_OSEventTbl,16,62,8,32,,2 
	.member	_OSEventGrp,48,14,8,16 
	.eos 
	.sym	_OS_SEM_DATA,0,8,13,64,.fake1 
 
	.stag	_os_tcb,176 
	.member	_OSTCBStkPtr,0,30,8,16 
	.member	_OSTCBNext,16,24,8,16,_os_tcb 
	.member	_OSTCBPrev,32,24,8,16,_os_tcb 
	.member	_OSTCBEventPtr,48,24,8,16,.fake0 
	.member	_OSTCBDly,64,14,8,16 
	.member	_OSTCBStat,80,14,8,16 
	.member	_OSTCBPrio,96,14,8,16 
	.member	_OSTCBX,112,14,8,16 
	.member	_OSTCBY,128,14,8,16 
	.member	_OSTCBBitX,144,14,8,16 
	.member	_OSTCBBitY,160,14,8,16 
	.eos 
	.sym	_OS_TCB,0,8,13,176,_os_tcb 
	.globl	_OSCtxSwCtr 
	.globl	_OSEventFreeList 
	.globl	_OSEventTbl 
	.globl	_OSIntNesting 
	.globl	_OSIntExitY 
	.globl	_OSLockNesting 
	.globl	_OSPrioCur 
	.globl	_OSPrioHighRdy 
	.globl	_OSRdyGrp 
	.globl	_OSRdyTbl 
	.globl	_OSRunning 
	.globl	_OSTaskCtr 
	.globl	_OSIdleCtr 
	.globl	_OSTaskIdleStk 
	.globl	_OSTCBCur 
	.globl	_OSTCBFreeList 
	.globl	_OSTCBHighRdy 
	.globl	_OSTCBList 
	.globl	_OSTCBPrioTbl 
	.globl	_OSTCBTbl 
	.globl	_OSTime 
	.globl	_OSMapTbl 
	.globl	_OSUnMapTbl 
	.globl	_OSSemCreate 
	.globl	_OSSemPend 
	.globl	_OSSemPost 
	.globl	_OSTaskCreate 
	.globl	_OSTimeDly 
	.globl	_OSTimeDlyHMSM 
	.globl	_OSTimeGet 
	.globl	_OSTimeSet 
	.globl	_OSTimeTick 
	.globl	_OSInit 
	.globl	_OSIntEnter 
	.globl	_OSIntExit 
	.globl	_OSStart 
	.globl	_OSStatInit 
	.globl	_OSVersion 
	.globl	_OS_EventTaskRdy 
	.globl	_OS_EventTaskWait 
	.globl	_OS_EventTO 
	.globl	_OS_EventWaitListInit 
	.globl	_OS_Sched 
	.globl	_OS_TaskIdle 
	.globl	_OS_TCBInit 
	.globl	_OSInitHookBegin 
	.globl	_OSInitHookEnd 
	.globl	_OSIntCtxSw 
	.globl	_OSStartHighRdy 
	.globl	_OSTaskCreateHook 
	.globl	_OSTaskDelHook 
	.globl	_OSTaskIdleHook 
	.globl	_OSTaskStatHook 
	.globl	_OSTaskStkInit 
	.globl	_OSTaskSwHook 
	.globl	_OSTCBInitHook 
	.globl	_OSTimeTickHook 
	.globl	_OSCtxSw 
	.globl	_OSTickISR 
	.file	"register.h" 
	.globl	_portFFFF 
	.file	"C:\tic2xx\c2000\cgtools\include\stdio.h" 
	.sym	_size_t,0,14,13,16 
 
	.stag	.fake2,112 
	.member	_fd,0,4,8,16 
	.member	_buf,16,28,8,16 
	.member	_pos,32,28,8,16 
	.member	_bufend,48,28,8,16 
	.member	_buff_stop,64,28,8,16 
	.member	_flags,80,14,8,16 
	.member	_index,96,4,8,16 
	.eos 
	.sym	_FILE,0,8,13,112,.fake2 
	.sym	_fpos_t,0,5,13,32 
 
	.stag	.fake3,272 
	.member	_name,0,50,8,144,,9 
	.member	_flags,144,13,8,16 
	.member	_OPEN,160,148,8,16 
	.member	_CLOSE,176,148,8,16 
	.member	_READ,192,148,8,16 
	.member	_WRITE,208,148,8,16 
	.member	_LSEEK,224,149,8,16 
	.member	_UNLINK,240,148,8,16 
	.member	_RENAME,256,148,8,16 
	.eos 
	.sym	__DEVICE,0,8,13,272,.fake3 
	.globl	__ftable 
	.globl	__tmpnams 
	.globl	_remove 
	.globl	_rename 
	.globl	_tmpfile 
	.globl	_tmpnam 
	.globl	_fclose 
	.globl	_fopen 
	.globl	_freopen 
	.globl	_setbuf 
	.globl	_setvbuf 
	.globl	_fflush 
	.globl	_fprintf 
	.globl	_fscanf 
	.globl	_printf 
	.globl	_scanf 
	.globl	_sprintf 
	.globl	_sscanf 
	.globl	_vfprintf 
	.globl	_vprintf 
	.globl	_vsprintf 
	.globl	_fgetc 
	.globl	_fgets 
	.globl	_fputc 
	.globl	_fputs 
	.globl	_getc 
	.globl	_getchar 
	.globl	_gets 
	.globl	_putc 
	.globl	_putchar 
	.globl	_puts 
	.globl	_ungetc 
	.globl	_fread 
	.globl	_fwrite 
	.globl	_fgetpos 
	.globl	_fseek 
	.globl	_fsetpos 
	.globl	_ftell 
	.globl	_rewind 
	.globl	_clearerr 
	.globl	_feof 
	.globl	_ferror 
	.globl	_perror 
	.globl	_getenv 
	.globl	_add_device 
	.file	"os_core.c" 
 
	.sect	".const" 
	.sblock	".const" 
_OSMapTbl: 
	.word	1 
	.word	2 
	.word	4 
	.word	8 
	.word	16 
	.word	32 
	.word	64 
	.word	128 
 
	.sym	_OSMapTbl,_OSMapTbl,62,2,128,,8 
	.globl	_OSMapTbl 
_OSUnMapTbl: 
	.word	0 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	4 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	5 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	4 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	6 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	4 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	5 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	4 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	7 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	4 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	5 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	4 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	6 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	4 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	5 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	4 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
	.word	3 
	.word	0 
	.word	1 
	.word	0 
	.word	2 
	.word	0 
	.word	1 
	.word	0 
 
	.sym	_OSUnMapTbl,_OSUnMapTbl,62,2,4096,,256 
	.globl	_OSUnMapTbl 
	.text 
 
	.sym	_OSInit,_OSInit,32,2,0 
	.globl	_OSInit 
 
	.func	85 
;>>>> 	void  OSInit (void) 
;>>>> 	#if OS_VERSION >= 204 
****************************************************** 
* FUNCTION DEF : _OSInit 
****************************************************** 
_OSInit: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+ 
 
	.line	4 
;>>>> 	    OSInitHookBegin();                                           /* Call port specific initialization code   */ 
;>>>> 	#endif 
	CALL	_OSInitHookBegin 
	.line	7 
;>>>> 	    OS_InitMisc();                                               /* Initialize miscellaneous variables       */ 
	CALL	_OS_InitMisc 
	.line	9 
;>>>> 	    OS_InitRdyList();                                            /* Initialize the Ready List                */ 
	CALL	_OS_InitRdyList 
	.line	10 
;>>>> 	    OS_InitTCBList();                                            /* Initialize the free list of OS_TCBs      */ 
	CALL	_OS_InitTCBList 
	.line	11 
;>>>> 	    OS_InitEventList();                                          /* Initialize the free list of OS_EVENTs    */ 
;>>>> 	#if (OS_VERSION >= 251) && (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0) 
;>>>> 	    OS_FlagInit();                                               /* Initialize the event flag structures     */ 
;>>>> 	#endif 
;>>>> 	#if (OS_MEM_EN > 0) && (OS_MAX_MEM_PART > 0) 
;>>>> 	    OS_MemInit();                                                /* Initialize the memory manager            */ 
;>>>> 	#endif 
;>>>> 	#if (OS_Q_EN > 0) && (OS_MAX_QS > 0) 
;>>>> 	    OS_QInit();                                                  /* Initialize the message queue structures  */ 
;>>>> 	#endif 
	CALL	_OS_InitEventList 
	.line	25 
;>>>> 	    OS_InitTaskIdle();                                           /* Create the Idle Task                     */ 
;>>>> 	#if OS_TASK_STAT_EN > 0 
;>>>> 	    OS_InitTaskStat();                                           /* Create the Statistic Task                */ 
;>>>> 	#endif 
;>>>> 	#if OS_VERSION >= 204 
	CALL	_OS_InitTaskIdle 
	.line	31 
;>>>> 	    OSInitHookEnd();                                             /* Call port specific init. code            */ 
;>>>> 	#endif 
	CALL	_OSInitHookEnd 
EPI0_1: 
	.line	33 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	117,000000000H,1 
 
	.sym	_OSIntEnter,_OSIntEnter,32,2,0 
	.globl	_OSIntEnter 
 
	.func	144 
;>>>> 	void  OSIntEnter (void) 
****************************************************** 
* FUNCTION DEF : _OSIntEnter 
****************************************************** 
_OSIntEnter: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+ 
 
	.line	3 
;>>>> 	    if (OSRunning == TRUE) { 
	LDPK	_OSRunning 
	LAC	_OSRunning 
	SUBK	1 
	BNZ	L1 
	.line	4 
;>>>> 	        if (OSIntNesting < 255) { 
	ZALS	_OSIntNesting 
	SUBK	255 
	BGEZ	L1 
	.line	5 
;>>>> 	            OSIntNesting++;                      /* Increment ISR nesting level                        */ 
	LAC	_OSIntNesting 
	ADDK	1 
	SACL	_OSIntNesting 
L1: 
EPI0_2: 
	.line	8 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	151,000000000H,1 
 
	.sym	_OSIntExit,_OSIntExit,32,2,0 
	.globl	_OSIntExit 
 
	.func	172 
;>>>> 	void  OSIntExit (void) 
;>>>> 	#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif 
****************************************************** 
* FUNCTION DEF : _OSIntExit 
****************************************************** 
_OSIntExit: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+ 
 
	.line	8 
;>>>> 	    if (OSRunning == TRUE) { 
	LDPK	_OSRunning 
	LAC	_OSRunning 
	SUBK	1 
	BNZ	L3 
	.line	9 
;>>>> 	        OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	10 
;>>>> 	        if (OSIntNesting > 0) {                            /* Prevent OSIntNesting from wrapping       */ 
	LAC	_OSIntNesting 
	BZ	L4 
	.line	11 
;>>>> 	            OSIntNesting--; 
	SUBK	1 
	SACL	_OSIntNesting 
L4: 
	.line	13 
;>>>> 	        if ((OSIntNesting == 0) && (OSLockNesting == 0)) { /* Reschedule only if all ISRs complete ... */ 
	LAC	_OSIntNesting 
	BNZ	L5 
	LAC	_OSLockNesting 
	BNZ	L5 
	.line	14 
;>>>> 	            OSIntExitY    = OSUnMapTbl[OSRdyGrp];          /* ... and not locked.                      */ 
	LAC	_OSRdyGrp 
	ADLK	_OSUnMapTbl+0,0 
	MAR	* ,AR0 
	SACL	*  
	LAR	AR3,* ,AR3 
	BLDD	* ,#_OSIntExitY,AR0 
	.line	15 
;>>>> 	            OSPrioHighRdy = (INT8U)((OSIntExitY << 3) + OSUnMapTbl[OSRdyTbl[OSIntExitY]]); 
	LAC	_OSIntExitY 
	ADLK	_OSRdyTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LAC	* ,AR0 
	ADLK	_OSUnMapTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LAC	_OSIntExitY,3 
	ADD	*  
	SACL	_OSPrioHighRdy 
	.line	16 
;>>>> 	            if (OSPrioHighRdy != OSPrioCur) {              /* No Ctx Sw if current task is highest rdy */ 
	LAC	_OSPrioHighRdy 
	SUB	_OSPrioCur 
	BZ	L5 
	.line	17 
;>>>> 	                OSTCBHighRdy  = OSTCBPrioTbl[OSPrioHighRdy]; 
	LAC	_OSPrioHighRdy 
	ADLK	_OSTCBPrioTbl+0,0 
	MAR	* ,AR0 
	SACL	*  
	LAR	AR3,* ,AR3 
	BLDD	* ,#_OSTCBHighRdy,AR1 
	.line	18 
;>>>> 	                OSCtxSwCtr++;                              /* Keep track of the number of ctx switches */ 
	ZALS	_OSCtxSwCtr 
	ADDH	_OSCtxSwCtr+1 
	ADDK	1 
	SACL	_OSCtxSwCtr 
	SACH	_OSCtxSwCtr+1 
	.line	19 
;>>>> 	                OSIntCtxSw();                              /* Perform interrupt level ctx switch       */ 
	CALL	_OSIntCtxSw 
L5: 
	.line	22 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
L3: 
EPI0_3: 
	.line	24 
	MAR	* ,AR1 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	195,000000000H,1 
 
	.sym	_OSStart,_OSStart,32,2,0 
	.globl	_OSStart 
 
	.func	293 
;>>>> 	void  OSStart (void) 
;>>>> 	    INT8U y; 
;>>>> 	    INT8U x; 
****************************************************** 
* FUNCTION DEF : _OSStart 
****************************************************** 
_OSStart: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,3 
	LAR	AR0,*0+ 
 
	.sym	_y,1,14,1,16 
	.sym	_x,2,14,1,16 
	.line	7 
;>>>> 	    if (OSRunning == FALSE) { 
	LDPK	_OSRunning 
	LAC	_OSRunning 
	BNZ	L7 
	.line	8 
;>>>> 	        y             = OSUnMapTbl[OSRdyGrp];        /* Find highest priority's task priority number   */ 
	LAC	_OSRdyGrp 
	ADLK	_OSUnMapTbl+0,0 
	MAR	* ,AR0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LAC	* ,AR2 
	LARK	AR2,1 
	MAR	*0+ 
	SACL	*  
	.line	9 
;>>>> 	        x             = OSUnMapTbl[OSRdyTbl[y]]; 
	LAC	*+,AR0 
	ADLK	_OSRdyTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LAC	* ,AR0 
	ADLK	_OSUnMapTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LAC	* ,AR2 
	SACL	*  
	.line	10 
;>>>> 	        OSPrioHighRdy = (INT8U)((y << 3) + x); 
	LAC	*- 
	ADD	* ,3,AR0 
	SACL	_OSPrioHighRdy 
	.line	11 
;>>>> 	        OSPrioCur     = OSPrioHighRdy; 
	BLKD	#_OSPrioHighRdy,_OSPrioCur 
	.line	12 
;>>>> 	        OSTCBHighRdy  = OSTCBPrioTbl[OSPrioHighRdy]; /* Point to highest priority task ready to run    */ 
	LAC	_OSPrioHighRdy 
	ADLK	_OSTCBPrioTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	BLDD	* ,#_OSTCBHighRdy,AR1 
	.line	13 
;>>>> 	        OSTCBCur      = OSTCBHighRdy; 
	BLKD	#_OSTCBHighRdy,_OSTCBCur 
	.line	14 
;>>>> 	        OSStartHighRdy();                            /* Execute target specific code to start task     */ 
	CALL	_OSStartHighRdy 
L7: 
EPI0_4: 
	.line	16 
	SBRK	4 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	308,000000000H,3 
 
	.sym	_OSTimeTick,_OSTimeTick,32,2,0 
	.globl	_OSTimeTick 
 
	.func	364 
;>>>> 	void  OSTimeTick (void) 
;>>>> 	#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif     
;>>>> 	    OS_TCB    *ptcb; 
****************************************************** 
* FUNCTION DEF : _OSTimeTick 
****************************************************** 
_OSTimeTick: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,2 
	LAR	AR0,*0+ 
 
	.sym	_ptcb,1,24,1,16,_os_tcb 
	.line	9 
;>>>> 	    OSTimeTickHook();                                      /* Call user definable hook                 */ 
;>>>> 	#if OS_TIME_GET_SET_EN > 0    
	CALL	_OSTimeTickHook 
	.line	11 
;>>>> 	    OS_ENTER_CRITICAL();                                   /* Update the 32-bit tick counter           */ 
 SETC INTM 
	.line	12 
;>>>> 	    OSTime++; 
	LDPK	_OSTime 
	ZALS	_OSTime 
	ADDH	_OSTime+1 
	ADDK	1 
	SACL	_OSTime 
	SACH	_OSTime+1 
	.line	13 
;>>>> 	    OS_EXIT_CRITICAL(); 
;>>>> 	#endif 
 CLRC INTM 
	.line	15 
;>>>> 	    if (OSRunning == TRUE) {     
	LAC	_OSRunning 
	SUBK	1 
	BNZ	L8 
	.line	16 
;>>>> 	        ptcb = OSTCBList;                                  /* Point at first TCB in TCB list           */ 
	MAR	* ,AR2 
	LARK	AR2,1 
	MAR	*0+ 
	BLKD	#_OSTCBList,*  
	.line	17 
;>>>> 	        while (ptcb->OSTCBPrio != OS_IDLE_PRIO) {          /* Go through all TCBs in TCB list          */ 
	LAR	AR3,* ,AR3 
	ADRK	6 
	LAC	*  
	SUBK	12 
	BZ	L8 
	MAR	* ,AR2 
L9: 
	.line	18 
;>>>> 	            OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	19 
;>>>> 	            if (ptcb->OSTCBDly != 0) {                     /* Delayed or waiting for event with TO     */ 
	LAR	AR3,* ,AR3 
	ADRK	4 
	LAC	*  
	BZ	L11 
	.line	20 
;>>>> 	                if (--ptcb->OSTCBDly == 0) {               /* Decrement nbr of ticks to end of delay   */ 
	ZALS	*  
	SUBK	1 
	SACL	*  
	ANDK	0FFFFh 
	BNZ	L11 
	.line	21 
;>>>> 	                    if ((ptcb->OSTCBStat & OS_STAT_SUSPEND) == OS_STAT_RDY) { /* Is task suspended?    */ 
	MAR	*+ 
	BIT	* ,12 
	BBNZ	L13 
	.line	22 
;>>>> 	                        OSRdyGrp               |= ptcb->OSTCBBitY; /* No,  Make task R-to-R (timed out)*/ 
	LDPK	_OSRdyGrp 
	LAC	_OSRdyGrp 
	ADRK	5 
	OR	* ,AR2 
	SACL	_OSRdyGrp 
	.line	23 
;>>>> 	                        OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX; 
;>>>> 	                    } else {                               /* Yes, Leave 1 tick to prevent ...         */ 
	LAR	AR4,* ,AR4 
	ADRK	8 
	LAC	* ,AR0 
	ADLK	_OSRdyTbl+0,0 
	SACL	*  
	LAR	AR5,* ,AR5 
	LAC	* ,AR3 
	MAR	*- 
	OR	* ,AR5 
	SACL	*  
	B	L11 
L13: 
	.line	25 
;>>>> 	                        ptcb->OSTCBDly = 1;                /* ... loosing the task when the ...        */ 
	LACK	1 
	MAR	*- 
	SACL	*  
L11: 
	.line	29 
;>>>> 	            ptcb = ptcb->OSTCBNext;                        /* Point at next TCB in TCB list            */ 
	MAR	* ,AR2 
	LAR	AR3,* ,AR3 
	MAR	*+ 
	LAC	* ,AR2 
	SACL	*  
	.line	30 
;>>>> 	            OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	17 
	LAR	AR3,* ,AR3 
	ADRK	6 
	LAC	* ,AR2 
	SUBK	12 
	BNZ	L9 
L8: 
EPI0_5: 
	.line	33 
	MAR	* ,AR1 
	SBRK	3 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	396,000000000H,2 
 
	.sym	_OSVersion,_OSVersion,46,2,0 
	.globl	_OSVersion 
 
	.func	412 
;>>>> 	INT16U  OSVersion (void) 
****************************************************** 
* FUNCTION DEF : _OSVersion 
****************************************************** 
_OSVersion: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+ 
 
	.line	3 
;>>>> 	    return (OS_VERSION); 
	LACK	252 
EPI0_6: 
	.line	4 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	415,000000000H,1 
 
	.sym	_OS_EventTaskRdy,_OS_EventTaskRdy,46,2,0 
	.globl	_OS_EventTaskRdy 
 
	.func	459 
;>>>> 	INT8U  OS_EventTaskRdy (OS_EVENT *pevent, void *msg, INT8U msk) 
****************************************************** 
* FUNCTION DEF : _OS_EventTaskRdy 
****************************************************** 
_OS_EventTaskRdy: 
 
LF7	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,7 
	LAR	AR0,*0+,AR2 
 
	.sym	_pevent,-3+LF7,24,9,16,.fake0 
	.sym	_msg,-4+LF7,16,9,16 
	.sym	_msk,-5+LF7,14,9,16 
	.sym	_ptcb,1,24,1,16,_os_tcb 
	.sym	_x,2,14,1,16 
	.sym	_y,3,14,1,16 
	.sym	_bitx,4,14,1,16 
	.sym	_bity,5,14,1,16 
	.sym	_prio,6,14,1,16 
	.line	2 
;>>>> 	    OS_TCB *ptcb; 
;>>>> 	    INT8U   x; 
;>>>> 	    INT8U   y; 
;>>>> 	    INT8U   bitx; 
;>>>> 	    INT8U   bity; 
;>>>> 	    INT8U   prio; 
	.line	11 
;>>>> 	    y    = OSUnMapTbl[pevent->OSEventGrp];            /* Find highest prio. task waiting for message   */ 
	LARK	AR2,-3+LF7 
	MAR	*0+ 
	LAR	AR3,* ,AR3 
	MAR	*+ 
	LAC	* ,AR0 
	ADLK	_OSUnMapTbl+0,0 
	SACL	*  
	LAR	AR4,* ,AR4 
	LAC	* ,AR2 
	ADRK	6-LF7 
	SACL	*  
	.line	12 
;>>>> 	    bity = OSMapTbl[y]; 
	LAC	* ,AR0 
	ADLK	_OSMapTbl+0,0 
	SACL	*  
	LAR	AR4,* ,AR4 
	LAC	* ,AR2 
	ADRK	2 
	SACL	*  
	.line	13 
;>>>> 	    x    = OSUnMapTbl[pevent->OSEventTbl[y]]; 
	SBRK	8-LF7 
	LAC	*  
	ADDK	4 
	ADRK	6-LF7 
	ADD	*-,AR0 
	SACL	*  
	LAR	AR4,* ,AR4 
	LAC	* ,AR0 
	ADLK	_OSUnMapTbl+0,0 
	SACL	*  
	LAR	AR4,* ,AR4 
	LAC	* ,AR2 
	SACL	*  
	.line	14 
;>>>> 	    bitx = OSMapTbl[x]; 
	LAC	* ,AR0 
	ADLK	_OSMapTbl+0,0 
	SACL	*  
	LAR	AR4,* ,AR4 
	LAC	* ,AR2 
	ADRK	2 
	SACL	*- 
	.line	15 
;>>>> 	    prio = (INT8U)((y << 3) + x);                     /* Find priority of task getting the msg         */ 
	LAC	*-,3 
	ADD	*  
	ADRK	4 
	SACL	*  
	.line	16 
;>>>> 	    if ((pevent->OSEventTbl[y] &= ~bitx) == 0x00) {   /* Remove this task from the waiting list        */ 
	SBRK	2 
	ZALS	* ,AR1 
	CMPL 
	SACL	*+,AR2 
	SBRK	7-LF7 
	LAC	*  
	ADDK	4 
	ADRK	6-LF7 
	ADD	* ,AR0 
	SACL	*  
	LAR	AR4,* ,AR1 
	MAR	*- 
	ZALS	* ,AR4 
	AND	*  
	SACL	*  
	BNZ	L15 
	.line	17 
;>>>> 	        pevent->OSEventGrp &= ~bity;                  /* Clr group bit if this was only task pending   */ 
	MAR	* ,AR2 
	ADRK	2 
	LAC	* ,AR3 
	CMPL 
	AND	*  
	SACL	*  
L15: 
	.line	19 
;>>>> 	    ptcb                 =  OSTCBPrioTbl[prio];       /* Point to this task's OS_TCB                   */ 
	MAR	* ,AR2 
	LARK	AR2,6 
	MAR	*0+ 
	LAC	* ,AR0 
	ADLK	_OSTCBPrioTbl+0,0 
	SACL	*  
	LAR	AR4,* ,AR4 
	LAC	* ,AR2 
	SBRK	5 
	SACL	*  
	.line	20 
;>>>> 	    ptcb->OSTCBDly       =  0;                        /* Prevent OSTimeTick() from readying task       */ 
	LAR	AR4,* ,AR4 
	LACK	0 
	ADRK	4 
	SACL	*- 
	.line	21 
;>>>> 	    ptcb->OSTCBEventPtr  = (OS_EVENT *)0;             /* Unlink ECB from this task                     */ 
;>>>> 	#if ((OS_Q_EN > 0) && (OS_MAX_QS > 0)) || (OS_MBOX_EN > 0) 
;>>>> 	    ptcb->OSTCBMsg       = msg;                       /* Send message directly to waiting task         */ 
;>>>> 	#else 
	SACL	* ,AR2 
	.line	25 
;>>>> 	    msg                  = msg;                       /* Prevent compiler warning if not used          */ 
;>>>> 	#endif 
	.line	27 
;>>>> 	    ptcb->OSTCBStat     &= ~msk;                      /* Clear bit associated with event type          */ 
	SBRK	6-LF7 
	LAC	* ,AR4 
	CMPL 
	ADRK	2 
	AND	*  
	SACL	*  
	.line	28 
;>>>> 	    if (ptcb->OSTCBStat == OS_STAT_RDY) {             /* See if task is ready (could be susp'd)        */ 
	LAC	*  
	BNZ	L16 
	.line	29 
;>>>> 	        OSRdyGrp        |=  bity;                     /* Put task in the ready to run list             */ 
	LDPK	_OSRdyGrp 
	LAC	_OSRdyGrp 
	MAR	* ,AR2 
	ADRK	10-LF7 
	OR	*  
	SACL	_OSRdyGrp 
	.line	30 
;>>>> 	        OSRdyTbl[y]     |=  bitx; 
	SBRK	2 
	LAC	*+,AR0 
	ADLK	_OSRdyTbl+0,0 
	SACL	*  
	LAR	AR5,* ,AR5 
	LAC	* ,AR2 
	OR	* ,AR5 
	SACL	*  
L16: 
	.line	32 
;>>>> 	    return (prio); 
	MAR	* ,AR2 
	LARK	AR2,6 
	MAR	*0+ 
	ZALS	*  
EPI0_7: 
	.line	33 
	MAR	* ,AR1 
	SBRK	8 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	491,000000000H,7 
 
	.sym	_OS_EventTaskWait,_OS_EventTaskWait,32,2,0 
	.globl	_OS_EventTaskWait 
 
	.func	509 
;>>>> 	void  OS_EventTaskWait (OS_EVENT *pevent) 
****************************************************** 
* FUNCTION DEF : _OS_EventTaskWait 
****************************************************** 
_OS_EventTaskWait: 
 
LF8	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+,AR2 
 
	.sym	_pevent,-3+LF8,24,9,16,.fake0 
	.line	2 
	.line	3 
;>>>> 	    OSTCBCur->OSTCBEventPtr = pevent;            /* Store pointer to event control block in TCB        */ 
	LDPK	_OSTCBCur 
	LAR	AR3,_OSTCBCur 
	LARK	AR2,-3+LF8 
	MAR	*0+ 
	LAC	* ,AR3 
	ADRK	3 
	SACL	*  
	.line	4 
;>>>> 	    if ((OSRdyTbl[OSTCBCur->OSTCBY] &= ~OSTCBCur->OSTCBBitX) == 0x00) {   /* Task no longer ready      */ 
	ADRK	6 
	ZALS	*-,AR1 
	CMPL 
	SACL	* ,AR3 
	LAC	* ,AR0 
	ADLK	_OSRdyTbl+0,0 
	SACL	*  
	LAR	AR4,* ,AR1 
	ZALS	* ,AR4 
	AND	*  
	SACL	*  
	BNZ	L17 
	.line	5 
;>>>> 	        OSRdyGrp &= ~OSTCBCur->OSTCBBitY;        /* Clear event grp bit if this was only task pending  */ 
	MAR	* ,AR3 
	ADRK	2 
	LAC	*  
	CMPL 
	AND	_OSRdyGrp 
	SACL	_OSRdyGrp 
L17: 
	.line	7 
;>>>> 	    pevent->OSEventTbl[OSTCBCur->OSTCBY] |= OSTCBCur->OSTCBBitX;          /* Put task in waiting list  */ 
	LAR	AR3,_OSTCBCur 
	LAR	AR4,_OSTCBCur 
	MAR	* ,AR2 
	LAC	* ,AR4 
	ADDK	4 
	ADRK	8 
	ADD	* ,AR0 
	SACL	*  
	LAR	AR5,* ,AR5 
	LAC	* ,AR3 
	ADRK	9 
	OR	*+,AR5 
	SACL	* ,AR2 
	.line	8 
;>>>> 	    pevent->OSEventGrp                   |= OSTCBCur->OSTCBBitY; 
	LAR	AR5,* ,AR5 
	MAR	*+ 
	LAC	* ,AR3 
	OR	* ,AR5 
	SACL	* ,AR1 
EPI0_8: 
	.line	9 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	517,000000000H,1 
 
	.sym	_OS_EventTO,_OS_EventTO,32,2,0 
	.globl	_OS_EventTO 
 
	.func	535 
;>>>> 	void  OS_EventTO (OS_EVENT *pevent) 
****************************************************** 
* FUNCTION DEF : _OS_EventTO 
****************************************************** 
_OS_EventTO: 
 
LF9	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+,AR3 
 
	.sym	_pevent,-3+LF9,24,9,16,.fake0 
	.line	2 
	.line	3 
;>>>> 	    if ((pevent->OSEventTbl[OSTCBCur->OSTCBY] &= ~OSTCBCur->OSTCBBitX) == 0x00) { 
	LDPK	_OSTCBCur 
	LAR	AR3,_OSTCBCur 
	ADRK	9 
	ZALS	*-,AR1 
	CMPL 
	SACL	* ,AR2 
	LARK	AR2,-3+LF9 
	MAR	*0+ 
	LAC	* ,AR3 
	ADDK	4 
	ADD	* ,AR0 
	SACL	*  
	LAR	AR4,* ,AR1 
	ZALS	* ,AR4 
	AND	*  
	SACL	*  
	BNZ	L18 
	.line	4 
;>>>> 	        pevent->OSEventGrp &= ~OSTCBCur->OSTCBBitY; 
	MAR	* ,AR3 
	ADRK	2 
	LAC	* ,AR2 
	CMPL 
	LAR	AR4,* ,AR4 
	MAR	*+ 
	AND	*  
	SACL	*  
L18: 
	.line	6 
;>>>> 	    OSTCBCur->OSTCBStat     = OS_STAT_RDY;       /* Set status to ready                                */ 
	LAR	AR3,_OSTCBCur 
	LACK	0 
	MAR	* ,AR3 
	ADRK	5 
	SACL	*  
	.line	7 
;>>>> 	    OSTCBCur->OSTCBEventPtr = (OS_EVENT *)0;     /* No longer waiting for event                        */ 
	SBRK	2 
	SACL	* ,AR1 
EPI0_9: 
	.line	8 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	542,000000000H,1 
 
	.sym	_OS_EventWaitListInit,_OS_EventWaitListInit,32,2,0 
	.globl	_OS_EventWaitListInit 
 
	.func	559 
;>>>> 	void  OS_EventWaitListInit (OS_EVENT *pevent) 
****************************************************** 
* FUNCTION DEF : _OS_EventWaitListInit 
****************************************************** 
_OS_EventWaitListInit: 
 
LF10	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,2 
	LAR	AR0,*0+,AR2 
 
	.sym	_pevent,-3+LF10,24,9,16,.fake0 
	.sym	_ptbl,1,30,1,16 
	.line	2 
;>>>> 	    INT8U  *ptbl; 
	.line	6 
;>>>> 	    pevent->OSEventGrp = 0x00;                   /* No task waiting on event                           */ 
	LARK	AR2,-3+LF10 
	MAR	*0+ 
	LAR	AR3,* ,AR3 
	LACK	0 
	MAR	*+ 
	SACL	* ,AR2 
	.line	7 
;>>>> 	    ptbl               = &pevent->OSEventTbl[0]; 
;>>>> 	#if OS_EVENT_TBL_SIZE > 0 
	LAC	*  
	ADDK	4 
	ADRK	4-LF10 
	SACL	*  
	.line	10 
;>>>> 	    *ptbl++            = 0x00; 
;>>>> 	#endif 
;>>>> 	#if OS_EVENT_TBL_SIZE > 1 
	LAR	AR4,* ,AR4 
	LACK	0 
	SACL	*+,AR2 
	SAR	AR4,*  
	.line	14 
;>>>> 	    *ptbl++            = 0x00; 
;>>>> 	#endif 
;>>>> 	#if OS_EVENT_TBL_SIZE > 2 
;>>>> 	    *ptbl++            = 0x00; 
;>>>> 	#endif 
;>>>> 	#if OS_EVENT_TBL_SIZE > 3 
;>>>> 	    *ptbl++            = 0x00; 
;>>>> 	#endif 
;>>>> 	#if OS_EVENT_TBL_SIZE > 4 
;>>>> 	    *ptbl++            = 0x00; 
;>>>> 	#endif 
;>>>> 	#if OS_EVENT_TBL_SIZE > 5 
;>>>> 	    *ptbl++            = 0x00; 
;>>>> 	#endif 
;>>>> 	#if OS_EVENT_TBL_SIZE > 6 
;>>>> 	    *ptbl++            = 0x00; 
;>>>> 	#endif 
;>>>> 	#if OS_EVENT_TBL_SIZE > 7 
;>>>> 	    *ptbl              = 0x00; 
;>>>> 	#endif 
	LAR	AR4,* ,AR4 
	SACL	*+,AR2 
	SAR	AR4,* ,AR1 
EPI0_10: 
	.line	40 
	SBRK	3 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	598,000000000H,2 
 
	.sym	_OS_InitEventList,_OS_InitEventList,32,3,0 
 
	.func	614 
;>>>> 	static  void  OS_InitEventList (void) 
;>>>> 	#if (OS_EVENT_EN > 0) && (OS_MAX_EVENTS > 0) 
;>>>> 	#if (OS_MAX_EVENTS > 1) 
;>>>> 	    INT16U     i; 
;>>>> 	    OS_EVENT  *pevent1; 
;>>>> 	    OS_EVENT  *pevent2; 
****************************************************** 
* FUNCTION DEF : _OS_InitEventList 
****************************************************** 
_OS_InitEventList: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,4 
	LAR	AR0,*0+,AR2 
 
	.sym	_i,1,14,1,16 
	.sym	_pevent1,2,24,1,16,.fake0 
	.sym	_pevent2,3,24,1,16,.fake0 
	.line	10 
;>>>> 	    pevent1 = &OSEventTbl[0]; 
	LALK	_OSEventTbl+0 
	LARK	AR2,2 
	MAR	*0+ 
	SACL	*+ 
	.line	11 
;>>>> 	    pevent2 = &OSEventTbl[1]; 
	LALK	_OSEventTbl+6 
	SACL	*  
	.line	12 
;>>>> 	    for (i = 0; i < (OS_MAX_EVENTS - 1); i++) {                  /* Init. list of free EVENT control blocks  */ 
	LACK	0 
	SBRK	2 
	SACL	*  
	LAC	*  
	BNZ	L20 
	MAR	*+ 
L19: 
	.line	13 
;>>>> 	        pevent1->OSEventType = OS_EVENT_TYPE_UNUSED; 
	LAR	AR3,*+,AR3 
	LACK	0 
	SACL	* ,AR2 
	.line	14 
;>>>> 	        pevent1->OSEventPtr  = pevent2; 
	LAC	* ,AR3 
	ADRK	3 
	SACL	* ,AR2 
	.line	15 
;>>>> 	        pevent1++; 
	MAR	*- 
	LAR	AR4,* ,AR4 
	ADRK	6 
	MAR	* ,AR2 
	SAR	AR4,*+ 
	.line	16 
;>>>> 	        pevent2++; 
	LAR	AR3,* ,AR3 
	ADRK	6 
	MAR	* ,AR2 
	SAR	AR3,*  
	.line	12 
	SBRK	2 
	LAC	*  
	ADDK	1 
	SACL	*  
	LAC	*+ 
	BZ	L19 
L20: 
	.line	18 
;>>>> 	    pevent1->OSEventType = OS_EVENT_TYPE_UNUSED; 
	LARK	AR2,2 
	MAR	*0+ 
	LAR	AR3,* ,AR3 
	LACK	0 
	SACL	*  
	.line	19 
;>>>> 	    pevent1->OSEventPtr  = (OS_EVENT *)0; 
	ADRK	3 
	SACL	* ,AR1 
	.line	20 
;>>>> 	    OSEventFreeList      = &OSEventTbl[0]; 
;>>>> 	#else 
;>>>> 	    OSEventFreeList              = &OSEventTbl[0];               /* Only have ONE event control block        */ 
;>>>> 	    OSEventFreeList->OSEventType = OS_EVENT_TYPE_UNUSED; 
;>>>> 	    OSEventFreeList->OSEventPtr  = (OS_EVENT *)0; 
;>>>> 	#endif 
;>>>> 	#endif 
	LALK	_OSEventTbl+0 
	LDPK	_OSEventFreeList 
	SACL	_OSEventFreeList 
EPI0_11: 
	.line	27 
	SBRK	5 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	640,000000000H,4 
 
	.sym	_OS_InitMisc,_OS_InitMisc,32,3,0 
 
	.func	655 
;>>>> 	static  void  OS_InitMisc (void) 
;>>>> 	#if OS_TIME_GET_SET_EN > 0    
****************************************************** 
* FUNCTION DEF : _OS_InitMisc 
****************************************************** 
_OS_InitMisc: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+ 
 
	.line	4 
;>>>> 	    OSTime        = 0L;                                          /* Clear the 32-bit system clock            */ 
;>>>> 	#endif 
	LACK	0 
	LDPK	_OSTime 
	SACL	_OSTime 
	SACH	_OSTime+1 
	.line	7 
;>>>> 	    OSIntNesting  = 0;                                           /* Clear the interrupt nesting counter      */ 
	SACL	_OSIntNesting 
	.line	8 
;>>>> 	    OSLockNesting = 0;                                           /* Clear the scheduling lock counter        */ 
	SACL	_OSLockNesting 
	.line	10 
;>>>> 	    OSTaskCtr     = 0;                                           /* Clear the number of tasks                */ 
	SACL	_OSTaskCtr 
	.line	12 
;>>>> 	    OSRunning     = FALSE;                                       /* Indicate that multitasking not started   */ 
	SACL	_OSRunning 
	.line	14 
;>>>> 	    OSCtxSwCtr    = 0;                                           /* Clear the context switch counter         */ 
	SACL	_OSCtxSwCtr 
	SACH	_OSCtxSwCtr+1 
	.line	15 
;>>>> 	    OSIdleCtr     = 0L;                                          /* Clear the 32-bit idle counter            */ 
;>>>> 	#if (OS_TASK_STAT_EN > 0) && (OS_TASK_CREATE_EXT_EN > 0) 
;>>>> 	    OSIdleCtrRun  = 0L; 
;>>>> 	    OSIdleCtrMax  = 0L; 
;>>>> 	    OSStatRdy     = FALSE;                                       /* Statistic task is not ready              */ 
;>>>> 	#endif 
	SACL	_OSIdleCtr 
	SACH	_OSIdleCtr+1 
EPI0_12: 
	.line	22 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	676,000000000H,1 
 
	.sym	_OS_InitRdyList,_OS_InitRdyList,32,3,0 
 
	.func	691 
;>>>> 	static  void  OS_InitRdyList (void) 
;>>>> 	    INT16U   i; 
;>>>> 	    INT8U   *prdytbl; 
****************************************************** 
* FUNCTION DEF : _OS_InitRdyList 
****************************************************** 
_OS_InitRdyList: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,3 
	LAR	AR0,*0+,AR2 
 
	.sym	_i,1,14,1,16 
	.sym	_prdytbl,2,30,1,16 
	.line	7 
;>>>> 	    OSRdyGrp      = 0x00;                                        /* Clear the ready list                     */ 
	LACK	0 
	LDPK	_OSRdyGrp 
	SACL	_OSRdyGrp 
	.line	8 
;>>>> 	    prdytbl       = &OSRdyTbl[0]; 
	LALK	_OSRdyTbl+0 
	LARK	AR2,2 
	MAR	*0+ 
	SACL	*- 
	.line	9 
;>>>> 	    for (i = 0; i < OS_RDY_TBL_SIZE; i++) { 
	LACK	0 
	SACL	*  
	ZALS	*  
	SUBK	2 
	BGEZ	L22 
	MAR	*+ 
L21: 
	.line	10 
;>>>> 	        *prdytbl++ = 0x00; 
	LAR	AR3,* ,AR3 
	LACK	0 
	SACL	*+,AR2 
	SAR	AR3,*- 
	.line	9 
	LAC	*  
	ADDK	1 
	SACL	*  
	ZALS	*+ 
	SUBK	2 
	BLZ	L21 
L22: 
	.line	13 
;>>>> 	    OSPrioCur     = 0; 
	LACK	0 
	LDPK	_OSPrioCur 
	SACL	_OSPrioCur 
	.line	14 
;>>>> 	    OSPrioHighRdy = 0; 
	SACL	_OSPrioHighRdy 
	.line	16 
;>>>> 	    OSTCBHighRdy  = (OS_TCB *)0;                                  
	SACL	_OSTCBHighRdy 
	.line	17 
;>>>> 	    OSTCBCur      = (OS_TCB *)0; 
	SACL	_OSTCBCur 
EPI0_13: 
	.line	18 
	MAR	* ,AR1 
	SBRK	4 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	708,000000000H,3 
 
	.sym	_OS_InitTaskIdle,_OS_InitTaskIdle,32,3,0 
 
	.func	724 
;>>>> 	static  void  OS_InitTaskIdle (void) 
;>>>> 	#if OS_TASK_CREATE_EXT_EN > 0 
;>>>> 	    #if OS_STK_GROWTH == 1 
;>>>> 	    (void)OSTaskCreateExt(OS_TaskIdle, 
;>>>> 	                          (void *)0,                                 /* No arguments passed to OS_TaskIdle() */ 
;>>>> 	                          &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1], /* Set Top-Of-Stack                     */ 
;>>>> 	                          OS_IDLE_PRIO,                              /* Lowest priority level                */ 
;>>>> 	                          OS_TASK_IDLE_ID, 
;>>>> 	                          &OSTaskIdleStk[0],                         /* Set Bottom-Of-Stack                  */ 
;>>>> 	                          OS_TASK_IDLE_STK_SIZE, 
;>>>> 	                          (void *)0,                                 /* No TCB extension                     */ 
;>>>> 	                          OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);/* Enable stack checking + clear stack  */ 
;>>>> 	    #else 
;>>>> 	    (void)OSTaskCreateExt(OS_TaskIdle, 
;>>>> 	                          (void *)0,                                 /* No arguments passed to OS_TaskIdle() */ 
;>>>> 	                          &OSTaskIdleStk[0],                         /* Set Top-Of-Stack                     */ 
;>>>> 	                          OS_IDLE_PRIO,                              /* Lowest priority level                */ 
;>>>> 	                          OS_TASK_IDLE_ID, 
;>>>> 	                          &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1], /* Set Bottom-Of-Stack                  */ 
;>>>> 	                          OS_TASK_IDLE_STK_SIZE, 
;>>>> 	                          (void *)0,                                 /* No TCB extension                     */ 
;>>>> 	                          OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);/* Enable stack checking + clear stack  */ 
;>>>> 	    #endif 
;>>>> 	#else 
;>>>> 	    #if OS_STK_GROWTH == 1 
;>>>> 	    (void)OSTaskCreate(OS_TaskIdle, 
;>>>> 	                       (void *)0, 
;>>>> 	                       &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1], 
;>>>> 	                       OS_IDLE_PRIO); 
;>>>> 	    #else 
****************************************************** 
* FUNCTION DEF : _OS_InitTaskIdle 
****************************************************** 
_OS_InitTaskIdle: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+ 
 
	.line	32 
;>>>> 	    (void)OSTaskCreate(OS_TaskIdle, 
;>>>> 	                       (void *)0, 
;>>>> 	                       &OSTaskIdleStk[0], 
;>>>> 	                       OS_IDLE_PRIO); 
;>>>> 	    #endif 
;>>>> 	#endif 
	LACK	12 
	SACL	*+ 
	LALK	_OSTaskIdleStk+0 
	SACL	*+ 
	LACK	0 
	SACL	*+ 
	LALK	_OS_TaskIdle+0 
	SACL	*+ 
	CALL	_OSTaskCreate 
	SBRK	4 
EPI0_14: 
	.line	38 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	761,000000000H,1 
 
	.sym	_OS_InitTCBList,_OS_InitTCBList,32,3,0 
 
	.func	830 
;>>>> 	static  void  OS_InitTCBList (void) 
;>>>> 	    INT8U    i; 
;>>>> 	    OS_TCB  *ptcb1; 
;>>>> 	    OS_TCB  *ptcb2; 
****************************************************** 
* FUNCTION DEF : _OS_InitTCBList 
****************************************************** 
_OS_InitTCBList: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,4 
	LAR	AR0,*0+,AR2 
 
	.sym	_i,1,14,1,16 
	.sym	_ptcb1,2,24,1,16,_os_tcb 
	.sym	_ptcb2,3,24,1,16,_os_tcb 
	.line	8 
;>>>> 	    OSTCBList     = (OS_TCB *)0;                                 /* TCB Initialization                       */ 
	LACK	0 
	LDPK	_OSTCBList 
	SACL	_OSTCBList 
	.line	9 
;>>>> 	    for (i = 0; i < (OS_LOWEST_PRIO + 1); i++) {                 /* Clear the priority table                 */ 
	LARK	AR2,1 
	MAR	*0+ 
	SACL	*  
	ZALS	*  
	SUBK	13 
	BGEZ	L24 
L23: 
	.line	10 
;>>>> 	        OSTCBPrioTbl[i] = (OS_TCB *)0; 
	LAC	* ,AR0 
	ADLK	_OSTCBPrioTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LACK	0 
	SACL	* ,AR2 
	.line	9 
	LAC	*  
	ADDK	1 
	SACL	*  
	ZALS	*  
	SUBK	13 
	BLZ	L23 
L24: 
	.line	12 
;>>>> 	    ptcb1 = &OSTCBTbl[0]; 
	LALK	_OSTCBTbl+0 
	MAR	*+ 
	SACL	*+ 
	.line	13 
;>>>> 	    ptcb2 = &OSTCBTbl[1]; 
	LALK	_OSTCBTbl+11 
	SACL	*  
	.line	14 
;>>>> 	    for (i = 0; i < (OS_MAX_TASKS + OS_N_SYS_TASKS - 1); i++) {  /* Init. list of free TCBs                  */ 
	LACK	0 
	SBRK	2 
	SACL	*  
	ZALS	*  
	SUBK	10 
	BGEZ	L26 
	MAR	*+ 
L25: 
	.line	15 
;>>>> 	        ptcb1->OSTCBNext = ptcb2; 
	LAR	AR3,*+ 
	LAC	*-,AR3 
	MAR	*+ 
	SACL	* ,AR2 
	.line	16 
;>>>> 	        ptcb1++; 
	LAR	AR4,* ,AR4 
	ADRK	11 
	MAR	* ,AR2 
	SAR	AR4,*+ 
	.line	17 
;>>>> 	        ptcb2++; 
	LAR	AR3,* ,AR3 
	ADRK	11 
	MAR	* ,AR2 
	SAR	AR3,*  
	.line	14 
	SBRK	2 
	LAC	*  
	ADDK	1 
	SACL	*  
	ZALS	*+ 
	SUBK	10 
	BLZ	L25 
L26: 
	.line	19 
;>>>> 	    ptcb1->OSTCBNext = (OS_TCB *)0;                              /* Last OS_TCB                              */ 
	LARK	AR2,2 
	MAR	*0+ 
	LAR	AR3,* ,AR3 
	LACK	0 
	MAR	*+ 
	SACL	* ,AR1 
	.line	20 
;>>>> 	    OSTCBFreeList    = &OSTCBTbl[0]; 
	LALK	_OSTCBTbl+0 
	LDPK	_OSTCBFreeList 
	SACL	_OSTCBFreeList 
EPI0_15: 
	.line	21 
	SBRK	5 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	850,000000000H,4 
 
	.sym	_OS_Sched,_OS_Sched,32,2,0 
	.globl	_OS_Sched 
 
	.func	869 
;>>>> 	void  OS_Sched (void) 
;>>>> 	#if OS_CRITICAL_METHOD == 3                            /* Allocate storage for CPU status register     */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif     
;>>>> 	    INT8U      y; 
****************************************************** 
* FUNCTION DEF : _OS_Sched 
****************************************************** 
_OS_Sched: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,2 
	LAR	AR0,*0+ 
 
	.line	9 
;>>>> 	    OS_ENTER_CRITICAL(); 
 SETC INTM 
	.sym	_y,1,14,1,16 
	.line	10 
;>>>> 	    if ((OSIntNesting == 0) && (OSLockNesting == 0)) { /* Sched. only if all ISRs done & not locked    */ 
	LDPK	_OSIntNesting 
	LAC	_OSIntNesting 
	BNZ	L27 
	LAC	_OSLockNesting 
	BNZ	L27 
	.line	11 
;>>>> 	        y             = OSUnMapTbl[OSRdyGrp];          /* Get pointer to HPT ready to run              */ 
	LAC	_OSRdyGrp 
	ADLK	_OSUnMapTbl+0,0 
	MAR	* ,AR0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LAC	* ,AR2 
	LARK	AR2,1 
	MAR	*0+ 
	SACL	*  
	.line	12 
;>>>> 	        OSPrioHighRdy = (INT8U)((y << 3) + OSUnMapTbl[OSRdyTbl[y]]); 
	LAC	* ,AR0 
	ADLK	_OSRdyTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LAC	* ,AR0 
	ADLK	_OSUnMapTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LAC	* ,AR2 
	ADD	* ,3 
	SACL	_OSPrioHighRdy 
	.line	13 
;>>>> 	        if (OSPrioHighRdy != OSPrioCur) {              /* No Ctx Sw if current task is highest rdy     */ 
	LAC	_OSPrioHighRdy 
	SUB	_OSPrioCur 
	BZ	L27 
	.line	14 
;>>>> 	            OSTCBHighRdy = OSTCBPrioTbl[OSPrioHighRdy]; 
	LAC	_OSPrioHighRdy 
	ADLK	_OSTCBPrioTbl+0,0 
	MAR	* ,AR0 
	SACL	*  
	LAR	AR3,* ,AR3 
	BLDD	* ,#_OSTCBHighRdy 
	.line	15 
;>>>> 	            OSCtxSwCtr++;                              /* Increment context switch counter             */ 
	ZALS	_OSCtxSwCtr 
	ADDH	_OSCtxSwCtr+1 
	ADDK	1 
	SACL	_OSCtxSwCtr 
	SACH	_OSCtxSwCtr+1 
	.line	16 
;>>>> 	            OS_TASK_SW();                              /* Perform a context switch                     */ 
 INTR 31 
L27: 
	.line	19 
;>>>> 	    OS_EXIT_CRITICAL(); 
 CLRC INTM 
EPI0_16: 
	.line	20 
	MAR	* ,AR1 
	SBRK	3 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	888,000000000H,2 
 
	.sym	_OS_TaskIdle,_OS_TaskIdle,32,2,0 
	.globl	_OS_TaskIdle 
 
	.func	911 
;>>>> 	void  OS_TaskIdle (void *pdata) 
****************************************************** 
* FUNCTION DEF : _OS_TaskIdle 
****************************************************** 
_OS_TaskIdle: 
 
LF17	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+ 
 
	.sym	_pdata,-3+LF17,16,9,16 
	.line	2 
;>>>> 	#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif     
	.line	8 
;>>>> 	    pdata = pdata;                               /* Prevent compiler warning for not using 'pdata'     */ 
;>>>> 	    for (;;) { 
L29: 
	.line	10 
;>>>> 	        OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	11 
;>>>> 	        OSIdleCtr++; 
	LDPK	_OSIdleCtr 
	ZALS	_OSIdleCtr 
	ADDH	_OSIdleCtr+1 
	ADDK	1 
	SACL	_OSIdleCtr 
	SACH	_OSIdleCtr+1 
	.line	12 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	13 
;>>>> 	        OSTaskIdleHook();                        /* Call user definable HOOK                           */ 
	CALL	_OSTaskIdleHook,AR1 
	.line	14 
	B	L29 
	.endfunc	925,000000000H,1 
 
	.sym	_OS_TCBInit,_OS_TCBInit,46,2,0 
	.globl	_OS_TCBInit 
 
	.func	1035 
;>>>> 	INT8U  OS_TCBInit (INT8U prio, OS_STK *ptos, OS_STK *pbos, INT16U id, INT32U stk_size, void *pext, INT16U opt) 
****************************************************** 
* FUNCTION DEF : _OS_TCBInit 
****************************************************** 
_OS_TCBInit: 
 
LF18	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,2 
	LAR	AR0,*0+ 
 
	.sym	_prio,-3+LF18,14,9,16 
	.sym	_ptos,-4+LF18,30,9,16 
	.sym	_pbos,-5+LF18,30,9,16 
	.sym	_id,-6+LF18,14,9,16 
	.sym	_stk_size,-8+LF18,15,9,32 
	.sym	_pext,-9+LF18,16,9,16 
	.sym	_opt,-10+LF18,14,9,16 
	.sym	_ptcb,1,24,1,16,_os_tcb 
	.line	2 
;>>>> 	#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif     
;>>>> 	    OS_TCB    *ptcb; 
	.line	9 
;>>>> 	    OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	10 
;>>>> 	    ptcb = OSTCBFreeList;                                  /* Get a free TCB from the free TCB list    */ 
	MAR	* ,AR2 
	LARK	AR2,1 
	MAR	*0+ 
	BLKD	#_OSTCBFreeList,*  
	.line	11 
;>>>> 	    if (ptcb != (OS_TCB *)0) { 
	LAC	*  
	BZ	L30 
	.line	12 
;>>>> 	        OSTCBFreeList        = ptcb->OSTCBNext;            /* Update pointer to free TCB list          */ 
	LAR	AR3,* ,AR3 
	MAR	*+ 
	BLDD	* ,#_OSTCBFreeList 
	.line	13 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	14 
;>>>> 	        ptcb->OSTCBStkPtr    = ptos;                       /* Load Stack pointer in TCB                */ 
	MAR	* ,AR2 
	SBRK	5-LF18 
	LAC	*+,AR3 
	MAR	*- 
	SACL	* ,AR2 
	.line	15 
;>>>> 	        ptcb->OSTCBPrio      = (INT8U)prio;                /* Load task priority into TCB              */ 
	LAC	* ,AR3 
	ADRK	6 
	SACL	*- 
	.line	16 
;>>>> 	        ptcb->OSTCBStat      = OS_STAT_RDY;                /* Task is ready to run                     */ 
	LACK	0 
	SACL	*- 
	.line	17 
;>>>> 	        ptcb->OSTCBDly       = 0;                          /* Task is not delayed                      */ 
;>>>> 	#if OS_TASK_CREATE_EXT_EN > 0 
;>>>> 	        ptcb->OSTCBExtPtr    = pext;                       /* Store pointer to TCB extension           */ 
;>>>> 	        ptcb->OSTCBStkSize   = stk_size;                   /* Store stack size                         */ 
;>>>> 	        ptcb->OSTCBStkBottom = pbos;                       /* Store pointer to bottom of stack         */ 
;>>>> 	        ptcb->OSTCBOpt       = opt;                        /* Store task options                       */ 
;>>>> 	        ptcb->OSTCBId        = id;                         /* Store task ID                            */ 
;>>>> 	#else 
	SACL	* ,AR2 
	.line	26 
;>>>> 	        pext                 = pext;                       /* Prevent compiler warning if not used     */ 
	.line	27 
;>>>> 	        stk_size             = stk_size; 
	.line	28 
;>>>> 	        pbos                 = pbos; 
	.line	29 
;>>>> 	        opt                  = opt; 
	.line	30 
;>>>> 	        id                   = id; 
;>>>> 	#endif 
;>>>> 	#if OS_TASK_DEL_EN > 0 
;>>>> 	        ptcb->OSTCBDelReq    = OS_NO_ERR; 
;>>>> 	#endif 
	.line	37 
;>>>> 	        ptcb->OSTCBY         = prio >> 3;                  /* Pre-compute X, Y, BitX and BitY          */ 
	RSXM 
	LAC	* ,12,AR3 
	ADRK	4 
	SACH	* ,1 
	.line	38 
;>>>> 	        ptcb->OSTCBBitY      = OSMapTbl[ptcb->OSTCBY]; 
	LAC	* ,AR0 
	ADLK	_OSMapTbl+0,0 
	SACL	*  
	LAR	AR4,* ,AR4 
	LAC	* ,AR3 
	ADRK	2 
	SACL	* ,AR2 
	.line	39 
;>>>> 	        ptcb->OSTCBX         = prio & 0x07; 
	LACK	7 
	AND	* ,AR3 
	SBRK	3 
	SACL	*  
	.line	40 
;>>>> 	        ptcb->OSTCBBitX      = OSMapTbl[ptcb->OSTCBX]; 
;>>>> 	#if OS_EVENT_EN > 0 
	LAC	* ,AR0 
	ADLK	_OSMapTbl+0,0 
	SACL	*  
	LAR	AR4,* ,AR4 
	LAC	* ,AR3 
	ADRK	2 
	SACL	*  
	.line	43 
;>>>> 	        ptcb->OSTCBEventPtr  = (OS_EVENT *)0;              /* Task is not pending on an event          */ 
;>>>> 	#endif 
;>>>> 	#if (OS_VERSION >= 251) && (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0) && (OS_TASK_DEL_EN > 0) 
;>>>> 	        ptcb->OSTCBFlagNode  = (OS_FLAG_NODE *)0;          /* Task is not pending on an event flag     */ 
;>>>> 	#endif 
;>>>> 	#if (OS_MBOX_EN > 0) || ((OS_Q_EN > 0) && (OS_MAX_QS > 0)) 
;>>>> 	        ptcb->OSTCBMsg       = (void *)0;                  /* No message received                      */ 
;>>>> 	#endif 
;>>>> 	#if OS_VERSION >= 204 
	LACK	0 
	SBRK	6 
	SACL	*  
	.line	55 
;>>>> 	        OSTCBInitHook(ptcb); 
;>>>> 	#endif 
	SBRK	3 
	MAR	* ,AR1 
	SAR	AR3,*+ 
	CALL	_OSTCBInitHook 
	MAR	*-,AR2 
	.line	58 
;>>>> 	        OSTaskCreateHook(ptcb);                            /* Call user defined hook                   */ 
	LARK	AR2,1 
	MAR	*0+ 
	LAC	* ,AR1 
	SACL	*+ 
	CALL	_OSTaskCreateHook 
	MAR	*- 
	.line	60 
;>>>> 	        OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	61 
;>>>> 	        OSTCBPrioTbl[prio] = ptcb; 
	MAR	* ,AR2 
	LARK	AR2,-3+LF18 
	MAR	*0+ 
	LAC	* ,AR0 
	ADLK	_OSTCBPrioTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR2 
	ADRK	4-LF18 
	LAC	* ,AR3 
	SACL	* ,AR2 
	.line	62 
;>>>> 	        ptcb->OSTCBNext    = OSTCBList;                    /* Link into TCB chain                      */ 
	LAR	AR3,* ,AR3 
	MAR	*+ 
	BLKD	#_OSTCBList,*+ 
	.line	63 
;>>>> 	        ptcb->OSTCBPrev    = (OS_TCB *)0; 
	LACK	0 
	SACL	*  
	.line	64 
;>>>> 	        if (OSTCBList != (OS_TCB *)0) { 
	LDPK	_OSTCBList 
	LAC	_OSTCBList 
	BZ	L31 
	.line	65 
;>>>> 	            OSTCBList->OSTCBPrev = ptcb; 
	LAR	AR4,_OSTCBList 
	SBRK	2 
	MAR	* ,AR4 
	ADRK	2 
	SAR	AR3,*  
L31: 
	.line	67 
;>>>> 	        OSTCBList               = ptcb; 
	MAR	* ,AR2 
	BLDD	* ,#_OSTCBList 
	.line	68 
;>>>> 	        OSRdyGrp               |= ptcb->OSTCBBitY;         /* Make task ready to run                   */ 
	LAR	AR3,* ,AR3 
	LAC	_OSRdyGrp 
	ADRK	10 
	OR	* ,AR2 
	SACL	_OSRdyGrp 
	.line	69 
;>>>> 	        OSRdyTbl[ptcb->OSTCBY] |= ptcb->OSTCBBitX; 
	LAR	AR4,* ,AR4 
	ADRK	8 
	LAC	* ,AR0 
	ADLK	_OSRdyTbl+0,0 
	SACL	*  
	LAR	AR5,* ,AR5 
	LAC	* ,AR3 
	MAR	*- 
	OR	* ,AR5 
	SACL	*  
	.line	70 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	71 
;>>>> 	        return (OS_NO_ERR); 
	LACK	0 
	B	EPI0_18 
L30: 
	.line	73 
;>>>> 	    OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	74 
;>>>> 	    return (OS_NO_MORE_TCB); 
	LACK	70 
EPI0_18: 
	.line	75 
	MAR	* ,AR1 
	SBRK	3 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	1109,000000000H,2 
	.file	"os_sem.c" 
 
	.sym	_OSSemCreate,_OSSemCreate,104,2,0,.fake0 
	.globl	_OSSemCreate 
 
	.func	83 
;>>>> 	OS_EVENT  *OSSemCreate (INT16U cnt) 
****************************************************** 
* FUNCTION DEF : _OSSemCreate 
****************************************************** 
_OSSemCreate: 
 
LF19	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,2 
	LAR	AR0,*0+ 
 
	.sym	_cnt,-3+LF19,14,9,16 
	.sym	_pevent,1,24,1,16,.fake0 
	.line	2 
;>>>> 	#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif     
;>>>> 	    OS_EVENT  *pevent; 
	.line	9 
;>>>> 	    if (OSIntNesting > 0) {                                /* See if called from ISR ...               */ 
	LDPK	_OSIntNesting 
	LAC	_OSIntNesting 
	BZ	L32 
	.line	10 
;>>>> 	        return ((OS_EVENT *)0);                            /* ... can't CREATE from an ISR             */ 
	LACK	0 
	B	EPI0_19 
L32: 
	.line	12 
;>>>> 	    OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	13 
;>>>> 	    pevent = OSEventFreeList;                              /* Get next free event control block        */ 
	MAR	* ,AR2 
	LARK	AR2,1 
	MAR	*0+ 
	BLKD	#_OSEventFreeList,*  
	.line	14 
;>>>> 	    if (OSEventFreeList != (OS_EVENT *)0) {                /* See if pool of free ECB pool was empty   */ 
	LAC	_OSEventFreeList 
	BZ	L33 
	.line	15 
;>>>> 	        OSEventFreeList = (OS_EVENT *)OSEventFreeList->OSEventPtr; 
	LAR	AR3,_OSEventFreeList 
	MAR	* ,AR3 
	ADRK	3 
	BLDD	* ,#_OSEventFreeList 
L33: 
	.line	17 
;>>>> 	    OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	18 
;>>>> 	    if (pevent != (OS_EVENT *)0) {                         /* Get an event control block               */ 
	MAR	* ,AR2 
	LAC	*  
	BZ	L34 
	.line	19 
;>>>> 	        pevent->OSEventType = OS_EVENT_TYPE_SEM; 
	LAR	AR3,* ,AR3 
	LACK	3 
	SACL	* ,AR2 
	.line	20 
;>>>> 	        pevent->OSEventCnt  = cnt;                         /* Set semaphore value                      */ 
	SBRK	4-LF19 
	LAC	* ,AR3 
	ADRK	2 
	SACL	*+ 
	.line	21 
;>>>> 	        pevent->OSEventPtr  = (void *)0;                   /* Unlink from ECB free list                */ 
	LACK	0 
	SACL	*  
	.line	22 
;>>>> 	        OS_EventWaitListInit(pevent);                      /* Initialize to 'nobody waiting' on sem.   */ 
	SBRK	3 
	MAR	* ,AR1 
	SAR	AR3,*+ 
	CALL	_OS_EventWaitListInit 
	MAR	*- 
L34: 
	.line	24 
;>>>> 	    return (pevent); 
	MAR	* ,AR2 
	LARK	AR2,1 
	MAR	*0+ 
	ZALS	*  
EPI0_19: 
	.line	25 
	MAR	* ,AR1 
	SBRK	3 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	107,000000000H,2 
 
	.sym	_OSSemPend,_OSSemPend,32,2,0 
	.globl	_OSSemPend 
 
	.func	244 
;>>>> 	void  OSSemPend (OS_EVENT *pevent, INT16U timeout, INT8U *err) 
****************************************************** 
* FUNCTION DEF : _OSSemPend 
****************************************************** 
_OSSemPend: 
 
LF20	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+ 
 
	.sym	_pevent,-3+LF20,24,9,16,.fake0 
	.sym	_timeout,-4+LF20,14,9,16 
	.sym	_err,-5+LF20,30,9,16 
	.line	2 
;>>>> 	#if OS_CRITICAL_METHOD == 3                           /* Allocate storage for CPU status register      */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif     
	.line	8 
;>>>> 	    if (OSIntNesting > 0) {                           /* See if called from ISR ...                    */ 
	LDPK	_OSIntNesting 
	LAC	_OSIntNesting 
	BZ	L35 
	.line	9 
;>>>> 	        *err = OS_ERR_PEND_ISR;                       /* ... can't PEND from an ISR                    */ 
	MAR	* ,AR2 
	LARK	AR2,-5+LF20 
	MAR	*0+ 
	LAR	AR3,* ,AR3 
	LACK	2 
	SACL	*  
	.line	10 
;>>>> 	        return; 
;>>>> 	#if OS_ARG_CHK_EN > 0 
	B	EPI0_20 
L35: 
	.line	13 
;>>>> 	    if (pevent == (OS_EVENT *)0) {                    /* Validate 'pevent'                             */ 
	MAR	* ,AR2 
	LARK	AR2,-3+LF20 
	MAR	*0+ 
	LAC	*  
	BNZ	L36 
	.line	14 
;>>>> 	        *err = OS_ERR_PEVENT_NULL; 
	SBRK	2 
	LAR	AR3,* ,AR3 
	LACK	4 
	SACL	*  
	.line	15 
;>>>> 	        return; 
	B	EPI0_20 
L36: 
	.line	17 
;>>>> 	    if (pevent->OSEventType != OS_EVENT_TYPE_SEM) {   /* Validate event block type                     */ 
	LAR	AR3,* ,AR3 
	LAC	*  
	SUBK	3 
	BZ	L37 
	.line	18 
;>>>> 	        *err = OS_ERR_EVENT_TYPE; 
	MAR	* ,AR2 
	SBRK	2 
	LAR	AR4,* ,AR4 
	LACK	1 
	SACL	*  
	.line	19 
;>>>> 	        return; 
;>>>> 	#endif 
	B	EPI0_20 
L37: 
	.line	22 
;>>>> 	    OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	23 
;>>>> 	    if (pevent->OSEventCnt > 0) {                     /* If sem. is positive, resource available ...   */ 
	ADRK	2 
	LAC	*  
	BZ	L38 
	.line	24 
;>>>> 	        pevent->OSEventCnt--;                         /* ... decrement semaphore only if positive.     */ 
	LAC	*  
	SUBK	1 
	SACL	*  
	.line	25 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	26 
;>>>> 	        *err = OS_NO_ERR; 
	MAR	* ,AR2 
	SBRK	2 
	LAR	AR4,* ,AR4 
	LACK	0 
	SACL	*  
	.line	27 
;>>>> 	        return; 
	B	EPI0_20 
L38: 
	.line	30 
;>>>> 	    OSTCBCur->OSTCBStat |= OS_STAT_SEM;               /* Resource not available, pend on semaphore     */ 
	LAR	AR4,_OSTCBCur 
	MAR	* ,AR4 
	ADRK	5 
	LACK	1 
	OR	*  
	SACL	*-,AR2 
	.line	31 
;>>>> 	    OSTCBCur->OSTCBDly   = timeout;                   /* Store pend timeout in TCB                     */ 
	MAR	*- 
	LAC	* ,AR4 
	SACL	* ,AR3 
	.line	32 
;>>>> 	    OS_EventTaskWait(pevent);                         /* Suspend task until event or timeout occurs    */ 
	SBRK	2 
	MAR	* ,AR1 
	SAR	AR3,*+ 
	CALL	_OS_EventTaskWait 
	MAR	*- 
	.line	33 
;>>>> 	    OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	34 
;>>>> 	    OS_Sched();                                       /* Find next highest priority task ready         */ 
	CALL	_OS_Sched 
	.line	35 
;>>>> 	    OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	36 
;>>>> 	    if (OSTCBCur->OSTCBStat & OS_STAT_SEM) {          /* Must have timed out if still waiting for event*/ 
	LDPK	_OSTCBCur 
	LAR	AR3,_OSTCBCur 
	MAR	* ,AR3 
	ADRK	5 
	BIT	* ,15 
	BBZ	L39 
	.line	37 
;>>>> 	        OS_EventTO(pevent); 
	MAR	* ,AR2 
	LARK	AR2,-3+LF20 
	MAR	*0+ 
	LAC	* ,AR1 
	SACL	*+ 
	CALL	_OS_EventTO 
	MAR	*- 
	.line	38 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	39 
;>>>> 	        *err = OS_TIMEOUT;                            /* Indicate that didn't get event within TO      */ 
	MAR	* ,AR2 
	LARK	AR2,-5+LF20 
	MAR	*0+ 
	LAR	AR3,* ,AR3 
	LACK	10 
	SACL	*  
	.line	40 
;>>>> 	        return; 
	B	EPI0_20 
L39: 
	.line	42 
;>>>> 	    OSTCBCur->OSTCBEventPtr = (OS_EVENT *)0; 
	LACK	0 
	SBRK	2 
	SACL	*  
	.line	43 
;>>>> 	    OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	44 
;>>>> 	    *err = OS_NO_ERR; 
	MAR	* ,AR2 
	LARK	AR2,-5+LF20 
	MAR	*0+ 
	LAR	AR4,* ,AR4 
	SACL	*  
EPI0_20: 
	.line	45 
	MAR	* ,AR1 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	288,000000000H,1 
 
	.sym	_OSSemPost,_OSSemPost,46,2,0 
	.globl	_OSSemPost 
 
	.func	308 
;>>>> 	INT8U  OSSemPost (OS_EVENT *pevent) 
****************************************************** 
* FUNCTION DEF : _OSSemPost 
****************************************************** 
_OSSemPost: 
 
LF21	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,3 
	LAR	AR0,*0+,AR2 
 
	.sym	_pevent,-3+LF21,24,9,16,.fake0 
	.line	2 
;>>>> 	#if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */ 
;>>>> 	    OS_CPU_SR  cpu_sr;                                
;>>>> 	#endif     
;>>>> 	#if OS_ARG_CHK_EN > 0 
	.line	9 
;>>>> 	    if (pevent == (OS_EVENT *)0) {                         /* Validate 'pevent'                        */ 
	LARK	AR2,-3+LF21 
	MAR	*0+ 
	LAC	*  
	BNZ	L40 
	.line	10 
;>>>> 	        return (OS_ERR_PEVENT_NULL); 
	LACK	4 
	B	EPI0_21 
L40: 
	.line	12 
;>>>> 	    if (pevent->OSEventType != OS_EVENT_TYPE_SEM) {        /* Validate event block type                */ 
	LAR	AR3,* ,AR3 
	LAC	*  
	SUBK	3 
	BZ	L41 
	.line	13 
;>>>> 	        return (OS_ERR_EVENT_TYPE); 
;>>>> 	#endif 
	LACK	1 
	B	EPI0_21 
L41: 
	.line	16 
;>>>> 	    OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	17 
;>>>> 	    if (pevent->OSEventGrp != 0x00) {                      /* See if any task waiting for semaphore    */ 
	MAR	*+ 
	LAC	*  
	BZ	L42 
	.line	18 
;>>>> 	        OS_EventTaskRdy(pevent, (void *)0, OS_STAT_SEM);   /* Ready highest prio task waiting on event */ 
	MAR	*-,AR1 
	LACK	1 
	SACL	*+ 
	LACK	0 
	SACL	*+,AR1 
	SAR	AR3,*+ 
	CALL	_OS_EventTaskRdy 
	SBRK	3 
	.line	19 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	20 
;>>>> 	        OS_Sched();                                        /* Find highest priority task ready to run  */ 
	CALL	_OS_Sched 
	.line	21 
;>>>> 	        return (OS_NO_ERR); 
	LACK	0 
	B	EPI0_21 
L42: 
	.line	23 
;>>>> 	    if (pevent->OSEventCnt < 65535) {                 /* Make sure semaphore will not overflow         */ 
	MAR	*+ 
	ZALS	*  
	BNV	$+2 
	MAR	* ,AR2 
	ADRK	4-LF21 
	SACL	*+ 
	SACH	*- 
	LT	*+ 
	MPYK	1 
	LPH	*  
	RSXM 
	LACK	65535 
	SPAC 
	BNV	$+6 
	BGZ	L43 
	B	$+4 
	BLEZ	L43 
	.line	24 
;>>>> 	        pevent->OSEventCnt++;                         /* Increment semaphore count to register event   */ 
	MAR	* ,AR3 
	LAC	*  
	ADDK	1 
	SACL	*  
	.line	25 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	26 
;>>>> 	        return (OS_NO_ERR); 
	LACK	0 
	B	EPI0_21 
L43: 
	.line	28 
;>>>> 	    OS_EXIT_CRITICAL();                               /* Semaphore value has reached its maximum       */ 
 CLRC INTM 
	.line	29 
;>>>> 	    return (OS_SEM_OVF); 
	LACK	50 
EPI0_21: 
	.line	30 
	MAR	* ,AR1 
	SBRK	4 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	337,000000000H,3 
	.file	"os_task.c" 
 
	.sym	_OSTaskCreate,_OSTaskCreate,46,2,0 
	.globl	_OSTaskCreate 
 
	.func	158 
;>>>> 	INT8U  OSTaskCreate (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT8U prio) 
****************************************************** 
* FUNCTION DEF : _OSTaskCreate 
****************************************************** 
_OSTaskCreate: 
 
LF22	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,3 
	LAR	AR0,*0+,AR2 
 
	.sym	_task,-3+LF22,144,9,16 
	.sym	_pdata,-4+LF22,16,9,16 
	.sym	_ptos,-5+LF22,30,9,16 
	.sym	_prio,-6+LF22,14,9,16 
	.sym	_psp,1,30,1,16 
	.sym	_err,2,14,1,16 
	.line	2 
;>>>> 	#if OS_CRITICAL_METHOD == 3                  /* Allocate storage for CPU status register               */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif 
;>>>> 	    OS_STK    *psp; 
;>>>> 	    INT8U      err; 
;>>>> 	#if OS_ARG_CHK_EN > 0 
	.line	11 
;>>>> 	    if (prio > OS_LOWEST_PRIO) {             /* Make sure priority is within allowable range           */ 
	LARK	AR2,-6+LF22 
	MAR	*0+ 
	ZALS	*  
	SUBK	12 
	BLEZ	L44 
	.line	12 
;>>>> 	        return (OS_PRIO_INVALID); 
;>>>> 	#endif 
	LACK	42 
	B	EPI0_22 
L44: 
	.line	15 
;>>>> 	    OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	16 
;>>>> 	    if (OSTCBPrioTbl[prio] == (OS_TCB *)0) { /* Make sure task doesn't already exist at this priority  */ 
	ADLK	_OSTCBPrioTbl+12,0 
	MAR	* ,AR0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LAC	*  
	BNZ	L45 
	.line	17 
;>>>> 	        OSTCBPrioTbl[prio] = (OS_TCB *)1;    /* Reserve the priority to prevent others from doing ...  */ 
	MAR	* ,AR2 
	LAC	* ,AR0 
	ADLK	_OSTCBPrioTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LACK	1 
	SACL	*  
	.line	19 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	20 
;>>>> 	        psp = (OS_STK *)OSTaskStkInit(task, pdata, ptos, 0);    /* Initialize the task's stack         */ 
	MAR	* ,AR1 
	LACK	0 
	SACL	*+,AR2 
	MAR	*+ 
	LAC	*+,AR1 
	SACL	*+,AR2 
	LAC	*+,AR1 
	SACL	*+,AR2 
	LAC	* ,AR1 
	SACL	*+ 
	CALL	_OSTaskStkInit 
	SBRK	4 
	MAR	* ,AR2 
	LARK	AR2,1 
	MAR	*0+ 
	SACL	* ,AR1 
	.line	21 
;>>>> 	        err = OS_TCBInit(prio, psp, (OS_STK *)0, 0, 0, (void *)0, 0); 
	LACK	0 
	SACL	*+ 
	SACL	*+ 
	SACL	*+ 
	SACH	*+ 
	SACL	*+ 
	SACL	*+,AR2 
	LAC	* ,AR1 
	SACL	*+,AR2 
	SBRK	7-LF22 
	LAC	* ,AR1 
	SACL	*+ 
	CALL	_OS_TCBInit 
	SBRK	8 
	MAR	* ,AR2 
	LARK	AR2,2 
	MAR	*0+ 
	SACL	*  
	.line	22 
;>>>> 	        if (err == OS_NO_ERR) { 
	LAC	*  
	BNZ	L46 
	.line	23 
;>>>> 	            OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	24 
;>>>> 	            OSTaskCtr++;                                        /* Increment the #tasks counter        */ 
	LDPK	_OSTaskCtr 
	LAC	_OSTaskCtr 
	ADDK	1 
	SACL	_OSTaskCtr 
	.line	25 
;>>>> 	            OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	26 
;>>>> 	            if (OSRunning == TRUE) {         /* Find highest priority task if multitasking has started */ 
	LAC	_OSRunning 
	SUBK	1 
	BNZ	L48 
	.line	27 
;>>>> 	                OS_Sched(); 
;>>>> 	        } else { 
	CALL	_OS_Sched,AR1 
	B	L48 
L46: 
	.line	30 
;>>>> 	            OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	31 
;>>>> 	            OSTCBPrioTbl[prio] = (OS_TCB *)0;/* Make this priority available to others                 */ 
	SBRK	8-LF22 
	LAC	* ,AR0 
	ADLK	_OSTCBPrioTbl+0,0 
	SACL	*  
	LAR	AR3,* ,AR3 
	LACK	0 
	SACL	*  
	.line	32 
;>>>> 	            OS_EXIT_CRITICAL(); 
 CLRC INTM 
L48: 
	.line	34 
;>>>> 	        return (err); 
	MAR	* ,AR2 
	LARK	AR2,2 
	MAR	*0+ 
	ZALS	*  
	B	EPI0_22 
L45: 
	.line	36 
;>>>> 	    OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	37 
;>>>> 	    return (OS_PRIO_EXIST); 
	LACK	40 
EPI0_22: 
	.line	38 
	MAR	* ,AR1 
	SBRK	4 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	195,000000000H,3 
	.file	"os_time.c" 
 
	.sym	_OSTimeDly,_OSTimeDly,32,2,0 
	.globl	_OSTimeDly 
 
	.func	35 
;>>>> 	void  OSTimeDly (INT16U ticks) 
****************************************************** 
* FUNCTION DEF : _OSTimeDly 
****************************************************** 
_OSTimeDly: 
 
LF23	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+,AR2 
 
	.sym	_ticks,-3+LF23,14,9,16 
	.line	2 
;>>>> 	#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif     
	.line	8 
;>>>> 	    if (ticks > 0) {                                                      /* 0 means no delay!         */ 
	LARK	AR2,-3+LF23 
	MAR	*0+ 
	LAC	*  
	BZ	L49 
	.line	9 
;>>>> 	        OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	10 
;>>>> 	        if ((OSRdyTbl[OSTCBCur->OSTCBY] &= ~OSTCBCur->OSTCBBitX) == 0) {  /* Delay current task        */ 
	LDPK	_OSTCBCur 
	LAR	AR3,_OSTCBCur 
	MAR	* ,AR3 
	ADRK	9 
	ZALS	*-,AR1 
	CMPL 
	SACL	* ,AR3 
	LAC	* ,AR0 
	ADLK	_OSRdyTbl+0,0 
	SACL	*  
	LAR	AR4,* ,AR1 
	ZALS	* ,AR4 
	AND	*  
	SACL	*  
	BNZ	L50 
	.line	11 
;>>>> 	            OSRdyGrp &= ~OSTCBCur->OSTCBBitY; 
	MAR	* ,AR3 
	ADRK	2 
	LAC	*  
	CMPL 
	AND	_OSRdyGrp 
	SACL	_OSRdyGrp 
L50: 
	.line	13 
;>>>> 	        OSTCBCur->OSTCBDly = ticks;                                       /* Load ticks in TCB         */ 
	LAR	AR3,_OSTCBCur 
	MAR	* ,AR2 
	LAC	* ,AR3 
	ADRK	4 
	SACL	*  
	.line	14 
;>>>> 	        OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	15 
;>>>> 	        OS_Sched();                                                       /* Find next task to run!    */ 
	CALL	_OS_Sched,AR1 
L49: 
EPI0_23: 
	.line	17 
	MAR	* ,AR1 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	51,000000000H,1 
 
	.sym	_OSTimeDlyHMSM,_OSTimeDlyHMSM,46,2,0 
	.globl	_OSTimeDlyHMSM 
 
	.func	79 
;>>>> 	INT8U  OSTimeDlyHMSM (INT8U hours, INT8U minutes, INT8U seconds, INT16U milli) 
****************************************************** 
* FUNCTION DEF : _OSTimeDlyHMSM 
****************************************************** 
_OSTimeDlyHMSM: 
 
LF24	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,10 
	LAR	AR0,*0+,AR2 
 
	.sym	_hours,-3+LF24,14,9,16 
	.sym	_minutes,-4+LF24,14,9,16 
	.sym	_seconds,-5+LF24,14,9,16 
	.sym	_milli,-6+LF24,14,9,16 
	.sym	_ticks,1,15,1,32 
	.sym	_loops,3,14,1,16 
	.line	2 
;>>>> 	    INT32U ticks; 
;>>>> 	    INT16U loops; 
	.line	7 
;>>>> 	    if (hours > 0 || minutes > 0 || seconds > 0 || milli > 0) { 
	LARK	AR2,-3+LF24 
	MAR	*0+ 
	LAC	*  
	BNZ	LL26 
	MAR	*- 
	LAC	*  
	BNZ	LL26 
	MAR	*- 
	LAC	*  
	BNZ	LL26 
	MAR	*- 
	LAC	*  
	BZ	L51 
LL26: 
	.line	8 
;>>>> 	        if (minutes > 59) { 
	LARK	AR2,-4+LF24 
	MAR	*0+ 
	ZALS	*  
	SUBK	59 
	BLEZ	L52 
	.line	9 
;>>>> 	            return (OS_TIME_INVALID_MINUTES);    /* Validate arguments to be within range              */ 
	LACK	81 
	B	EPI0_24 
L52: 
	.line	11 
;>>>> 	        if (seconds > 59) { 
	MAR	*- 
	ZALS	*  
	SUBK	59 
	BLEZ	L53 
	.line	12 
;>>>> 	            return (OS_TIME_INVALID_SECONDS); 
	LACK	82 
	B	EPI0_24 
L53: 
	.line	14 
;>>>> 	        if (milli > 999) { 
	MAR	*- 
	ZALS	*  
	SUBK	999 
	BLEZ	L54 
	.line	15 
;>>>> 	            return (OS_TIME_INVALID_MILLI); 
	LACK	83 
	B	EPI0_24 
L54: 
	.line	19 
;>>>> 	        ticks = ((INT32U)hours * 3600L + (INT32U)minutes * 60L + (INT32U)seconds) * OS_TICKS_PER_SEC 
;>>>> 	              + OS_TICKS_PER_SEC * ((INT32U)milli + 500L / OS_TICKS_PER_SEC) / 1000L; 
	ADRK	2 
	ZALS	* ,AR1 
	SACL	*+ 
	SACH	*+ 
	SACL	*+ 
	LACK	60 
	MAR	*- 
	CALL	L$$MPY 
	MAR	* ,AR2 
	ADRK	8-LF24 
	SACL	*+ 
	SACH	*  
	SBRK	8-LF24 
	ZALS	* ,AR1 
	SACL	*+ 
	SACH	*+ 
	SACL	*+ 
	LACK	3600 
	MAR	*- 
	CALL	L$$MPY 
	MAR	* ,AR2 
	ADRK	7-LF24 
	ADDS	*+ 
	ADDH	*  
	SBRK	10-LF24 
	ADDS	* ,AR1 
	SACL	*+ 
	SACH	*+ 
	SACL	*+ 
	LACK	100 
	MAR	*- 
	CALL	L$$MPY 
	MAR	* ,AR2 
	ADRK	11-LF24 
	SACL	*+ 
	SACH	*  
	LACK	5 
	SBRK	13-LF24 
	ADDS	* ,AR1 
	SACL	*+ 
	SACH	*+ 
	SACL	*+ 
	LACK	100 
	MAR	*- 
	CALL	L$$MPY 
	MAR	* ,AR2 
	ADRK	14-LF24 
	SACL	*+ 
	SACH	*-,AR1 
	LACK	1000 
	SACL	*+ 
	SACH	*+,AR2 
	ZALS	*+ 
	ADDH	* ,AR1 
	CALL	L$$DIVU 
	MAR	* ,AR2 
	SBRK	3 
	ADDS	*+ 
	ADDH	*  
	SBRK	6 
	SACL	*+ 
	SACH	*  
	.line	21 
;>>>> 	        loops = (INT16U)(ticks / 65536L);        /* Compute the integral number of 65536 tick delays   */ 
	ZALS	*+ 
	SACL	*  
	.line	22 
;>>>> 	        ticks = ticks % 65536L;                  /* Obtain  the fractional number of ticks             */ 
	SBRK	2 
	ZALS	*  
	ANDK	65535 
	SACL	*+ 
	ZAC 
	SACL	*- 
	.line	23 
;>>>> 	        OSTimeDly((INT16U)ticks); 
	LAC	* ,AR1 
	SACL	*+ 
	CALL	_OSTimeDly 
	MAR	*-,AR2 
	.line	24 
;>>>> 	        while (loops > 0) { 
	LARK	AR2,3 
	MAR	*0+ 
	LAC	*  
	BZ	L56 
	MAR	* ,AR1 
L55: 
	.line	25 
;>>>> 	            OSTimeDly(32768); 
	LALK	1,15 
	SACL	*+ 
	CALL	_OSTimeDly 
	MAR	*- 
	.line	26 
;>>>> 	            OSTimeDly(32768); 
	LALK	1,15 
	SACL	*+ 
	CALL	_OSTimeDly 
	MAR	*-,AR2 
	.line	27 
;>>>> 	            loops--; 
	LARK	AR2,3 
	MAR	*0+ 
	LAC	*  
	SUBK	1 
	SACL	*  
	.line	24 
	LAC	* ,AR1 
	BNZ	L55 
L56: 
	.line	29 
;>>>> 	        return (OS_NO_ERR); 
	LACK	0 
	B	EPI0_24 
L51: 
	.line	31 
;>>>> 	    return (OS_TIME_ZERO_DLY); 
	LACK	84 
EPI0_24: 
	.line	32 
	MAR	* ,AR1 
	SBRK	11 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	110,000000000H,10 
 
	.sym	_OSTimeGet,_OSTimeGet,47,2,0 
	.globl	_OSTimeGet 
 
	.func	187 
;>>>> 	INT32U  OSTimeGet (void) 
;>>>> 	#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif     
;>>>> 	    INT32U     ticks; 
****************************************************** 
* FUNCTION DEF : _OSTimeGet 
****************************************************** 
_OSTimeGet: 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,3 
	LAR	AR0,*0+ 
 
	.line	9 
;>>>> 	    OS_ENTER_CRITICAL(); 
 SETC INTM 
	.sym	_ticks,1,15,1,32 
	.line	10 
;>>>> 	    ticks = OSTime; 
	MAR	* ,AR2 
	LARK	AR2,1 
	MAR	*0+ 
	RPTK	1 
	BLKD	#_OSTime,*+ 
	.line	11 
;>>>> 	    OS_EXIT_CRITICAL(); 
 CLRC INTM 
	.line	12 
;>>>> 	    return (ticks); 
	SBRK	2 
	ZALS	*+ 
	ADDH	*  
EPI0_25: 
	.line	13 
	MAR	* ,AR1 
	SBRK	4 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	199,000000000H,3 
 
	.sym	_OSTimeSet,_OSTimeSet,32,2,0 
	.globl	_OSTimeSet 
 
	.func	215 
;>>>> 	void  OSTimeSet (INT32U ticks) 
****************************************************** 
* FUNCTION DEF : _OSTimeSet 
****************************************************** 
_OSTimeSet: 
 
LF26	.set	0 
 
	POPD	*+ 
	SAR	AR0,*+ 
	SAR	AR1,* 
	LARK	AR0,1 
	LAR	AR0,*0+ 
 
	.sym	_ticks,-4+LF26,15,9,32 
	.line	2 
;>>>> 	#if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */ 
;>>>> 	    OS_CPU_SR  cpu_sr; 
;>>>> 	#endif     
	.line	8 
;>>>> 	    OS_ENTER_CRITICAL(); 
 SETC INTM 
	.line	9 
;>>>> 	    OSTime = ticks; 
	MAR	* ,AR2 
	LARK	AR2,-4+LF26 
	MAR	*0+ 
	RPTK	1 
	BLDD	*+,#_OSTime 
	.line	10 
;>>>> 	    OS_EXIT_CRITICAL(); 
 CLRC INTM 
EPI0_26: 
	.line	11 
	MAR	* ,AR1 
	SBRK	2 
	LAR	AR0,*- 
	PSHD	* 
	RET 
 
	.endfunc	225,000000000H,1 
	.file	"Ucos_ii.c" 
 
	.sym	_OSTCBTbl,_OSTCBTbl,56,2,1936,_os_tcb,11 
	.globl	_OSTCBTbl 
 
	.sym	_OSPrioHighRdy,_OSPrioHighRdy,14,2,16 
	.globl	_OSPrioHighRdy 
 
	.sym	_OSLockNesting,_OSLockNesting,14,2,16 
	.globl	_OSLockNesting 
 
	.sym	_OSCtxSwCtr,_OSCtxSwCtr,15,2,32 
	.globl	_OSCtxSwCtr 
 
	.sym	_OSTaskIdleStk,_OSTaskIdleStk,62,2,1600,,100 
	.globl	_OSTaskIdleStk 
 
	.sym	_OSIdleCtr,_OSIdleCtr,15,2,32 
	.globl	_OSIdleCtr 
 
	.sym	_OSPrioCur,_OSPrioCur,14,2,16 
	.globl	_OSPrioCur 
 
	.sym	_OSRdyGrp,_OSRdyGrp,14,2,16 
	.globl	_OSRdyGrp 
 
	.sym	_OSTCBPrioTbl,_OSTCBPrioTbl,120,2,208,_os_tcb,13 
	.globl	_OSTCBPrioTbl 
 
	.sym	_OSEventTbl,_OSEventTbl,56,2,192,.fake0,2 
	.globl	_OSEventTbl 
 
	.sym	_OSTCBList,_OSTCBList,24,2,16,_os_tcb 
	.globl	_OSTCBList 
 
	.sym	_OSIntNesting,_OSIntNesting,14,2,16 
	.globl	_OSIntNesting 
 
	.sym	_OSTime,_OSTime,15,2,32 
	.globl	_OSTime 
 
	.sym	_OSTCBFreeList,_OSTCBFreeList,24,2,16,_os_tcb 
	.globl	_OSTCBFreeList 
 
	.sym	_OSTCBCur,_OSTCBCur,24,2,16,_os_tcb 
	.globl	_OSTCBCur 
 
	.sym	_OSIntExitY,_OSIntExitY,14,2,16 
	.globl	_OSIntExitY 
 
	.sym	_OSTaskCtr,_OSTaskCtr,14,2,16 
	.globl	_OSTaskCtr 
 
	.sym	_OSEventFreeList,_OSEventFreeList,24,2,16,.fake0 
	.globl	_OSEventFreeList 
 
	.sym	_OSTCBHighRdy,_OSTCBHighRdy,24,2,16,_os_tcb 
	.globl	_OSTCBHighRdy 
 
	.sym	_OSRunning,_OSRunning,14,2,16 
	.globl	_OSRunning 
 
	.sym	_OSRdyTbl,_OSRdyTbl,62,2,32,,2 
	.globl	_OSRdyTbl 
***************************************************** 
* UNDEFINED REFERENCES                              * 
***************************************************** 
	.global	L$$MPY 
	.global	L$$DIVU 
	.end