📄 app.s
字号:
.dbend
.area vector(rom, abs)
.org 16
jmp _OSTickISR
.area text(rom, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ/12864.h
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
.dbfunc e OSTickISR_Handler _OSTickISR_Handler fV
.even
_OSTickISR_Handler::
.dbline -1
.dbline 57
.dbline 58
ldi R24,40
out 0x24,R24
.dbline 59
xcall _OSTimeTick
.dbline -2
L51:
.dbline 0 ; func end
ret
.dbend
.dbfunc e OSTickISR_Init _OSTickISR_Init fV
.even
_OSTickISR_Init::
.dbline -1
.dbline 67
.dbline 68
cli
.dbline 69
in R24,0x39
andi R24,191
out 0x39,R24
.dbline 70
clr R2
out 0x25,R2
.dbline 71
out 0x24,R2
.dbline 72
ldi R24,7
out 0x25,R24
.dbline 73
in R24,0x39
ori R24,64
out 0x39,R24
.dbline -2
L52:
.dbline 0 ; func end
ret
.dbend
.dbfunc e main _main fV
.even
_main::
sbiw R28,3
.dbline -1
.dbline 81
.dbline 82
xcall _OSTickISR_Init
.dbline 83
xcall _OSInit
.dbline 84
ldi R16,1
ldi R17,0
xcall _OSSemCreate
sts _RandomSem+1,R17
sts _RandomSem,R16
.dbline 85
clr R2
std y+2,R2
ldi R24,<_TaskStartStk+99
ldi R25,>_TaskStartStk+99
std y+1,R25
std y+0,R24
clr R18
clr R19
ldi R16,<PL_TaskStart
ldi R17,>PL_TaskStart
xcall _OSTaskCreate
.dbline 86
xcall _OSStart
.dbline -2
L53:
adiw R28,3
.dbline 0 ; func end
ret
.dbend
.dbfunc s TaskStart _TaskStart fV
; cpu_sr -> R10
; pdata -> R10,R11
.even
_TaskStart:
xcall push_gset3
movw R10,R16
sbiw R28,3
.dbline -1
.dbline 89
.dbline 93
sei
.dbline 94
.dbline 95
xcall _OS_CPU_SR_Save
mov R10,R16
.dbline 96
xcall _Lcd_Init
.dbline 97
xcall _TaskStartDispInit
.dbline 98
mov R16,R10
xcall _OS_CPU_SR_Restore
.dbline 99
xcall _OSStatInit
.dbline 100
ldi R24,1
std y+2,R24
ldi R24,<_Task1Stk+99
ldi R25,>_Task1Stk+99
std y+1,R25
std y+0,R24
clr R18
clr R19
ldi R16,<PL_AppTask1
ldi R17,>PL_AppTask1
xcall _OSTaskCreate
.dbline 101
ldi R24,2
std y+2,R24
ldi R24,<_Task2Stk+99
ldi R25,>_Task2Stk+99
std y+1,R25
std y+0,R24
clr R18
clr R19
ldi R16,<PL_AppTask2
ldi R17,>PL_AppTask2
xcall _OSTaskCreate
.dbline 102
ldi R24,3
std y+2,R24
ldi R24,<_Task3Stk+99
ldi R25,>_Task3Stk+99
std y+1,R25
std y+0,R24
clr R18
clr R19
ldi R16,<PL_AppTask3
ldi R17,>PL_AppTask3
xcall _OSTaskCreate
xjmp L60
L59:
.dbline 104
.dbline 105
xcall _TaskStartDisp
.dbline 106
ldi R20,0
ldi R21,0
ldi R22,0
ldi R23,0
sts _OSCtxSwCtr+1,R21
sts _OSCtxSwCtr,R20
sts _OSCtxSwCtr+2+1,R23
sts _OSCtxSwCtr+2,R22
.dbline 107
ldi R16,50
ldi R17,0
xcall _OSTimeDly
.dbline 108
L60:
.dbline 103
xjmp L59
X3:
.dbline -2
L55:
adiw R28,3
xcall pop_gset3
.dbline 0 ; func end
ret
.dbsym r cpu_sr 10 c
.dbsym r pdata 10 pV
.dbend
.dbfunc s TaskStartDispInit _TaskStartDispInit fV
; line -> R20,R21
.even
_TaskStartDispInit:
xcall push_gset1
sbiw R28,2
.dbline -1
.dbline 111
.dbline 113
ldi R20,<L63
ldi R21,>L63
.dbline 114
std y+1,R21
std y+0,R20
clr R18
clr R16
xcall _LCD_write_string
.dbline 115
ldi R20,<L64
ldi R21,>L64
.dbline 116
std y+1,R21
std y+0,R20
ldi R18,3
clr R16
xcall _LCD_write_string
.dbline 117
ldi R20,<L65
ldi R21,>L65
.dbline 118
std y+1,R21
std y+0,R20
ldi R18,2
clr R16
xcall _LCD_write_string
.dbline -2
L62:
adiw R28,2
xcall pop_gset1
.dbline 0 ; func end
ret
.dbsym r line 20 pc
.dbend
.dbfunc s TaskStartDisp _TaskStartDisp fV
; a -> R20
; i -> R22
.even
_TaskStartDisp:
xcall push_gset2
sbiw R28,2
.dbline -1
.dbline 121
.dbline 123
lds R20,_OSCPUUsage
.dbline 124
clr R2
sts _temp+4,R2
.dbline 125
ldi R24,37
sts _temp+3,R24
.dbline 126
ldi R22,3
xjmp L72
L69:
.dbline 127
.dbline 128
clr R2
cp R2,R20
brsh L73
.dbline 129
.dbline 130
ldi R17,10
mov R16,R20
xcall mod8u
mov R24,R16
subi R24,208 ; addi 48
ldi R30,<_temp-1
ldi R31,>_temp-1
mov R26,R22
clr R27
add R26,R30
adc R27,R31
st x,R24
.dbline 131
ldi R17,10
mov R16,R20
xcall div8u
mov R20,R16
.dbline 132
xjmp L74
L73:
.dbline 133
ldi R24,<_temp-1
ldi R25,>_temp-1
mov R30,R22
clr R31
add R30,R24
adc R31,R25
ldi R24,32
std z+0,R24
L74:
.dbline 134
L70:
.dbline 126
dec R22
L72:
.dbline 126
clr R2
cp R2,R22
brlo L69
.dbline 135
ldi R24,<_temp
ldi R25,>_temp
std y+1,R25
std y+0,R24
ldi R18,2
ldi R16,5
xcall _LCD_write_string
.dbline 136
lds R4,_OSCtxSwCtr+2
lds R5,_OSCtxSwCtr+2+1
lds R2,_OSCtxSwCtr
lds R3,_OSCtxSwCtr+1
mov R20,R2
.dbline 137
ldi R22,4
xjmp L80
L77:
.dbline 138
.dbline 139
clr R2
cp R2,R20
brsh L81
.dbline 140
.dbline 141
ldi R17,10
mov R16,R20
xcall mod8u
mov R24,R16
subi R24,208 ; addi 48
ldi R30,<_temp-1
ldi R31,>_temp-1
mov R26,R22
clr R27
add R26,R30
adc R27,R31
st x,R24
.dbline 142
ldi R17,10
mov R16,R20
xcall div8u
mov R20,R16
.dbline 143
xjmp L82
L81:
.dbline 144
ldi R24,<_temp-1
ldi R25,>_temp-1
mov R30,R22
clr R31
add R30,R24
adc R31,R25
ldi R24,32
std z+0,R24
L82:
.dbline 145
L78:
.dbline 137
dec R22
L80:
.dbline 137
clr R2
cp R2,R22
brlo L77
.dbline 146
ldi R24,<_temp
ldi R25,>_temp
std y+1,R25
std y+0,R24
ldi R18,3
ldi R16,5
xcall _LCD_write_string
.dbline -2
L66:
adiw R28,2
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r a 20 c
.dbsym r i 22 c
.dbend
.dbfunc s AppTask1 _AppTask1 fV
; err -> y+2
; p_arg -> R20,R21
.even
_AppTask1:
xcall push_gset1
movw R20,R16
sbiw R28,3
.dbline -1
.dbline 151
.dbline 153
xjmp L87
L86:
.dbline 154
.dbline 155
movw R24,R28
adiw R24,2
std y+1,R25
std y+0,R24
clr R18
clr R19
lds R16,_RandomSem
lds R17,_RandomSem+1
xcall _OSSemPend
.dbline 156
ldi R24,1
in R2,0x18
eor R2,R24
out 0x18,R2
.dbline 157
lds R16,_RandomSem
lds R17,_RandomSem+1
xcall _OSSemPost
.dbline 158
ldi R16,1
ldi R17,0
xcall _OSTimeDly
.dbline 159
L87:
.dbline 154
xjmp L86
X4:
.dbline -2
L85:
adiw R28,3
xcall pop_gset1
.dbline 0 ; func end
ret
.dbsym l err 2 c
.dbsym r p_arg 20 pV
.dbend
.dbfunc s AppTask2 _AppTask2 fV
; err -> y+2
; p_arg -> R20,R21
.even
_AppTask2:
xcall push_gset1
movw R20,R16
sbiw R28,3
.dbline -1
.dbline 162
.dbline 164
xjmp L91
L90:
.dbline 165
.dbline 166
movw R24,R28
adiw R24,2
std y+1,R25
std y+0,R24
clr R18
clr R19
lds R16,_RandomSem
lds R17,_RandomSem+1
xcall _OSSemPend
.dbline 167
ldi R24,2
in R2,0x18
eor R2,R24
out 0x18,R2
.dbline 168
lds R16,_RandomSem
lds R17,_RandomSem+1
xcall _OSSemPost
.dbline 169
ldi R16,4
ldi R17,0
xcall _OSTimeDly
.dbline 170
L91:
.dbline 165
xjmp L90
X5:
.dbline -2
L89:
adiw R28,3
xcall pop_gset1
.dbline 0 ; func end
ret
.dbsym l err 2 c
.dbsym r p_arg 20 pV
.dbend
.dbfunc s AppTask3 _AppTask3 fV
; cpu_sr -> R22
; line -> R20,R21
; data -> R20,R21
.even
_AppTask3:
xcall push_gset2
movw R20,R16
sbiw R28,2
.dbline -1
.dbline 173
.dbline 177
ldi R20,<L94
ldi R21,>L94
.dbline 178
.dbline 179
std y+1,R21
std y+0,R20
ldi R18,1
clr R16
xcall _LCD_write_string
.dbline 180
L95:
.dbline 181
.dbline 182
ldi R20,<L99
ldi R21,>L99
.dbline 183
xcall _OS_CPU_SR_Save
mov R22,R16
.dbline 184
std y+1,R21
std y+0,R20
ldi R18,1
ldi R16,6
xcall _LCD_write_string
.dbline 185
mov R16,R22
xcall _OS_CPU_SR_Restore
.dbline 186
ldi R16,6
ldi R17,0
xcall _OSTimeDly
.dbline 187
ldi R20,<L100
ldi R21,>L100
.dbline 188
xcall _OS_CPU_SR_Save
mov R22,R16
.dbline 189
std y+1,R21
std y+0,R20
ldi R18,1
ldi R16,6
xcall _LCD_write_string
.dbline 190
mov R16,R22
xcall _OS_CPU_SR_Restore
.dbline 191
ldi R16,6
ldi R17,0
xcall _OSTimeDly
.dbline 192
ldi R20,<L101
ldi R21,>L101
.dbline 193
xcall _OS_CPU_SR_Save
mov R22,R16
.dbline 194
std y+1,R21
std y+0,R20
ldi R18,1
ldi R16,6
xcall _LCD_write_string
.dbline 195
mov R16,R22
xcall _OS_CPU_SR_Restore
.dbline 196
ldi R16,6
ldi R17,0
xcall _OSTimeDly
.dbline 197
.dbline 180
.dbline 180
xjmp L95
X6:
.dbline -2
L93:
adiw R28,2
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r cpu_sr 22 c
.dbsym r line 20 pc
.dbsym r data 20 pV
.dbend
.area bss(ram, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
_temp::
.blkb 5
.dbsym e temp _temp A[5:5]c
_RandomSem::
.blkb 2
.dbstruct 0 7 os_event
.dbfield 0 OSEventType c
.dbfield 1 OSEventGrp c
.dbfield 2 OSEventCnt i
.dbfield 4 OSEventPtr pV
.dbfield 6 OSEventTbl A[1:1]c
.dbend
.dbsym e RandomSem _RandomSem pS[os_event]
_Task3Stk::
.blkb 100
.dbsym e Task3Stk _Task3Stk A[100:100]c
_Task2Stk::
.blkb 100
.dbsym e Task2Stk _Task2Stk A[100:100]c
_Task1Stk::
.blkb 100
.dbsym e Task1Stk _Task1Stk A[100:100]c
_TaskStartStk::
.blkb 100
.dbsym e TaskStartStk _TaskStartStk A[100:100]c
.area data(ram, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
L101:
.blkb 2
.area idata
.byte 47,0
.area data(ram, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
L100:
.blkb 2
.area idata
.byte 124,0
.area data(ram, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
L99:
.blkb 2
.area idata
.byte 92,0
.area data(ram, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
L94:
.blkb 11
.area idata
.byte 'T,'a,'s,'k,95,'T,'h,'r,'e,'e,0
.area data(ram, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
L65:
.blkb 10
.area idata
.byte 'C,'P,'U,32,'U,'s,'a,'g,'e,0
.area data(ram, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
L64:
.blkb 10
.area idata
.byte 's,'w,'i,'t,'c,'h,47,'s,58,0
.area data(ram, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
L63:
.blkb 15
.area idata
.byte 'u,'C,'O,'S,'i,'i,32,'E,'X,'E,'M,'P,'L,'E,0
.area data(ram, con, rel)
.dbfile C:\DOCUME~1\qihaijun\桌面\17_uCOSⅡ\app.c
.area func_lit
PL_AppTask3: .word `_AppTask3
PL_AppTask2: .word `_AppTask2
PL_AppTask1: .word `_AppTask1
PL_TaskStart: .word `_TaskStart
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -