bsp_a.asm

来自「ucosII 修改移植到 freescale MCF51JM128」· 汇编 代码 · 共 71 行

ASM
71
字号
;;************************************************************************************************;                                         uC/OS-II;                                    The Real-Time Kernel; ;                         (c) Copyright 2006, Micrium, Inc., Weston, FL;                                     All Rights Reserved;  ; File        : bsp_a.asm; By          : Jean J. Labrosse;*************************************************************************************************;;;*************************************************************************************************;                                       PUBLIC DECLARATIONS;*************************************************************************************************;		.global  _OSTickISR;;**************************************************************************************************;                                     EXTERNAL DECLARATIONS;**************************************************************************************************;        .extern  _OSIntNesting        .extern  _OSIntExit        .extern  _OSTCBCur        .extern  _OSTickISR_Handler        .text      ;;*******************************************************************************************;                                   uC/OS-II's TICK ISR;; Description : This function services uC/OS-II's tick interrupts;; Arguments   : none;*******************************************************************************************;_OSTickISR:        MOVE.W     #0x2700,SR               ; Disable interrupts                                                                             LEA        -60(A7),A7               ; Save processor registers onto stack                MOVEM.L    D0-D7/A0-A6,(A7)        MOVEQ.L    #0,D0                    ; OSIntNesting++                                     MOVE.B     (_OSIntNesting),D0        ADDQ.L     #1,D0                    MOVE.B     D0,(_OSIntNesting)        CMPI.L     #1, D0                   ; if (OSIntNesting == 1)                             BNE        _OSTickISR1        MOVE.L     (_OSTCBCur), A1          ;     OSTCBCur-<OSTCBStkPtr = SP                     MOVE.L     A7,(A1)_OSTickISR1:        JSR        _OSTickISR_Handler       ; OSTickISR_Handler()                                JSR        _OSIntExit               ; Exit the ISR                                       MOVEM.L    (A7),D0-D7/A0-A6         ; Restore processor registers from stack             LEA        60(A7),A7        RTE                                 ; Return to task or nested ISR                            

⌨️ 快捷键说明

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