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

📄 os_q.asm

📁 ucOS在51单片机上的移植实现
💻 ASM
📖 第 1 页 / 共 4 页
字号:
        CMPM      *AR1,#2               ; |217| 
        BC        L14,TC                ; |217| 
        ; branch occurs ; |217| 
	.line	21
        MVDK      *SP(9),*(AR1)         ; |218| 
        ST        #1,*AR1               ; |218| 
	.line	22
        BD        L24                   ; |219| 
        NOP
        LD        *SP(2),A              ; |219| 
        ; branch occurs ; |219| 
L14:    
	.line	24
 ssbx INTM
	.line	25
        LD        *AR1(1),A             ; |222| 
        BC        L15,AEQ               ; |222| 
        ; branch occurs ; |222| 
	.line	26
        ST        #1,*SP(3)             ; |223| 
	.line	27
        B         L23                   ; |224| 
        ; branch occurs ; |224| 
L15:    
	.line	28
        ST        #0,*SP(3)             ; |225| 
	.line	30
        B         L23                   ; |227| 
        ; branch occurs ; |227| 
L16:    
	.line	32
        LD        *SP(3),A              ; |229| 
        BC        L17,ANEQ              ; |229| 
        ; branch occurs ; |229| 
	.line	34
        MVDK      *SP(2),*(AR1)         ; |231| 
        ST        #63,*AR1(12)          ; |231| 
	.line	35
        MVDK      *SP(2),*(AR1)         ; |232| 
        ST        #0,*AR1(13)           ; |232| 
	.line	37
        MVDK      *SP(2),*(AR1)         ; |234| 
        LD        *AR1(3),A             ; |234| 
        STL       A,*SP(4)              ; |234| 
	.line	38
        STLM      A,AR1
        NOP
        MVKD      *(_OSQFreeList),*AR1  ; |235| 
	.line	39
        MVDK      *SP(4),*(_OSQFreeList) ; |236| 
	.line	40
        MVDK      *SP(2),*(AR1)         ; |237| 
        ST        #0,*AR1               ; |237| 
	.line	41
        MVDK      *SP(2),*(AR1)         ; |238| 
        MVKD      *(_OSEventFreeList),*AR1(3) ; |238| 
	.line	42
        MVDK      *SP(2),*(AR1)         ; |239| 
        ST        #0,*AR1(2)            ; |239| 
	.line	43
        MVDK      *SP(2),*(_OSEventFreeList) ; |240| 
	.line	44
 rsbx INTM
	.line	45
        MVDK      *SP(9),*(AR1)         ; |242| 
        ST        #0,*AR1               ; |242| 
	.line	46
        BD        L24                   ; |243| 
        NOP
        LD        #0,A                  ; |243| 
        ; branch occurs ; |243| 
	.line	47
L17:    
	.line	48
 rsbx INTM
	.line	49
        MVDK      *SP(9),*(AR1)         ; |246| 
        ST        #8,*AR1               ; |246| 
	.line	50
        BD        L24                   ; |247| 
        NOP
        LD        *SP(2),A              ; |247| 
        ; branch occurs ; |247| 
L18:    
	.line	54
        MVDK      *SP(2),*(AR1)         ; |251| 
        LD        *AR1(1),A             ; |251| 
        BC        L20,AEQ               ; |251| 
        ; branch occurs ; |251| 
L19:    
	.line	55
        ST        #0,*SP(0)             ; |252| 
        ST        #4,*SP(1)             ; |252| 
        LD        *SP(2),A              ; |252| 
        CALL      #_OS_EventTaskRdy     ; |252| 
        ; call occurs [#_OS_EventTaskRdy] ; |252| 
	.line	56
        MVDK      *SP(2),*(AR1)         ; |253| 
        LD        *AR1(1),A             ; |253| 
        BC        L19,ANEQ              ; |253| 
        ; branch occurs ; |253| 
L20:    
	.line	58
        MVDK      *SP(2),*(AR1)         ; |255| 
        ST        #63,*AR1(12)          ; |255| 
	.line	59
        MVDK      *SP(2),*(AR1)         ; |256| 
        ST        #0,*AR1(13)           ; |256| 
	.line	61
        MVDK      *SP(2),*(AR1)         ; |258| 
        LD        *AR1(3),A             ; |258| 
        STL       A,*SP(4)              ; |258| 
	.line	62
        STLM      A,AR1
        NOP
        MVKD      *(_OSQFreeList),*AR1  ; |259| 
	.line	63
        MVDK      *SP(4),*(_OSQFreeList) ; |260| 
	.line	64
        MVDK      *SP(2),*(AR1)         ; |261| 
        ST        #0,*AR1               ; |261| 
	.line	65
        MVDK      *SP(2),*(AR1)         ; |262| 
        MVKD      *(_OSEventFreeList),*AR1(3) ; |262| 
	.line	66
        MVDK      *SP(2),*(AR1)         ; |263| 
        ST        #0,*AR1(2)            ; |263| 
	.line	67
        MVDK      *SP(2),*(_OSEventFreeList) ; |264| 
	.line	68
 rsbx INTM
	.line	69
        CMPM      *SP(3),#1             ; |266| 
        BC        L21,NTC               ; |266| 
        ; branch occurs ; |266| 
	.line	70
        CALL      #_OS_Sched            ; |267| 
        ; call occurs [#_OS_Sched] ; |267| 
L21:    
	.line	72
        MVDK      *SP(9),*(AR1)         ; |269| 
        ST        #0,*AR1               ; |269| 
	.line	73
        BD        L24                   ; |270| 
        NOP
        LD        #0,A                  ; |270| 
        ; branch occurs ; |270| 
L22:    
	.line	76
 rsbx INTM
	.line	77
        MVDK      *SP(9),*(AR1)         ; |274| 
        ST        #7,*AR1               ; |274| 
	.line	78
        BD        L24                   ; |275| 
        NOP
        LD        *SP(2),A              ; |275| 
        ; branch occurs ; |275| 
L23:    
        MVDK      *SP(8),*(AR1)         ; |275| 
        LDM       AR1,A                 ; |275| 
        BC        L16,AEQ               ; |275| 
        ; branch occurs ; |275| 
        STM       #1,AR0                ; |275| 
        CMPR      0,AR1                 ; |275| 
        BC        L18,TC                ; |275| 
        ; branch occurs ; |275| 
        B         L22                   ; |275| 
        ; branch occurs ; |275| 
L24:    
	.line	80
        FRAME     #6                    ; |277| 
        POPM      AR1                   ; |277| 
        RET       ; |277| 
        ; return occurs ; |277| 
	.endfunc	277,000000400h,7


	.sect	".text"
	.global	_OSQFlush
	.sym	_OSQFlush,_OSQFlush, 46, 2, 0
	.func	301

;***************************************************************
;* FUNCTION DEF: _OSQFlush                                     *
;***************************************************************
_OSQFlush:
;* A     assigned to _pevent
	.sym	_pevent,0, 24, 17, 16, _os_event
	.sym	_pevent,0, 24, 1, 16, _os_event
	.sym	_pq,1, 24, 1, 16, _os_q
        PSHM      AR1
        FRAME     #-2
        NOP
	.line	2
        STL       A,*SP(0)              ; |302| 
	.line	10
        LD        *SP(0),A              ; |310| 
        BC        L25,ANEQ              ; |310| 
        ; branch occurs ; |310| 
	.line	11
        BD        L27                   ; |311| 
        NOP
        LD        #4,A                  ; |311| 
        ; branch occurs ; |311| 
L25:    
	.line	13
        MVDK      *SP(0),*(AR1)         ; |313| 
        CMPM      *AR1,#2               ; |313| 
        BC        L26,TC                ; |313| 
        ; branch occurs ; |313| 
	.line	14
        BD        L27                   ; |314| 
        NOP
        LD        #1,A                  ; |314| 
        ; branch occurs ; |314| 
L26:    
	.line	17
 ssbx INTM
	.line	18
        LD        *AR1(3),A             ; |318| 
        STL       A,*SP(1)              ; |318| 
	.line	19
        STLM      A,AR1
        NOP
        NOP
        LD        *AR1(1),A             ; |319| 
        STL       A,*AR1(3)             ; |319| 
	.line	20
        MVDK      *SP(1),*(AR1)         ; |320| 
        LD        *AR1(1),A             ; |320| 
        STL       A,*AR1(4)             ; |320| 
	.line	21
        MVDK      *SP(1),*(AR1)         ; |321| 
        ST        #0,*AR1(6)            ; |321| 
	.line	22
 rsbx INTM
	.line	23
        LD        #0,A                  ; |323| 
L27:    
	.line	24
        FRAME     #2                    ; |324| 
        POPM      AR1                   ; |324| 
        RET       ; |324| 
        ; return occurs ; |324| 
	.endfunc	324,000000400h,3


	.sect	".text"
	.global	_OSQPend
	.sym	_OSQPend,_OSQPend, 96, 2, 0
	.func	362

;***************************************************************
;* FUNCTION DEF: _OSQPend                                      *
;***************************************************************
_OSQPend:
;* A     assigned to _pevent
	.sym	_pevent,0, 24, 17, 16, _os_event
	.sym	_timeout,6, 14, 9, 16
	.sym	_err,7, 30, 9, 16
	.sym	_pevent,0, 24, 1, 16, _os_event
	.sym	_msg,1, 16, 1, 16
	.sym	_pq,2, 24, 1, 16, _os_q
        PSHM      AR1
        FRAME     #-4
        NOP
	.line	2
        STL       A,*SP(0)              ; |363| 
	.line	10
        LD        *(_OSIntNesting),A    ; |371| 
        BC        L28,AEQ               ; |371| 
        ; branch occurs ; |371| 
	.line	11
        MVDK      *SP(7),*(AR1)         ; |372| 
        ST        #2,*AR1               ; |372| 
	.line	12
        BD        L34                   ; |373| 
        NOP
        LD        #0,A                  ; |373| 
        ; branch occurs ; |373| 
L28:    
	.line	15
        LD        *SP(0),A              ; |376| 
        BC        L29,ANEQ              ; |376| 
        ; branch occurs ; |376| 
	.line	16
        MVDK      *SP(7),*(AR1)         ; |377| 
        ST        #4,*AR1               ; |377| 
	.line	17
        BD        L34                   ; |378| 
        NOP
        LD        #0,A                  ; |378| 
        ; branch occurs ; |378| 
L29:    
	.line	19
        MVDK      *SP(0),*(AR1)         ; |380| 
        CMPM      *AR1,#2               ; |380| 
        BC        L30,TC                ; |380| 
        ; branch occurs ; |380| 
	.line	20
        MVDK      *SP(7),*(AR1)         ; |381| 
        ST        #1,*AR1               ; |381| 
	.line	21
        BD        L34                   ; |382| 
        NOP
        LD        #0,A                  ; |382| 
        ; branch occurs ; |382| 
L30:    
	.line	24
 ssbx INTM
	.line	25
        LD        *AR1(3),A             ; |386| 
        STL       A,*SP(2)              ; |386| 
	.line	26
        STLM      A,AR1
        NOP
        NOP
        LD        *AR1(6),A             ; |387| 
        BC        L32,AEQ               ; |387| 
        ; branch occurs ; |387| 
	.line	27
        MVDK      *AR1(4),*(AR1)        ; |388| 
        MVDK      *SP(2),*(AR2)         ; |388| 
        LD        *AR1+,A               ; |388| 
        MVKD      *(AR1),*AR2(4)        ; |388| 
        STL       A,*SP(1)              ; |388| 
	.line	28
        MVDK      *SP(2),*(AR1)         ; |389| 
        ADDM      #-1,*AR1(6)           ; |389| 
	.line	29
        MVDK      *SP(2),*(AR2)         ; |390| 
        MVMM      AR2,AR1               ; |390| 
        LD        *AR1(4),A             ; |390| 
        SUB       *AR2(2),A             ; |390| 
        BC        L31,ANEQ              ; |390| 
        ; branch occurs ; |390| 
	.line	30
        LD        *AR1(1),A             ; |391| 
        STL       A,*AR1(4)             ; |391| 
L31:    
	.line	32
 rsbx INTM
	.line	33
        MVDK      *SP(7),*(AR1)         ; |394| 
        ST        #0,*AR1               ; |394| 
	.line	34
        BD        L34                   ; |395| 
        NOP
        LD        *SP(1),A              ; |395| 
        ; branch occurs ; |395| 
L32:    
	.line	36
        MVDM      *(_OSTCBCur),AR1      ; |397| 
        NOP
        ORM       #4,*AR1(15)           ; |397| 
	.line	37
        MVDM      *(_OSTCBCur),AR1      ; |398| 
        LD        *SP(6),A              ; |398| 
        STL       A,*AR1(14)            ; |398| 
	.line	38
        LD        *SP(0),A              ; |399| 
        CALL      #_OS_EventTaskWait    ; |399| 
        ; call occurs [#_OS_EventTaskWait] ; |399| 
	.line	39
 rsbx INTM

⌨️ 快捷键说明

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