📄 os_cpu_a.lst
字号:
131 ; Purpose : PERFORM A CONTEXT SWITCH (From an ISR).
132 ;
133 ; Inputs : None.
134 ;
135 ; Destroys : sp, AR1.
136 ;
137 ; Speed/Size:
138 ;
139 ; Note(s) : The ISR has already saved the current task's context!
140 ; Figuring out how many stack elements to clean-up was
141 ; tough. Hidden compiler automatic allocation.
142 ;
143 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
144 0020 .even
145 0020 _OSIntCtxSw:
146 .global _OSIntCtxSw
147
148 0020 be32 pop ; pop-off the return address
149 ; (from call to this routine)
150 ; never to be used...
151
152 0021 7c03 sbrk #3 ; clean-up the sw stack's pushed
153 ; frame pointer and return address from
154 ; the call to "OSIntExit."
155
156 0022 7980 b _OSCtxSw_0 ; the lazy way...
0023 000c'
157
TMS320C24xx COFF Assembler Version 7.02 Tue Jul 31 13:34:28 2007
Copyright (c) 1987-2002 Texas Instruments Incorporated
os_cpu_a.asm PAGE 6
159 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
160 ;
161 ; ISR : _OSTickISR (void OSTickISR(void))
162 ;
163 ; Purpose : HANDLE TICK ISR.
164 ;
165 ; Inputs : None.
166 ;
167 ; Destroys : sp, AR1.
168 ;
169 ; Speed/Size:
170 ;
171 ; Note(s) :
172 ;
173 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
174
175 0024 _OSTickISR:
176 .global _OSTickISR
177 0024 7a80 call I$$SAVE ; save the interrupted task's context.
0025 0000!
178
179 0026 be40 clrc INTM ; enable interrupt nesting.
180
181 0027 7a80 call _OSIntEnter ; inform uC/OS we're in an ISR.
0028 0000!
182
183 0029 7a80 call _OSTimeTick ; increment the uC/OS timer tick.
002a 0000!
184
185
186 002b bce8 LDP #0E8H
187 002c 102f LACC 2FH
188 002d bfc0 OR #0FFFFH
002e ffff
189 002f 902f SACL 2FH
190 0030 7a80 call _OSIntExit ; inform uC/OS we're leaving the
0031 0000!
191 ; the ISR; we may exit through
192 ; that path if there is a context switch.
193
194 0032 7980 b I$$REST ; still lazy after all these years.
0033 0000!
195
196 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
197 ;
198 ; OUT : OUTPORT
199 ;
200 ; Purpose : OUTPORT.
201 ;
202 ; Inputs : NUM.
203 ;
204 ; Destroys : sp, AR1.
205 ;
206 ; Speed/Size:
TMS320C24xx COFF Assembler Version 7.02 Tue Jul 31 13:34:28 2007
Copyright (c) 1987-2002 Texas Instruments Incorporated
os_cpu_a.asm PAGE 7
207 ;
208 ; Note(s) :
209 ;
210 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
211
212 0034 _OUTport:
213 .global _OUTport
214 0034 7a80 call I$$SAVE ; save the interrupted task's context.
0035 0000!
215 0000 .bss a,1,1
216 0036 bd03 LDP #103H
217 0037 ae00- splk #3h,a
0038 0003
218 0039 0c00- out a,9h
003a 0009
219 003b bce1 ldp #DP_PF2
220 003c ae12 splk #0H,MCRB
003d 0000
221 003e ae1c splk #22H,PCDATDIR
003f 0022
222 0040 DELAY_S 80H
1 0040 bb80 RPT #80H
1 0041 8b00 NOP
223 0042 DELAY_S 80H
1 0042 bb80 RPT #80H
1 0043 8b00 NOP
224 0044 DELAY_S 80H
1 0044 bb80 RPT #80H
1 0045 8b00 NOP
225 0046 DELAY_S 80H
1 0046 bb80 RPT #80H
1 0047 8b00 NOP
226 0048 DELAY_S 80H
1 0048 bb80 RPT #80H
1 0049 8b00 NOP
227 004a DELAY_S 80H
1 004a bb80 RPT #80H
1 004b 8b00 NOP
228 004c DELAY_S 80H
1 004c bb80 RPT #80H
1 004d 8b00 NOP
229 004e DELAY_S 80H
1 004e bb80 RPT #80H
1 004f 8b00 NOP
230 0050 DELAY_S 80H
1 0050 bb80 RPT #80H
1 0051 8b00 NOP
231 0052 DELAY_S 80H
1 0052 bb80 RPT #80H
1 0053 8b00 NOP
232 0054 ae12 splk #0H,MCRB
0055 0000
233 0056 ae1c splk #20H,PCDATDIR
0057 0020
TMS320C24xx COFF Assembler Version 7.02 Tue Jul 31 13:34:28 2007
Copyright (c) 1987-2002 Texas Instruments Incorporated
os_cpu_a.asm PAGE 8
234
235 0058 7980 b I$$REST ; still lazy after all these years.
0059 0000!
236
237
238 .end
No Errors, No Warnings
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -