📄 read-ds18b20-lcd1602-c51-avr.lst
字号:
1 .file "READ-DS18B20-LCD1602-C51-AVR.c"
2 .arch atmega8515
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
17 .Ltext0:
18 .global cdis4
19 .data
22 cdis4:
23 0000 2020 504C .string " PLEASE CHECK "
23 4541 5345
23 2043 4845
23 434B 2020
23 00
24 .global cdis3
27 cdis3:
28 0011 2044 5331 .string " DS18B20 ERR0R "
28 3842 3230
28 2020 4552
28 5230 5220
28 00
29 .global cdis2
32 cdis2:
33 0022 2020 2020 .string " "
33 2020 2020
33 2020 2020
33 2020 2020
33 00
34 .global cdis1
37 cdis1:
38 0033 2020 2044 .string " DS18B20 OK "
38 5331 3842
38 3230 204F
38 4B20 2020
38 00
39 .global RomCode
40 .global RomCode
41 .section .bss
44 RomCode:
45 0000 0000 0000 .skip 8,0
45 0000 0000
46 .global display
47 .global display
50 display:
51 0008 0000 0000 .skip 5,0
51 00
52 .text
53 .global delay_nms
55 delay_nms:
56 .LFB6:
57 .LM1:
58 /* prologue: frame size=0 */
59 /* prologue end (size=0) */
60 .LM2:
61 0000 0097 sbiw r24,0
62 0002 41F0 breq .L8
63 0004 9C01 movw r18,r24
64 .L6:
65 .LBB2:
66 .LM3:
67 0006 80ED ldi r24,lo8(2000)
68 0008 97E0 ldi r25,hi8(2000)
69 .LBB3:
70 .LM4:
71 /* #APP */
72 000a 0197 1: sbiw r24,1
73 000c F1F7 brne 1b
74 /* #NOAPP */
75 .LBE3:
76 .LBE2:
77 .LM5:
78 000e 2150 subi r18,lo8(-(-1))
79 0010 3040 sbci r19,hi8(-(-1))
80 0012 C9F7 brne .L6
81 .L8:
82 0014 0895 ret
83 /* epilogue: frame size=0 */
84 /* epilogue: noreturn */
85 /* epilogue end (size=0) */
86 /* function delay_nms size 15 (15) */
87 .LFE6:
89 .global Delay
91 Delay:
92 .LFB7:
93 .LM6:
94 /* prologue: frame size=0 */
95 /* prologue end (size=0) */
96 .LBB4:
97 .LM7:
98 0016 880F lsl r24
99 0018 991F rol r25
100 .LBB5:
101 .LM8:
102 /* #APP */
103 001a 0197 1: sbiw r24,1
104 001c F1F7 brne 1b
105 /* #NOAPP */
106 .LBE5:
107 .LBE4:
108 /* epilogue: frame size=0 */
109 001e 0895 ret
110 /* epilogue end (size=1) */
111 /* function Delay size 7 (6) */
112 .LFE7:
114 .global beep
116 beep:
117 .LFB8:
118 .LM9:
119 /* prologue: frame size=0 */
120 0020 CF93 push r28
121 /* prologue end (size=1) */
122 0022 C3E6 ldi r28,lo8(99)
123 .L15:
124 .LM10:
125 0024 9798 cbi 50-0x20,7
126 .LM11:
127 0026 84EF ldi r24,lo8(500)
128 0028 91E0 ldi r25,hi8(500)
129 002a F5DF rcall Delay
130 .LM12:
131 002c 80E8 ldi r24,lo8(-128)
132 002e 82BB out 50-0x20,r24
133 .LM13:
134 0030 84EF ldi r24,lo8(500)
135 0032 91E0 ldi r25,hi8(500)
136 0034 F0DF rcall Delay
137 .LM14:
138 0036 C150 subi r28,lo8(-(-1))
139 0038 C7FF sbrs r28,7
140 003a F4CF rjmp .L15
141 .LM15:
142 003c 979A sbi 50-0x20,7
143 .LM16:
144 003e 88EC ldi r24,lo8(200)
145 0040 90E0 ldi r25,hi8(200)
146 0042 DEDF rcall delay_nms
147 /* epilogue: frame size=0 */
148 0044 CF91 pop r28
149 0046 0895 ret
150 /* epilogue end (size=2) */
151 /* function beep size 20 (17) */
152 .LFE8:
154 .global init_io
156 init_io:
157 .LFB9:
158 .LM17:
159 /* prologue: frame size=0 */
160 /* prologue end (size=0) */
161 .LM18:
162 0048 8FEF ldi r24,lo8(-1)
163 004a 8ABB out 58-0x20,r24
164 .LM19:
165 004c 8BBB out 59-0x20,r24
166 .LM20:
167 004e 87BB out 55-0x20,r24
168 .LM21:
169 0050 88BB out 56-0x20,r24
170 .LM22:
171 0052 84BB out 52-0x20,r24
172 .LM23:
173 0054 85BB out 53-0x20,r24
174 .LM24:
175 0056 81BB out 49-0x20,r24
176 .LM25:
177 0058 82BB out 50-0x20,r24
178 /* epilogue: frame size=0 */
179 005a 0895 ret
180 /* epilogue end (size=1) */
181 /* function init_io size 10 (9) */
182 .LFE9:
184 .global Init_DS18B20
186 Init_DS18B20:
187 .LFB10:
188 .LM26:
189 /* prologue: frame size=0 */
190 /* prologue end (size=0) */
191 .LM27:
192 005c 939A sbi 50-0x20,3
193 .LM28:
194 005e 86E4 ldi r24,lo8(70)
195 0060 90E0 ldi r25,hi8(70)
196 0062 D9DF rcall Delay
197 .LM29:
198 0064 9398 cbi 50-0x20,3
199 .LM30:
200 0066 8CE0 ldi r24,lo8(780)
201 0068 93E0 ldi r25,hi8(780)
202 006a D5DF rcall Delay
203 .LM31:
204 006c 939A sbi 50-0x20,3
205 .LM32:
206 006e 8B98 cbi 49-0x20,3
207 .LM33:
208 0070 86E4 ldi r24,lo8(70)
209 0072 90E0 ldi r25,hi8(70)
210 0074 D0DF rcall Delay
211 .LM34:
212 0076 839B sbis 48-0x20,3
213 0078 04C0 rjmp .L20
214 .LM35:
215 007a 81E0 ldi r24,lo8(1)
216 007c 8093 0000 sts presence,r24
217 0080 02C0 rjmp .L21
218 .L20:
219 .LM36:
220 0082 1092 0000 sts presence,__zero_reg__
221 .L21:
222 .LM37:
223 0086 86E6 ldi r24,lo8(870)
224 0088 93E0 ldi r25,hi8(870)
225 008a C5DF rcall Delay
226 .LM38:
227 008c 8B9A sbi 49-0x20,3
228 .LM39:
229 008e 939A sbi 50-0x20,3
230 .LM40:
231 0090 8091 0000 lds r24,presence
232 .LM41:
233 0094 9927 clr r25
234 /* epilogue: frame size=0 */
235 0096 0895 ret
236 /* epilogue end (size=1) */
237 /* function Init_DS18B20 size 30 (29) */
238 .LFE10:
240 .global ReadOneChar
242 ReadOneChar:
243 .LFB11:
244 .LM42:
245 /* prologue: frame size=0 */
246 0098 1F93 push r17
247 009a CF93 push r28
248 /* prologue end (size=2) */
249 .LM43:
250 009c C0E0 ldi r28,lo8(0)
251 .LM44:
252 009e 18E0 ldi r17,lo8(8)
253 .L27:
254 .LM45:
255 00a0 9398 cbi 50-0x20,3
256 .LM46:
257 00a2 C695 lsr r28
258 .LM47:
259 00a4 939A sbi 50-0x20,3
260 .LM48:
261 00a6 8B98 cbi 49-0x20,3
262 .LM49:
263 00a8 8399 sbic 48-0x20,3
264 .LM50:
265 00aa C068 ori r28,lo8(-128)
266 .L26:
267 .LM51:
268 00ac 86E4 ldi r24,lo8(70)
269 00ae 90E0 ldi r25,hi8(70)
270 00b0 B2DF rcall Delay
271 .LM52:
272 00b2 8B9A sbi 49-0x20,3
273 .LM53:
274 00b4 939A sbi 50-0x20,3
275 .LM54:
276 00b6 1150 subi r17,lo8(-(-1))
277 00b8 99F7 brne .L27
278 .LM55:
279 00ba 8C2F mov r24,r28
280 00bc 9927 clr r25
281 /* epilogue: frame size=0 */
282 00be CF91 pop r28
283 00c0 1F91 pop r17
284 00c2 0895 ret
285 /* epilogue end (size=3) */
286 /* function ReadOneChar size 24 (19) */
287 .LFE11:
289 .global WriteOneChar
291 WriteOneChar:
292 .LFB12:
293 .LM56:
294 /* prologue: frame size=0 */
295 00c4 1F93 push r17
296 00c6 CF93 push r28
297 /* prologue end (size=2) */
298 00c8 C82F mov r28,r24
299 .LM57:
300 00ca 18E0 ldi r17,lo8(8)
301 .L36:
302 .LM58:
303 00cc 9398 cbi 50-0x20,3
304 .LM59:
305 00ce C0FF sbrs r28,0
306 00d0 02C0 rjmp .L34
307 .LM60:
308 00d2 939A sbi 50-0x20,3
309 00d4 01C0 rjmp .L35
310 .L34:
311 .LM61:
312 00d6 9398 cbi 50-0x20,3
313 .L35:
314 .LM62:
315 00d8 86E4 ldi r24,lo8(70)
316 00da 90E0 ldi r25,hi8(70)
317 00dc 9CDF rcall Delay
318 .LM63:
319 00de 939A sbi 50-0x20,3
320 .LM64:
321 00e0 C695 lsr r28
322 .LM65:
323 00e2 1150 subi r17,lo8(-(-1))
324 00e4 99F7 brne .L36
325 /* epilogue: frame size=0 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -