os_mbox.asm
来自「ucOS在51单片机上的移植实现」· 汇编 代码 · 共 947 行 · 第 1/3 页
ASM
947 行
L13:
.line 44
rsbx INTM
.line 45
MVDK *SP(7),*(AR1) ; |189|
ST #8,*AR1 ; |189|
.line 46
BD L20 ; |190|
NOP
LD *SP(2),A ; |190|
; branch occurs ; |190|
L14:
.line 50
MVDK *SP(2),*(AR1) ; |194|
LD *AR1(1),A ; |194|
BC L16,AEQ ; |194|
; branch occurs ; |194|
L15:
.line 51
ST #0,*SP(0) ; |195|
ST #2,*SP(1) ; |195|
LD *SP(2),A ; |195|
CALL #_OS_EventTaskRdy ; |195|
; call occurs [#_OS_EventTaskRdy] ; |195|
.line 52
MVDK *SP(2),*(AR1) ; |196|
LD *AR1(1),A ; |196|
BC L15,ANEQ ; |196|
; branch occurs ; |196|
L16:
.line 54
MVDK *SP(2),*(AR1) ; |198|
ST #63,*AR1(12) ; |198|
.line 55
MVDK *SP(2),*(AR1) ; |199|
ST #0,*AR1(13) ; |199|
.line 57
MVDK *SP(2),*(AR1) ; |201|
ST #0,*AR1 ; |201|
.line 58
MVDK *SP(2),*(AR1) ; |202|
MVKD *(_OSEventFreeList),*AR1(3) ; |202|
.line 59
MVDK *SP(2),*(AR1) ; |203|
ST #0,*AR1(2) ; |203|
.line 60
MVDK *SP(2),*(_OSEventFreeList) ; |204|
.line 61
rsbx INTM
.line 62
CMPM *SP(3),#1 ; |206|
BC L17,NTC ; |206|
; branch occurs ; |206|
.line 63
CALL #_OS_Sched ; |207|
; call occurs [#_OS_Sched] ; |207|
L17:
.line 65
MVDK *SP(7),*(AR1) ; |209|
ST #0,*AR1 ; |209|
.line 66
BD L20 ; |210|
NOP
LD #0,A ; |210|
; branch occurs ; |210|
L18:
.line 69
rsbx INTM
.line 70
MVDK *SP(7),*(AR1) ; |214|
ST #7,*AR1 ; |214|
.line 71
BD L20 ; |215|
NOP
LD *SP(2),A ; |215|
; branch occurs ; |215|
L19:
MVDK *SP(6),*(AR1) ; |215|
LDM AR1,A ; |215|
BC L12,AEQ ; |215|
; branch occurs ; |215|
STM #1,AR0 ; |215|
CMPR 0,AR1 ; |215|
BC L14,TC ; |215|
; branch occurs ; |215|
B L18 ; |215|
; branch occurs ; |215|
L20:
.line 73
FRAME #4 ; |217|
POPM AR1 ; |217|
RET ; |217|
; return occurs ; |217|
.endfunc 217,000000400h,5
.sect ".text"
.global _OSMboxPend
.sym _OSMboxPend,_OSMboxPend, 96, 2, 0
.func 252
;***************************************************************
;* FUNCTION DEF: _OSMboxPend *
;***************************************************************
_OSMboxPend:
;* A assigned to _pevent
.sym _pevent,0, 24, 17, 16, _os_event
.sym _timeout,4, 14, 9, 16
.sym _err,5, 30, 9, 16
.sym _pevent,0, 24, 1, 16, _os_event
.sym _msg,1, 16, 1, 16
PSHM AR1
FRAME #-2
NOP
.line 2
STL A,*SP(0) ; |253|
.line 9
LD *(_OSIntNesting),A ; |260|
BC L21,AEQ ; |260|
; branch occurs ; |260|
.line 10
MVDK *SP(5),*(AR1) ; |261|
ST #2,*AR1 ; |261|
.line 11
BD L26 ; |262|
NOP
LD #0,A ; |262|
; branch occurs ; |262|
L21:
.line 14
LD *SP(0),A ; |265|
BC L22,ANEQ ; |265|
; branch occurs ; |265|
.line 15
MVDK *SP(5),*(AR1) ; |266|
ST #4,*AR1 ; |266|
.line 16
BD L26 ; |267|
NOP
LD #0,A ; |267|
; branch occurs ; |267|
L22:
.line 19
MVDK *SP(0),*(AR1) ; |270|
CMPM *AR1,#1 ; |270|
BC L23,TC ; |270|
; branch occurs ; |270|
.line 20
MVDK *SP(5),*(AR1) ; |271|
ST #1,*AR1 ; |271|
.line 21
BD L26 ; |272|
NOP
LD #0,A ; |272|
; branch occurs ; |272|
L23:
.line 23
ssbx INTM
.line 24
LD *AR1(3),A ; |275|
STL A,*SP(1) ; |275|
.line 25
LD *SP(1),A ; |276|
BC L24,AEQ ; |276|
; branch occurs ; |276|
.line 26
ST #0,*AR1(3) ; |277|
.line 27
rsbx INTM
.line 28
MVDK *SP(5),*(AR1) ; |279|
ST #0,*AR1 ; |279|
.line 29
BD L26 ; |280|
NOP
LD *SP(1),A ; |280|
; branch occurs ; |280|
L24:
.line 31
MVDM *(_OSTCBCur),AR1 ; |282|
NOP
ORM #2,*AR1(15) ; |282|
.line 32
MVDM *(_OSTCBCur),AR1 ; |283|
LD *SP(4),A ; |283|
STL A,*AR1(14) ; |283|
.line 33
LD *SP(0),A ; |284|
CALL #_OS_EventTaskWait ; |284|
; call occurs [#_OS_EventTaskWait] ; |284|
.line 34
rsbx INTM
.line 35
CALL #_OS_Sched ; |286|
; call occurs [#_OS_Sched] ; |286|
.line 36
ssbx INTM
.line 37
MVDM *(_OSTCBCur),AR1 ; |288|
NOP
LD *AR1(11),A ; |288|
STL A,*SP(1) ; |288|
.line 38
LD *SP(1),A ; |289|
BC L25,AEQ ; |289|
; branch occurs ; |289|
.line 39
ST #0,*AR1(11) ; |290|
.line 40
MVDM *(_OSTCBCur),AR1 ; |291|
NOP
ST #0,*AR1(15) ; |291|
.line 41
MVDM *(_OSTCBCur),AR1 ; |292|
NOP
ST #0,*AR1(10) ; |292|
.line 42
rsbx INTM
.line 43
MVDK *SP(5),*(AR1) ; |294|
ST #0,*AR1 ; |294|
.line 44
BD L26 ; |295|
NOP
LD *SP(1),A ; |295|
; branch occurs ; |295|
L25:
.line 46
LD *SP(0),A ; |297|
CALL #_OS_EventTO ; |297|
; call occurs [#_OS_EventTO] ; |297|
.line 47
rsbx INTM
.line 48
MVDK *SP(5),*(AR1) ; |299|
ST #10,*AR1 ; |299|
.line 49
LD #0,A ; |300|
L26:
.line 50
FRAME #2 ; |301|
POPM AR1 ; |301|
RET ; |301|
; return occurs ; |301|
.endfunc 301,000000400h,3
.sect ".text"
.global _OSMboxPost
.sym _OSMboxPost,_OSMboxPost, 46, 2, 0
.func 324
;***************************************************************
;* FUNCTION DEF: _OSMboxPost *
;***************************************************************
_OSMboxPost:
;* A assigned to _pevent
.sym _pevent,0, 24, 17, 16, _os_event
.sym _msg,6, 16, 9, 16
.sym _pevent,2, 24, 1, 16, _os_event
PSHM AR1
FRAME #-4
NOP
.line 2
STL A,*SP(2) ; |325|
.line 9
LD *SP(2),A ; |332|
BC L27,ANEQ ; |332|
; branch occurs ; |332|
.line 10
BD L32 ; |333|
NOP
LD #4,A ; |333|
; branch occurs ; |333|
L27:
.line 12
LD *SP(6),A ; |335|
BC L28,ANEQ ; |335|
; branch occurs ; |335|
.line 13
BD L32 ; |336|
NOP
LD #3,A ; |336|
; branch occurs ; |336|
L28:
.line 16
MVDK *SP(2),*(AR1) ; |339|
CMPM *AR1,#1 ; |339|
BC L29,TC ; |339|
; branch occurs ; |339|
.line 17
BD L32 ; |340|
NOP
LD #1,A ; |340|
; branch occurs ; |340|
L29:
.line 19
ssbx INTM
.line 20
LD *AR1(1),A ; |343|
BC L30,AEQ ; |343|
; branch occurs ; |343|
.line 21
LD *SP(6),A ; |344|
ST #2,*SP(1) ; |344|
STL A,*SP(0) ; |344|
CALLD #_OS_EventTaskRdy ; |344|
NOP
LDM AR1,A ; |344|
; call occurs [#_OS_EventTaskRdy] ; |344|
.line 22
rsbx INTM
.line 23
CALL #_OS_Sched ; |346|
; call occurs [#_OS_Sched] ; |346|
.line 24
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?