📄 yc_mainfile.lst
字号:
1 .file "YC_MainFile.c"
2 .arch atmega8
3 __SREG__ = 0x3f
4 __SP_H__ = 0x3e
5 __SP_L__ = 0x3d
6 __tmp_reg__ = 0
7 __zero_reg__ = 1
8 .global __do_copy_data
9 .global __do_clear_bss
11 .text
12 .Ltext0:
79 .global MonitorTcb
80 .section .progmem.data,"a",@progbits
83 MonitorTcb:
84 0000 0000 .word MonitorStk+134
85 0002 0000 .word pm(Monitor)
86 0004 0000 .word MonitorPid
87 0006 05 .byte 5
88 .global KeyPressTcb
91 KeyPressTcb:
92 0007 0000 .word KeyPressStk+134
93 0009 0000 .word pm(KeyPress)
94 000b 0000 .word KeyPressPid
95 000d 04 .byte 4
96 .global bTempVal
97 .global bTempVal
98 .section .bss
101 bTempVal:
102 0000 00 .skip 1,0
103 .global bTempValy
104 .global bTempValy
107 bTempValy:
108 0001 00 .skip 1,0
109 .text
111 .global __vector_9
113 __vector_9:
1:YC_MainFile.c **** /*===========================================================================
2:YC_MainFile.c **** 【项目名】: 遥控渐变选色程序
3:YC_MainFile.c **** 【文件名】: YCPLAY
4:YC_MainFile.c **** 【名 称】: 主文件
5:YC_MainFile.c **** 【版 本】: 1.0
6:YC_MainFile.c **** 【组 织】: 深圳市红绿蓝光电科技有限公司研发中心
7:YC_MainFile.c **** 【作 者】: 周盛志
8:YC_MainFile.c **** 【E-mail】: zhounanxu@163.com
9:YC_MainFile.c **** ------------------------------------------------------------------------
10:YC_MainFile.c **** 【编译工具】: GCC_AVRX + WinAVR20050214
11:YC_MainFile.c **** 【编译芯片】: ATMEGA8L
12:YC_MainFile.c **** 【时钟频率】: 内部8MHZ
13:YC_MainFile.c **** 【创建时间】: 29/8/2006
14:YC_MainFile.c **** 【修改时间】:
15:YC_MainFile.c **** ------------------------------------------------------------------------
16:YC_MainFile.c **** 【特别说明】: 遥控4键控制
17:YC_MainFile.c **** ------------------------------------------------------------------------
18:YC_MainFile.c **** 【使用说明】:
19:YC_MainFile.c **** 1. A键:开关机;B键:渐变;C键:选色;D键:翻选选色存储的某一色。
20:YC_MainFile.c **** 2. 每次开机播放上次关机前的最后状态。
21:YC_MainFile.c **** ===========================================================================*/
22:YC_MainFile.c **** #include <avrx/avrx.h>
23:YC_MainFile.c ****
24:YC_MainFile.c **** #include "Hardware.h"
25:YC_MainFile.c **** #include "YC_MainFile.h"
26:YC_MainFile.c ****
27:YC_MainFile.c **** Mutex key_pressed;
28:YC_MainFile.c **** TimerControlBlock delay;
29:YC_MainFile.c **** BYTE bTempValy = 0;
30:YC_MainFile.c **** BYTE bTempVal = 0;
31:YC_MainFile.c **** //----------------------------------------------------------------
32:YC_MainFile.c **** //TimerControlBlock delay;// Declare the control blocks for timers
33:YC_MainFile.c ****
34:YC_MainFile.c **** AVRX_SIGINT(SIG_OVERFLOW0)
35:YC_MainFile.c **** {
115 .LM1:
116 /* prologue: frame size=0 */
117 /* prologue: naked */
118 /* prologue end (size=0) */
36:YC_MainFile.c **** IntProlog(); //switch to kernel stack/context.
120 .LM2:
121 0000 00D0 rcall IntProlog
37:YC_MainFile.c **** TCNT0 = TCNT0_INIT; //Reset timer overflow count.
123 .LM3:
124 0002 8DEF ldi r24,lo8(-3)
125 0004 82BF out 82-0x20,r24
38:YC_MainFile.c **** AvrXTimerHandler(); //Call Time queue manager
127 .LM4:
128 0006 00D0 rcall AvrXTimerHandler
39:YC_MainFile.c **** Epilog(); //Return to tasks.
130 .LM5:
131 0008 00D0 rcall Epilog
132 /* epilogue: frame size=0 */
133 /* epilogue: naked */
134 /* epilogue end (size=0) */
135 /* function __vector_9 size 5 (5) */
137 .Lscope0:
139 .global __vector_1
141 __vector_1:
40:YC_MainFile.c **** }
41:YC_MainFile.c ****
42:YC_MainFile.c **** AVRX_SIGINT(SIG_INTERRUPT0)
43:YC_MainFile.c **** {
143 .LM6:
144 /* prologue: frame size=0 */
145 /* prologue: naked */
146 /* prologue end (size=0) */
44:YC_MainFile.c **** IntProlog();
148 .LM7:
149 000a 00D0 rcall IntProlog
45:YC_MainFile.c **** AvrXSetSemaphore(&key_pressed);
151 .LM8:
152 000c 80E0 ldi r24,lo8(key_pressed)
153 000e 90E0 ldi r25,hi8(key_pressed)
154 0010 00D0 rcall AvrXSetSemaphore
46:YC_MainFile.c **** Epilog();
156 .LM9:
157 0012 00D0 rcall Epilog
158 /* epilogue: frame size=0 */
159 /* epilogue: naked */
160 /* epilogue end (size=0) */
161 /* function __vector_1 size 5 (5) */
163 .Lscope1:
165 .global KeyPress
167 KeyPress:
47:YC_MainFile.c **** }
48:YC_MainFile.c ****
49:YC_MainFile.c ****
50:YC_MainFile.c **** AVRX_GCC_TASKDEF(KeyPress, 100, 4)
51:YC_MainFile.c **** {
169 .LM10:
170 /* prologue: frame size=0 */
171 /* prologue: naked */
172 /* prologue end (size=0) */
173 .L13:
52:YC_MainFile.c **** while(1)
53:YC_MainFile.c **** {
54:YC_MainFile.c **** while(1)
55:YC_MainFile.c **** {
56:YC_MainFile.c **** AvrXResetSemaphore(&key_pressed);
175 .LM11:
176 0014 80E0 ldi r24,lo8(key_pressed)
177 0016 90E0 ldi r25,hi8(key_pressed)
178 0018 00D0 rcall AvrXResetSemaphore
57:YC_MainFile.c **** AvrXWaitSemaphore(&key_pressed);
180 .LM12:
181 001a 80E0 ldi r24,lo8(key_pressed)
182 001c 90E0 ldi r25,hi8(key_pressed)
183 001e 00D0 rcall AvrXWaitSemaphore
58:YC_MainFile.c **** if (PIND & _BV(PD2)) break;
185 .LM13:
186 0020 8299 sbic 48-0x20,2
187 0022 F8CF rjmp .L13
59:YC_MainFile.c **** else KeyYc(PINC & 0x0f);
189 .LM14:
190 0024 83B3 in r24,51-0x20
191 0026 8F70 andi r24,lo8(15)
192 0028 00D0 rcall KeyYc
193 002a F4CF rjmp .L13
194 /* epilogue: frame size=0 */
195 /* epilogue: naked */
196 /* epilogue end (size=0) */
197 /* function KeyPress size 12 (12) */
199 .Lscope2:
201 .global Monitor
203 Monitor:
60:YC_MainFile.c **** }
61:YC_MainFile.c **** }
62:YC_MainFile.c **** }
63:YC_MainFile.c ****
64:YC_MainFile.c **** /*Task 1: .*/
65:YC_MainFile.c **** AVRX_GCC_TASKDEF(Monitor, 100, 5)
66:YC_MainFile.c **** {
205 .LM15:
206 /* prologue: frame size=0 */
207 /* prologue: naked */
208 /* prologue end (size=0) */
209 .L15:
67:YC_MainFile.c **** while (1)
68:YC_MainFile.c **** {
69:YC_MainFile.c **** LoadWorkState();
211 .LM16:
212 002c 00D0 rcall LoadWorkState
70:YC_MainFile.c **** AvrXDelay(&delay, 1);
214 .LM17:
215 002e 61E0 ldi r22,lo8(1)
216 0030 70E0 ldi r23,hi8(1)
217 0032 80E0 ldi r24,lo8(delay)
218 0034 90E0 ldi r25,hi8(delay)
219 0036 00D0 rcall AvrXDelay
220 0038 F9CF rjmp .L15
221 /* epilogue: frame size=0 */
222 /* epilogue: naked */
223 /* epilogue end (size=0) */
224 /* function Monitor size 7 (7) */
226 .Lscope3:
228 .global main
230 main:
71:YC_MainFile.c **** }
72:YC_MainFile.c **** }
73:YC_MainFile.c ****
74:YC_MainFile.c **** int main(void)
75:YC_MainFile.c **** {
232 .LM18:
233 /* prologue: frame size=0 */
234 003a C0E0 ldi r28,lo8(__stack - 0)
235 003c D0E0 ldi r29,hi8(__stack - 0)
236 003e DEBF out __SP_H__,r29
237 0040 CDBF out __SP_L__,r28
238 /* prologue end (size=4) */
76:YC_MainFile.c **** AvrXSetKernelStack(0);//Set Avrx stack to "0",or,if NULL then to current stack.
240 .LM19:
241 0042 80E0 ldi r24,lo8(0)
242 0044 90E0 ldi r25,hi8(0)
243 0046 00D0 rcall AvrXSetKernelStack
77:YC_MainFile.c ****
78:YC_MainFile.c **** ACSR = 0x80;
245 .LM20:
246 0048 80E8 ldi r24,lo8(-128)
247 004a 88B9 out 40-0x20,r24
79:YC_MainFile.c **** SFIOR = 0x00;
249 .LM21:
250 004c 10BE out 80-0x20,__zero_reg__
80:YC_MainFile.c ****
81:YC_MainFile.c **** TCCR0 = T0MC8_CK256; // Set up Timer0 for CLK/256 rate
252 .LM22:
253 004e 84E0 ldi r24,lo8(4)
254 0050 83BF out 83-0x20,r24
82:YC_MainFile.c **** TCNT0 = TCNT0_INIT;
256 .LM23:
257 0052 8DEF ldi r24,lo8(-3)
258 0054 82BF out 82-0x20,r24
83:YC_MainFile.c **** TIMSK |= _BV(TOIE0); // Enable Timer0 overflow interrupt
260 .LM24:
261 0056 89B7 in r24,89-0x20
262 0058 8160 ori r24,lo8(1)
263 005a 89BF out 89-0x20,r24
84:YC_MainFile.c ****
85:YC_MainFile.c **** InitWorkState();
265 .LM25:
266 005c 00D0 rcall InitWorkState
86:YC_MainFile.c **** MCUCR |= _BV(ISC01) ;
268 .LM26:
269 005e 85B7 in r24,85-0x20
270 0060 8260 ori r24,lo8(2)
271 0062 85BF out 85-0x20,r24
87:YC_MainFile.c **** GICR |= _BV(INT0);
273 .LM27:
274 0064 8BB7 in r24,91-0x20
275 0066 8064 ori r24,lo8(64)
276 0068 8BBF out 91-0x20,r24
88:YC_MainFile.c ****
89:YC_MainFile.c **** AvrXRunTask(TCB(Monitor));
278 .LM28:
279 006a 80E0 ldi r24,lo8(MonitorTcb)
280 006c 90E0 ldi r25,hi8(MonitorTcb)
281 006e 00D0 rcall AvrXRunTask
90:YC_MainFile.c **** AvrXRunTask(TCB(KeyPress));
283 .LM29:
284 0070 80E0 ldi r24,lo8(KeyPressTcb)
285 0072 90E0 ldi r25,hi8(KeyPressTcb)
286 0074 00D0 rcall AvrXRunTask
91:YC_MainFile.c ****
92:YC_MainFile.c **** Epilog(); // Switch from AvrX Stack to first task
288 .LM30:
289 0076 00D0 rcall Epilog
93:YC_MainFile.c ****
94:YC_MainFile.c **** return 1;
95:YC_MainFile.c **** }
291 .LM31:
292 0078 81E0 ldi r24,lo8(1)
293 007a 90E0 ldi r25,hi8(1)
294 /* epilogue: frame size=0 */
295 007c 00C0 rjmp exit
296 /* epilogue end (size=1) */
297 /* function main size 34 (29) */
299 .Lscope4:
300 .comm key_pressed,2,1
301 .comm delay,6,1
302 .comm KeyPressStk,135,1
303 .comm KeyPressPid,6,1
304 .comm MonitorStk,135,1
305 .comm MonitorPid,6,1
316 .text
318 Letext:
319 /* File "YC_MainFile.c": code 63 = 0x003f ( 58), prologues 4, epilogues 1 */
DEFINED SYMBOLS
*ABS*:00000000 YC_MainFile.c
*ABS*:0000003f __SREG__
*ABS*:0000003e __SP_H__
*ABS*:0000003d __SP_L__
*ABS*:00000000 __tmp_reg__
*ABS*:00000001 __zero_reg__
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:83 .progmem.data:00000000 MonitorTcb
*COM*:00000087 MonitorStk
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:203 .text:0000002c Monitor
*COM*:00000006 MonitorPid
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:91 .progmem.data:00000007 KeyPressTcb
*COM*:00000087 KeyPressStk
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:167 .text:00000014 KeyPress
*COM*:00000006 KeyPressPid
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:101 .bss:00000000 bTempVal
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:107 .bss:00000001 bTempValy
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:113 .text:00000000 __vector_9
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:141 .text:0000000a __vector_1
*COM*:00000002 key_pressed
*COM*:00000006 delay
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:230 .text:0000003a main
C:\DOCUME~1\KAIFA\LOCALS~1\Temp/ccGUaaaa.s:318 .text:0000007e Letext
UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
IntProlog
AvrXTimerHandler
Epilog
AvrXSetSemaphore
AvrXResetSemaphore
AvrXWaitSemaphore
KeyYc
LoadWorkState
AvrXDelay
__stack
AvrXSetKernelStack
InitWorkState
AvrXRunTask
exit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -