亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? os_task.lis

?? ucos如何移植到單片機mega128
?? LIS
?? 第 1 頁 / 共 5 頁
字號:
                        .module OS_TASK.C
                        .area text(rom, con, rel)
 0000                   .dbfile E:\study\ucos_ii\ucos2_iccavr\iccavr\ucos2_without_cpu\OS_TASK.C
 0000                   .dbfunc e OSTaskCreate _OSTaskCreate fc
 0000           ;            psp -> R10,R11
 0000           ;            err -> R10
 0000           ;           prio -> R12
 0000           ;           ptos -> y+22
 0000           ;          pdata -> R14,R15
 0000           ;           task -> R10,R11
                        .even
 0000           _OSTaskCreate::
 0000 0E940000          xcall push_gset5
 0004 7901              movw R14,R18
 0006 5801              movw R10,R16
 0008 2C97              sbiw R28,12
 000A C88C              ldd R12,y+24
 000C                   .dbline -1
 000C                   .dbline 159
 000C           ; /*
 000C           ; *********************************************************************************************************
 000C           ; *                                                uC/OS-II
 000C           ; *                                          The Real-Time Kernel
 000C           ; *                                            TASK MANAGEMENT
 000C           ; *
 000C           ; *                          (c) Copyright 1992-2002, Jean J. Labrosse, Weston, FL
 000C           ; *                                           All Rights Reserved
 000C           ; *
 000C           ; * File : OS_TASK.C
 000C           ; * By   : Jean J. Labrosse
 000C           ; *********************************************************************************************************
 000C           ; */
 000C           ; 
 000C           ; #ifndef  OS_MASTER_FILE
 000C           ; #include "..\ucos2_application\includes.h"
 000C           ; #endif
 000C           ; 
 000C           ; /*
 000C           ; *********************************************************************************************************
 000C           ; *                                        CHANGE PRIORITY OF A TASK
 000C           ; *
 000C           ; * Description: This function allows you to change the priority of a task dynamically.  Note that the new
 000C           ; *              priority MUST be available.
 000C           ; *
 000C           ; * Arguments  : oldp     is the old priority
 000C           ; *
 000C           ; *              newp     is the new priority
 000C           ; *
 000C           ; * Returns    : OS_NO_ERR        is the call was successful
 000C           ; *              OS_PRIO_INVALID  if the priority you specify is higher that the maximum allowed
 000C           ; *                               (i.e. >= OS_LOWEST_PRIO)
 000C           ; *              OS_PRIO_EXIST    if the new priority already exist.
 000C           ; *              OS_PRIO_ERR      there is no task with the specified OLD priority (i.e. the OLD task does
 000C           ; *                               not exist.
 000C           ; *********************************************************************************************************
 000C           ; */
 000C           ; 
 000C           ; #if OS_TASK_CHANGE_PRIO_EN > 0
 000C           ; INT8U  OSTaskChangePrio (INT8U oldprio, INT8U newprio)
 000C           ; {
 000C           ; #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
 000C           ;     OS_CPU_SR    cpu_sr;
 000C           ; #endif
 000C           ; 
 000C           ; #if OS_EVENT_EN > 0
 000C           ;     OS_EVENT    *pevent;
 000C           ; #endif
 000C           ; 
 000C           ;     OS_TCB      *ptcb;
 000C           ;     INT8U        x;
 000C           ;     INT8U        y;
 000C           ;     INT8U        bitx;
 000C           ;     INT8U        bity;
 000C           ; 
 000C           ; 
 000C           ; 
 000C           ; #if OS_ARG_CHK_EN > 0
 000C           ;     if ((oldprio >= OS_LOWEST_PRIO && oldprio != OS_PRIO_SELF)  ||
 000C           ;          newprio >= OS_LOWEST_PRIO) {
 000C           ;         return (OS_PRIO_INVALID);
 000C           ;     }
 000C           ; #endif
 000C           ;     OS_ENTER_CRITICAL();
 000C           ;     if (OSTCBPrioTbl[newprio] != (OS_TCB *)0) {                 /* New priority must not already exist */
 000C           ;         OS_EXIT_CRITICAL();
 000C           ;         return (OS_PRIO_EXIST);
 000C           ;     } else {
 000C           ;         OSTCBPrioTbl[newprio] = (OS_TCB *)1;                    /* Reserve the entry to prevent others */
 000C           ;         OS_EXIT_CRITICAL();
 000C           ;         y    = newprio >> 3;                                    /* Precompute to reduce INT. latency   */
 000C           ;         bity = OSMapTbl[y];
 000C           ;         x    = newprio & 0x07;
 000C           ;         bitx = OSMapTbl[x];
 000C           ;         OS_ENTER_CRITICAL();
 000C           ;         if (oldprio == OS_PRIO_SELF) {                          /* See if changing self                */
 000C           ;             oldprio = OSTCBCur->OSTCBPrio;                      /* Yes, get priority                   */
 000C           ;         }
 000C           ;         ptcb = OSTCBPrioTbl[oldprio];
 000C           ;         if (ptcb != (OS_TCB *)0) {                              /* Task to change must exist           */
 000C           ;             OSTCBPrioTbl[oldprio] = (OS_TCB *)0;                /* Remove TCB from old priority        */
 000C           ;             if ((OSRdyTbl[ptcb->OSTCBY] & ptcb->OSTCBBitX) != 0x00) {  /* If task is ready make it not */
 000C           ;                 if ((OSRdyTbl[ptcb->OSTCBY] &= ~ptcb->OSTCBBitX) == 0x00) {
 000C           ;                     OSRdyGrp &= ~ptcb->OSTCBBitY;
 000C           ;                 }
 000C           ;                 OSRdyGrp    |= bity;                            /* Make new priority ready to run      */
 000C           ;                 OSRdyTbl[y] |= bitx;
 000C           ; #if OS_EVENT_EN > 0
 000C           ;             } else {
 000C           ;                 pevent = ptcb->OSTCBEventPtr;
 000C           ;                 if (pevent != (OS_EVENT *)0) {                  /* Remove from event wait list  */
 000C           ;                     if ((pevent->OSEventTbl[ptcb->OSTCBY] &= ~ptcb->OSTCBBitX) == 0) {
 000C           ;                         pevent->OSEventGrp &= ~ptcb->OSTCBBitY;
 000C           ;                     }
 000C           ;                     pevent->OSEventGrp    |= bity;              /* Add new priority to wait list       */
 000C           ;                     pevent->OSEventTbl[y] |= bitx;
 000C           ;                 }
 000C           ; #endif
 000C           ;             }
 000C           ;             OSTCBPrioTbl[newprio] = ptcb;                       /* Place pointer to TCB @ new priority */
 000C           ;             ptcb->OSTCBPrio       = newprio;                    /* Set new task priority               */
 000C           ;             ptcb->OSTCBY          = y;
 000C           ;             ptcb->OSTCBX          = x;
 000C           ;             ptcb->OSTCBBitY       = bity;
 000C           ;             ptcb->OSTCBBitX       = bitx;
 000C           ;             OS_EXIT_CRITICAL();
 000C           ;             OS_Sched();                                         /* Run highest priority task ready     */
 000C           ;             return (OS_NO_ERR);
 000C           ;         } else {
 000C           ;             OSTCBPrioTbl[newprio] = (OS_TCB *)0;                /* Release the reserved prio.          */
 000C           ;             OS_EXIT_CRITICAL();
 000C           ;             return (OS_PRIO_ERR);                               /* Task to change didn't exist         */
 000C           ;         }
 000C           ;     }
 000C           ; }
 000C           ; #endif
 000C           ; /*$PAGE*/
 000C           ; /*
 000C           ; *********************************************************************************************************
 000C           ; *                                            CREATE A TASK
 000C           ; *
 000C           ; * Description: This function is used to have uC/OS-II manage the execution of a task.  Tasks can either
 000C           ; *              be created prior to the start of multitasking or by a running task.  A task cannot be
 000C           ; *              created by an ISR.
 000C           ; *
 000C           ; * Arguments  : task     is a pointer to the task's code
 000C           ; *
 000C           ; *              pdata    is a pointer to an optional data area which can be used to pass parameters to
 000C           ; *                       the task when the task first executes.  Where the task is concerned it thinks
 000C           ; *                       it was invoked and passed the argument 'pdata' as follows:
 000C           ; *
 000C           ; *                           void Task (void *pdata)
 000C           ; *                           {
 000C           ; *                               for (;;) {
 000C           ; *                                   Task code;
 000C           ; *                               }
 000C           ; *                           }
 000C           ; *
 000C           ; *              ptos     is a pointer to the task's top of stack.  If the configuration constant
 000C           ; *                       OS_STK_GROWTH is set to 1, the stack is assumed to grow downward (i.e. from high
 000C           ; *                       memory to low memory).  'pstk' will thus point to the highest (valid) memory
 000C           ; *                       location of the stack.  If OS_STK_GROWTH is set to 0, 'pstk' will point to the
 000C           ; *                       lowest memory location of the stack and the stack will grow with increasing
 000C           ; *                       memory locations.
 000C           ; *
 000C           ; *              prio     is the task's priority.  A unique priority MUST be assigned to each task and the
 000C           ; *                       lower the number, the higher the priority.
 000C           ; *
 000C           ; * Returns    : OS_NO_ERR        if the function was successful.
 000C           ; *              OS_PRIO_EXIT     if the task priority already exist
 000C           ; *                               (each task MUST have a unique priority).
 000C           ; *              OS_PRIO_INVALID  if the priority you specify is higher that the maximum allowed
 000C           ; *                               (i.e. >= OS_LOWEST_PRIO)
 000C           ; *********************************************************************************************************
 000C           ; */
 000C           ; 
 000C           ; #if OS_TASK_CREATE_EN > 0
 000C           ; INT8U  OSTaskCreate (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT8U prio)
 000C           ; {
 000C                   .dbline 168
 000C           ; #if OS_CRITICAL_METHOD == 3                  /* Allocate storage for CPU status register               */
 000C           ;     OS_CPU_SR  cpu_sr;
 000C           ; #endif
 000C           ;     OS_STK    *psp;
 000C           ;     INT8U      err;
 000C           ; 
 000C           ; 
 000C           ; #if OS_ARG_CHK_EN > 0
 000C           ;     if (prio > OS_LOWEST_PRIO) {             /* Make sure priority is within allowable range           */
 000C 84E1              ldi R24,20
 000E 8C15              cp R24,R12
 0010 10F4              brsh L4
 0012                   .dbline 168
 0012                   .dbline 169
 0012           ;         return (OS_PRIO_INVALID);
 0012 0AE2              ldi R16,42
 0014 79C0              xjmp L3
 0016           L4:
 0016                   .dbline 172
 0016           ;     }
 0016           ; #endif
 0016           ;     OS_ENTER_CRITICAL();
 0016 0A93              st -y,r16
 0018 0FB7              in r16,0x3F
 001A F894              cli
 001C 0F93              push r16
 001E 0991              ld r16,y+
 0020                   .dbline 172
 0020                   .dbline 173
 0020           ;     if (OSTCBPrioTbl[prio] == (OS_TCB *)0) { /* Make sure task doesn't already exist at this priority  */
 0020 82E0              ldi R24,2
 0022 8C9D              mul R24,R12
 0024 F001              movw R30,R0
 0026 80E0              ldi R24,<_OSTCBPrioTbl
 0028 90E0              ldi R25,>_OSTCBPrioTbl
 002A E80F              add R30,R24
 002C F91F              adc R31,R25
 002E 2080              ldd R2,z+0
 0030 3180              ldd R3,z+1
 0032 2220              tst R2
 0034 09F0              breq X1
 0036 63C0              xjmp L6
 0038           X1:
 0038 3320              tst R3
 003A 09F0              breq X2
 003C 60C0              xjmp L6
 003E           X2:
 003E           X0:
 003E                   .dbline 173
 003E                   .dbline 174
 003E           ;         OSTCBPrioTbl[prio] = (OS_TCB *)1;    /* Reserve the priority to prevent others from doing ...  */
 003E 82E0              ldi R24,2
 0040 8C9D              mul R24,R12
 0042 F001              movw R30,R0
 0044 80E0              ldi R24,<_OSTCBPrioTbl
 0046 90E0              ldi R25,>_OSTCBPrioTbl
 0048 E80F              add R30,R24
 004A F91F              adc R31,R25
 004C 81E0              ldi R24,1
 004E 90E0              ldi R25,0
 0050 9183              std z+1,R25
 0052 8083              std z+0,R24
 0054                   .dbline 176
 0054           ;                                              /* ... the same thing until task is created.              */
 0054           ;         OS_EXIT_CRITICAL();
 0054 0A93              st -y,r16
 0056 0F91              pop r16
 0058 0FBF              out 0x3F,r16
 005A 0991              ld r16,y+
 005C                   .dbline 176
 005C                   .dbline 177
 005C           ;         psp = (OS_STK *)OSTaskStkInit(task, pdata, ptos, 0);    /* Initialize the task's stack         */
 005C 2224              clr R2
 005E 3324              clr R3
 0060 3B82              std y+3,R3
 0062 2A82              std y+2,R2
 0064 0E88              ldd R0,y+22
 0066 1F88              ldd R1,y+23
 0068 1982              std y+1,R1
 006A 0882              std y+0,R0

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线亚洲免费视频| 亚洲一区视频在线观看视频| 亚洲国产日韩精品| 欧美亚洲高清一区| 一区二区三区在线高清| 免费成人性网站| 在线观看免费一区| 91国在线观看| 一区二区三区日韩| 日韩电影一区二区三区四区| 在线亚洲高清视频| 欧美精品一二三四| 日韩欧美国产1| 国产天堂亚洲国产碰碰| 精彩视频一区二区三区| 国产一区二区91| 高清免费成人av| 亚洲欧美另类久久久精品| 色综合天天在线| 久久在线观看免费| 国产精品自拍av| 亚洲精品免费看| 69久久99精品久久久久婷婷| 欧美一级高清大全免费观看| 欧美成人精精品一区二区频| 《视频一区视频二区| 在线观看国产91| 日本系列欧美系列| 国产欧美日韩激情| 国产精品三级视频| 在线观看网站黄不卡| 国内精品自线一区二区三区视频| 国产精品日韩精品欧美在线| 精品久久一区二区| 在线播放国产精品二区一二区四区| 欧美极品xxx| 99热在这里有精品免费| 国产精品1024| 欧美国产一区在线| 欧美成人猛片aaaaaaa| 欧美精品自拍偷拍动漫精品| 日韩精品高清不卡| 日韩国产欧美一区二区三区| 成人午夜激情视频| 久久久久久亚洲综合| 欧美一二三四在线| 91精品啪在线观看国产60岁| 在线看一区二区| 在线日韩国产精品| 91官网在线观看| 五月综合激情日本mⅴ| 欧美老肥妇做.爰bbww视频| 午夜精品久久久久久久久久| 亚洲在线中文字幕| 日韩国产精品久久| 久久久久久免费毛片精品| 99精品视频在线播放观看| 成人免费精品视频| 亚欧色一区w666天堂| 26uuu色噜噜精品一区二区| 精品乱码亚洲一区二区不卡| 国产毛片一区二区| 国产精品亚洲人在线观看| 亚洲欧美日本在线| 亚洲成人av一区二区| 中文字幕av一区 二区| 成人免费在线视频| 日韩美女视频一区二区在线观看| 日韩午夜精品视频| 国产精品久久精品日日| 亚洲午夜成aⅴ人片| 韩国女主播成人在线观看| 日韩高清国产一区在线| 成人午夜精品一区二区三区| 蜜臀av性久久久久蜜臀av麻豆 | 欧美一区二区三区视频在线观看| 精品少妇一区二区| 五月激情六月综合| av一本久道久久综合久久鬼色| 91精品国产麻豆国产自产在线 | 亚洲国产日韩在线一区模特| 国产精品日韩成人| 中文字幕av一区二区三区高| 精品亚洲成av人在线观看| 色狠狠av一区二区三区| 亚洲欧洲精品一区二区精品久久久 | 中文字幕一区不卡| 国产精品久久久久9999吃药| 亚洲图片一区二区| 亚洲成av人片在线观看| 99久久久久久| 日韩欧美国产一区二区在线播放 | 亚洲成a人片在线观看中文| 国产91在线|亚洲| 国产欧美日韩中文久久| 狠狠狠色丁香婷婷综合久久五月| 在线播放中文一区| 91精品国产综合久久香蕉的特点 | 成人国产视频在线观看| 国产a精品视频| 成年人网站91| 欧美制服丝袜第一页| 国产欧美日韩激情| 国产精品123| 国产色一区二区| 亚洲理论在线观看| 一区二区三区蜜桃网| 色婷婷综合中文久久一本| 欧美图区在线视频| 亚洲精品v日韩精品| 欧美精品久久一区| 中文字幕在线视频一区| 五月天亚洲婷婷| 欧美sm美女调教| 亚洲精品成人在线| 欧美一区在线视频| 国产成人精品免费在线| 天天影视网天天综合色在线播放| 久久蜜臀精品av| 美女网站在线免费欧美精品| 色婷婷综合在线| 国产精品一级在线| 日本特黄久久久高潮| 亚洲精品乱码久久久久久久久| 欧美丰满少妇xxxxx高潮对白| 中文字幕一区二区三区视频| 黄色精品一二区| 亚洲一区免费观看| 欧洲一区在线观看| 国产成人免费高清| 久久成人羞羞网站| 日韩专区中文字幕一区二区| 综合分类小说区另类春色亚洲小说欧美 | 欧美色中文字幕| 国产精品色哟哟网站| 欧美一区中文字幕| 欧美精品 日韩| 亚洲777理论| 欧美一二三在线| 久久91精品久久久久久秒播| 一区二区三区在线高清| 亚洲最新视频在线观看| xnxx国产精品| 亚洲精品一卡二卡| 国产精品嫩草影院av蜜臀| 亚洲欧洲av色图| 日韩精品一区二区三区四区| 91免费看`日韩一区二区| 国产成人aaa| 成人午夜激情视频| 亚洲国产毛片aaaaa无费看| 色94色欧美sute亚洲线路一ni| 亚洲精品美国一| 日韩视频在线观看一区二区| 国产精品一区专区| 成人中文字幕电影| 色婷婷久久久亚洲一区二区三区| 日本道精品一区二区三区| 欧美探花视频资源| 欧美v亚洲v综合ⅴ国产v| 99国产精品久久久久久久久久久| 99免费精品视频| 欧美日本一区二区在线观看| 日韩欧美一级二级| 91麻豆精品国产| 日韩精品影音先锋| 亚洲视频在线观看三级| 欧美一区二视频| 91天堂素人约啪| 欧美一级日韩一级| 91福利国产成人精品照片| 精品美女一区二区三区| 亚洲欧美视频在线观看视频| 免费在线看一区| 五月婷婷综合在线| 国产91在线观看| 高清成人在线观看| 国产电影一区在线| 国产在线播精品第三| 欧美日韩电影一区| 亚洲色图清纯唯美| 国产一区二区h| 精品久久人人做人人爰| 三级影片在线观看欧美日韩一区二区 | 91在线观看一区二区| 久久久久久久久久电影| 美腿丝袜亚洲一区| 日韩一区二区在线观看| 一区二区三国产精华液| 暴力调教一区二区三区| 国产欧美1区2区3区| 国产美女久久久久| 国产老女人精品毛片久久| 日韩视频在线永久播放| 麻豆91在线看| 一本到不卡精品视频在线观看 | 欧美日韩三级视频| 日韩在线a电影| 欧美日韩aaa| 捆绑变态av一区二区三区|