?? main.lst
字號:
1 .file "main.c"
2 .arch atmega16
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:
78 .global xiao_chs
79 .data
82 xiao_chs:
83 0000 5669 5F58 .ascii "Vi_Xiao "
83 6961 6F20
84 0008 566F 5F58 .ascii "Vo_Xiao "
84 6961 6F20
85 0010 504F 5F58 .ascii "PO_Xiao "
85 6961 6F20
86 .global ch_s
89 ch_s:
90 0018 01 .byte 1
91 .text
94 .global ascii_s
96 ascii_s:
98 .Ltext1:
1:lcdinf.c **** #include <avr/io.h>
2:lcdinf.c **** #define uch unsigned char
3:lcdinf.c **** #define uint unsigned int
4:lcdinf.c **** #define s_b(sfr,bit) (sfr|=(1<<bit))
5:lcdinf.c **** #define c_b(sfr,bit) (sfr&=~(1<<bit))
6:lcdinf.c **** #define test_b(sfr,bit) (sfr&(1<<bit))
7:lcdinf.c **** #define NOP() __asm__ __volatile__ ("nop" ::)
8:lcdinf.c ****
9:lcdinf.c **** #define DATA_i PINC //數據輸入
10:lcdinf.c **** #define DATA_o PORTC//數據輸出
11:lcdinf.c **** #define DATA DDRC
12:lcdinf.c **** #define cont PORTB//控制端口\
13:lcdinf.c ****
14:lcdinf.c **** #define RS 0
15:lcdinf.c **** #define RW 2
16:lcdinf.c **** #define ES 1
17:lcdinf.c ****
18:lcdinf.c **** char xy_ch[2][8];//顯示緩存
19:lcdinf.c ****
20:lcdinf.c **** uch ascii_s(uch x){
100 .LM1:
101 /* prologue: frame size=0 */
102 /* prologue end (size=0) */
21:lcdinf.c ****
22:lcdinf.c **** if(x<10)return x+0x30;
104 .LM2:
105 0000 8A30 cpi r24,lo8(10)
106 0002 18F4 brsh .L2
108 .LM3:
109 0004 805D subi r24,lo8(-(48))
110 0006 9927 clr r25
111 0008 0895 ret
112 .L2:
23:lcdinf.c **** else return (x-9)+0x40;
114 .LM4:
115 000a 895C subi r24,lo8(-(55))
116 000c 9927 clr r25
24:lcdinf.c **** }
118 .LM5:
119 000e 0895 ret
120 /* epilogue: frame size=0 */
121 /* epilogue: noreturn */
122 /* epilogue end (size=0) */
123 /* function ascii_s size 8 (8) */
125 .Lscope0:
127 .global dlay
129 dlay:
25:lcdinf.c **** void dlay(){ //短延時
131 .LM6:
132 /* prologue: frame size=0 */
133 /* prologue end (size=0) */
26:lcdinf.c **** NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP();NOP()
135 .LM7:
136 /* #APP */
137 0010 0000 nop
138 0012 0000 nop
139 0014 0000 nop
140 0016 0000 nop
141 0018 0000 nop
142 001a 0000 nop
143 001c 0000 nop
144 001e 0000 nop
145 0020 0000 nop
146 0022 0000 nop
147 0024 0000 nop
148 0026 0000 nop
149 0028 0000 nop
150 002a 0000 nop
151 002c 0000 nop
152 002e 0000 nop
153 0030 0000 nop
154 0032 0000 nop
155 0034 0000 nop
156 0036 0000 nop
157 0038 0000 nop
158 003a 0000 nop
159 003c 0000 nop
160 003e 0000 nop
161 0040 0000 nop
162 0042 0000 nop
163 0044 0000 nop
164 0046 0000 nop
165 0048 0000 nop
166 004a 0000 nop
167 004c 0000 nop
168 /* #NOAPP */
169 /* epilogue: frame size=0 */
170 004e 0895 ret
171 /* epilogue end (size=1) */
172 /* function dlay size 63 (62) */
174 .Lscope1:
177 .global dlay2
179 dlay2:
27:lcdinf.c **** }
28:lcdinf.c **** void dlay2(uch x){ //短延時
181 .LM8:
182 /* prologue: frame size=0 */
183 /* prologue end (size=0) */
184 .L12:
29:lcdinf.c **** for(;x!=0;x--){NOP();NOP();NOP();NOP();NOP();}
186 .LM9:
187 0050 8823 tst r24
188 0052 39F0 breq .L11
190 .LM10:
191 /* #APP */
192 0054 0000 nop
193 0056 0000 nop
194 0058 0000 nop
195 005a 0000 nop
196 005c 0000 nop
197 /* #NOAPP */
198 005e 8150 subi r24,lo8(-(-1))
199 0060 F7CF rjmp .L12
200 .L11:
201 0062 0895 ret
202 /* epilogue: frame size=0 */
203 /* epilogue: noreturn */
204 /* epilogue end (size=0) */
205 /* function dlay2 size 15 (15) */
207 .Lscope2:
210 .global w_by
212 w_by:
30:lcdinf.c **** }
31:lcdinf.c **** void w_by(uch x){//寫數據
214 .LM11:
215 /* prologue: frame size=0 */
216 /* prologue end (size=0) */
32:lcdinf.c **** s_b(cont,RS);
218 .LM12:
219 0064 C09A sbi 56-0x20,0
33:lcdinf.c **** c_b(cont,RW);
221 .LM13:
222 0066 C298 cbi 56-0x20,2
34:lcdinf.c **** NOP();
224 .LM14:
225 /* #APP */
226 0068 0000 nop
35:lcdinf.c **** NOP();
228 .LM15:
229 006a 0000 nop
36:lcdinf.c **** NOP();
231 .LM16:
232 006c 0000 nop
37:lcdinf.c **** NOP();
234 .LM17:
235 006e 0000 nop
38:lcdinf.c **** s_b(cont,ES);NOP();NOP();
237 .LM18:
238 /* #NOAPP */
239 0070 C19A sbi 56-0x20,1
240 /* #APP */
241 0072 0000 nop
242 0074 0000 nop
39:lcdinf.c **** DATA_o=x;NOP();NOP();NOP();
244 .LM19:
245 /* #NOAPP */
246 0076 85BB out 53-0x20,r24
247 /* #APP */
248 0078 0000 nop
249 007a 0000 nop
250 007c 0000 nop
40:lcdinf.c **** c_b(cont,ES);
252 .LM20:
253 /* #NOAPP */
254 007e C198 cbi 56-0x20,1
41:lcdinf.c **** dlay();
256 .LM21:
257 0080 0E94 0000 call dlay
258 /* epilogue: frame size=0 */
259 0084 0895 ret
260 /* epilogue end (size=1) */
261 /* function w_by size 26 (25) */
263 .Lscope3:
266 .global w_com
268 w_com:
42:lcdinf.c **** }
43:lcdinf.c **** void w_com(uch x){//寫指令
270 .LM22:
271 /* prologue: frame size=0 */
272 /* prologue end (size=0) */
44:lcdinf.c **** c_b(cont,RS);
274 .LM23:
275 0086 C098 cbi 56-0x20,0
45:lcdinf.c **** c_b(cont,RW);
277 .LM24:
278 0088 C298 cbi 56-0x20,2
46:lcdinf.c **** NOP();
280 .LM25:
281 /* #APP */
282 008a 0000 nop
47:lcdinf.c **** NOP();
284 .LM26:
285 008c 0000 nop
48:lcdinf.c **** NOP();
287 .LM27:
288 008e 0000 nop
49:lcdinf.c **** NOP();
290 .LM28:
291 0090 0000 nop
50:lcdinf.c **** s_b(cont,ES);NOP();NOP();
293 .LM29:
294 /* #NOAPP */
295 0092 C19A sbi 56-0x20,1
296 /* #APP */
297 0094 0000 nop
298 0096 0000 nop
51:lcdinf.c **** DATA_o=x;NOP();NOP();NOP();
300 .LM30:
301 /* #NOAPP */
302 0098 85BB out 53-0x20,r24
303 /* #APP */
304 009a 0000 nop
305 009c 0000 nop
306 009e 0000 nop
52:lcdinf.c **** c_b(cont,ES);
308 .LM31:
309 /* #NOAPP */
310 00a0 C198 cbi 56-0x20,1
53:lcdinf.c **** dlay();
312 .LM32:
313 00a2 0E94 0000 call dlay
314 /* epilogue: frame size=0 */
315 00a6 0895 ret
316 /* epilogue end (size=1) */
317 /* function w_com size 26 (25) */
319 .Lscope4:
322 .global xini
324 xini:
54:lcdinf.c **** }
55:lcdinf.c **** void xini(uch x){
326 .LM33:
327 /* prologue: frame size=0 */
328 /* prologue end (size=0) */
56:lcdinf.c **** if(x>7)x+=0x38;
330 .LM34:
331 00a8 8830 cpi r24,lo8(8)
332 00aa 08F0 brlo .L16
334 .LM35:
335 00ac 885C subi r24,lo8(-(56))
336 .L16:
57:lcdinf.c **** w_com(x|0x80);}
338 .LM36:
339 00ae 8068 ori r24,lo8(-128)
340 00b0 0E94 0000 call w_com
341 /* epilogue: frame size=0 */
342 00b4 0895 ret
343 /* epilogue end (size=1) */
344 /* function xini size 7 (6) */
346 .Lscope5:
348 .global lcdini
350 lcdini:
58:lcdinf.c **** void lcdini(void){
352 .LM37:
353 /* prologue: frame size=0 */
354 00b6 CF93 push r28
355 /* prologue end (size=1) */
59:lcdinf.c **** uch x;
60:lcdinf.c ****
61:lcdinf.c **** for(x=250;x!=0;x--)dlay2(250);
357 .LM38:
358 00b8 CAEF ldi r28,lo8(-6)
359 .L21:
361 .LM39:
362 00ba 8AEF ldi r24,lo8(-6)
363 00bc 0E94 0000 call dlay2
364 00c0 C150 subi r28,lo8(-(-1))
365 00c2 D9F7 brne .L21
62:lcdinf.c ****
63:lcdinf.c ****
64:lcdinf.c **** w_com(0x1);//清顯示
367 .LM40:
368 00c4 81E0 ldi r24,lo8(1)
369 00c6 0E94 0000 call w_com
65:lcdinf.c ****
66:lcdinf.c **** for(x=10;x!=0;x--)dlay2(250);
371 .LM41:
372 00ca CAE0 ldi r28,lo8(10)
373 .L25:
374 00cc 8AEF ldi r24,lo8(-6)
375 00ce 0E94 0000 call dlay2
376 00d2 C150 subi r28,lo8(-(-1))
377 00d4 D9F7 brne .L25
67:lcdinf.c ****
68:lcdinf.c **** w_com(0x38);//顯示設置
379 .LM42:
380 00d6 88E3 ldi r24,lo8(56)
381 00d8 0E94 0000 call w_com
69:lcdinf.c **** dlay2(80);
383 .LM43:
384 00dc 80E5 ldi r24,lo8(80)
385 00de 0E94 0000 call dlay2
70:lcdinf.c ****
71:lcdinf.c **** w_com(0x6);//顯示設置
387 .LM44:
388 00e2 86E0 ldi r24,lo8(6)
389 00e4 0E94 0000 call w_com
72:lcdinf.c **** dlay2(80);
391 .LM45:
392 00e8 80E5 ldi r24,lo8(80)
393 00ea 0E94 0000 call dlay2
73:lcdinf.c ****
74:lcdinf.c **** w_com(0xc);//清顯示
395 .LM46:
396 00ee 8CE0 ldi r24,lo8(12)
397 00f0 0E94 0000 call w_com
75:lcdinf.c **** dlay2(80);
399 .LM47:
400 00f4 80E5 ldi r24,lo8(80)
401 00f6 0E94 0000 call dlay2
76:lcdinf.c ****
77:lcdinf.c ****
78:lcdinf.c **** for(x=200;x!=0;x--)dlay2(250);
403 .LM48:
404 00fa C8EC ldi r28,lo8(-56)
405 .L29:
406 00fc 8AEF ldi r24,lo8(-6)
407 00fe 0E94 0000 call dlay2
408 0102 C150 subi r28,lo8(-(-1))
409 0104 D9F7 brne .L29
79:lcdinf.c **** //w_com(0xc0);//清顯示
80:lcdinf.c ****
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -