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

📄 avrx_suspend.s

📁 血凝仪检测系统,硬件电路部分由正弦波产生模块、前级放大与滤波模块、检测线圈、锁相环同步检波模块、后级平滑滤波与放大模块、AD转换器、线圈驱动模块、单片机模块等部分组成。
💻 S
字号:
#include        "avrx.inc"
/*
        Copyright 1999-2001, Larry Barello
        larry@barello.net

*/

        _MODULE(avrx_suspend)
        _EXTERN(_Epilog)
        _EXTERN(IntProlog)
        _EXTERN(Running)
        _EXTERN(RunQueue)
        _EXTERN(_RemoveObject)
        
        _CODESECTION

/*+
; --------------------------------------------------
; AvrXSuspend
;
; Mark a pid for suspension and attempt to remove from the run queue
;
; AvrXBreakpoint
;
; Suspend Self (Running) if previously suspended (single stepped)
;
; PASSED:       R25:R24 = PID
; RETURNS:      
; USES: 
; ASSUMES:
; NOTES:        Marks PID for suspension.  If removed from the run
;               queue, then marks suspended.  _QueuePid will take care
;               of this for pids queued elsewhere when they become
;               eligable for running.
-*/
        _FUNCTION(AvrXBreakpoint)
        
AvrXBreakpoint:
        AVRX_Prolog
        lds     Zh, Running+NextH
        lds     Zl, Running+NextL
        ldd     tmp0, Z+PidState
        sbrc    tmp0, SuspendBit
        rjmp    as00
        rjmp    _Epilog
        _ENDFUNC

        _FUNCTION(AvrXSuspend)

AvrXSuspend:                    ; User Entry Point
        AVRX_Prolog
        mov     Zh, p1h
        mov     Zl, p1l
        ldd     tmp0, Z+PidState
        sbr     tmp0, BV(SuspendBit)      ; Mark process for suspending
        std     Z+PidState, tmp0
as00:
        mov     p2h, Zh
        mov     p2l, Zl
        ldi     Zh, hi8(RunQueue)
        ldi     Zl, lo8(RunQueue)
        BeginCritical
        rcall   _RemoveObject           ; Attempt to remove from run queue
        mov     Yl, tmp0
        mov     Yh, tmp1
        adiw    Yl, 0
        breq    as01
        
        ldd     Zl, Y+PidState
        sbr     Zl, BV(SuspendedBit)    ; If found, then mark suspended.
        std     Y+PidState, Zl
as01:
        rjmp    _Epilog
        _ENDFUNC
        _END

⌨️ 快捷键说明

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