3016 lines
117 KiB
Plaintext
3016 lines
117 KiB
Plaintext
|
|
final_project.elf: file format elf32-avr
|
|
|
|
Sections:
|
|
Idx Name Size VMA LMA File off Algn
|
|
0 .data 000000d8 00800100 0000151c 000015b0 2**0
|
|
CONTENTS, ALLOC, LOAD, DATA
|
|
1 .text 0000151c 00000000 00000000 00000094 2**1
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
2 .bss 00000002 008001d8 008001d8 00001688 2**0
|
|
ALLOC
|
|
3 .comment 00000030 00000000 00000000 00001688 2**0
|
|
CONTENTS, READONLY
|
|
4 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 000016b8 2**2
|
|
CONTENTS, READONLY
|
|
5 .debug_aranges 000000e8 00000000 00000000 000016f8 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
6 .debug_info 00001249 00000000 00000000 000017e0 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
7 .debug_abbrev 00000c72 00000000 00000000 00002a29 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
8 .debug_line 00000b1b 00000000 00000000 0000369b 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
9 .debug_frame 00000328 00000000 00000000 000041b8 2**2
|
|
CONTENTS, READONLY, DEBUGGING
|
|
10 .debug_str 000006ed 00000000 00000000 000044e0 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
11 .debug_loc 00000611 00000000 00000000 00004bcd 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
12 .debug_ranges 000000b8 00000000 00000000 000051de 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
Disassembly of section .text:
|
|
|
|
00000000 <__vectors>:
|
|
0: 0c 94 66 00 jmp 0xcc ; 0xcc <__ctors_end>
|
|
4: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
8: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
10: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
14: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
18: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
1c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
20: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
24: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
28: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
2c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
30: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
34: 0c 94 f5 04 jmp 0x9ea ; 0x9ea <__vector_13>
|
|
38: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
3c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
40: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
44: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
48: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
4c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
50: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
54: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
58: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
5c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
60: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
64: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
68: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
6c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
70: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
74: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
78: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
7c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
80: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
84: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
88: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
8c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
90: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
94: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
98: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
9c: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
a0: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
a4: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
a8: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
ac: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
b0: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
b4: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
b8: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
bc: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
c0: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
c4: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
c8: 0c 94 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
|
|
|
|
000000cc <__ctors_end>:
|
|
cc: 11 24 eor r1, r1
|
|
ce: 1f be out 0x3f, r1 ; 63
|
|
d0: cf ef ldi r28, 0xFF ; 255
|
|
d2: d8 e0 ldi r29, 0x08 ; 8
|
|
d4: de bf out 0x3e, r29 ; 62
|
|
d6: cd bf out 0x3d, r28 ; 61
|
|
|
|
000000d8 <__do_copy_data>:
|
|
d8: 11 e0 ldi r17, 0x01 ; 1
|
|
da: a0 e0 ldi r26, 0x00 ; 0
|
|
dc: b1 e0 ldi r27, 0x01 ; 1
|
|
de: ec e1 ldi r30, 0x1C ; 28
|
|
e0: f5 e1 ldi r31, 0x15 ; 21
|
|
e2: 02 c0 rjmp .+4 ; 0xe8 <__do_copy_data+0x10>
|
|
e4: 05 90 lpm r0, Z+
|
|
e6: 0d 92 st X+, r0
|
|
e8: a8 3d cpi r26, 0xD8 ; 216
|
|
ea: b1 07 cpc r27, r17
|
|
ec: d9 f7 brne .-10 ; 0xe4 <__do_copy_data+0xc>
|
|
|
|
000000ee <__do_clear_bss>:
|
|
ee: 21 e0 ldi r18, 0x01 ; 1
|
|
f0: a8 ed ldi r26, 0xD8 ; 216
|
|
f2: b1 e0 ldi r27, 0x01 ; 1
|
|
f4: 01 c0 rjmp .+2 ; 0xf8 <.do_clear_bss_start>
|
|
|
|
000000f6 <.do_clear_bss_loop>:
|
|
f6: 1d 92 st X+, r1
|
|
|
|
000000f8 <.do_clear_bss_start>:
|
|
f8: aa 3d cpi r26, 0xDA ; 218
|
|
fa: b2 07 cpc r27, r18
|
|
fc: e1 f7 brne .-8 ; 0xf6 <.do_clear_bss_loop>
|
|
fe: 0e 94 a1 02 call 0x542 ; 0x542 <main>
|
|
102: 0c 94 8c 0a jmp 0x1518 ; 0x1518 <_exit>
|
|
|
|
00000106 <__bad_interrupt>:
|
|
106: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
|
|
|
|
0000010a <timer_init_ctc>:
|
|
* Created: 4/3/2024 10:29:19 AM
|
|
* Author: bsw9xd
|
|
*/
|
|
#include "clock.h"
|
|
|
|
void timer_init_ctc() {
|
|
10a: cf 93 push r28
|
|
10c: df 93 push r29
|
|
10e: cd b7 in r28, 0x3d ; 61
|
|
110: de b7 in r29, 0x3e ; 62
|
|
TCCR1A = 0x00; //WGM10 = 0, WGM11 = 0 (CTC mode when combined with WGM12 in TCCR1B)
|
|
112: 80 e8 ldi r24, 0x80 ; 128
|
|
114: 90 e0 ldi r25, 0x00 ; 0
|
|
116: fc 01 movw r30, r24
|
|
118: 10 82 st Z, r1
|
|
TCCR1B = (1 << WGM12);
|
|
11a: 81 e8 ldi r24, 0x81 ; 129
|
|
11c: 90 e0 ldi r25, 0x00 ; 0
|
|
11e: 28 e0 ldi r18, 0x08 ; 8
|
|
120: fc 01 movw r30, r24
|
|
122: 20 83 st Z, r18
|
|
TCNT1 = 0; // initialize timer at 0
|
|
124: 84 e8 ldi r24, 0x84 ; 132
|
|
126: 90 e0 ldi r25, 0x00 ; 0
|
|
128: fc 01 movw r30, r24
|
|
12a: 11 82 std Z+1, r1 ; 0x01
|
|
12c: 10 82 st Z, r1
|
|
//TIMSK1 |= (1<<OCIE1A); // enable int at timer1
|
|
|
|
}
|
|
12e: 00 00 nop
|
|
130: df 91 pop r29
|
|
132: cf 91 pop r28
|
|
134: 08 95 ret
|
|
|
|
00000136 <start_timer>:
|
|
|
|
void start_timer() {
|
|
136: cf 93 push r28
|
|
138: df 93 push r29
|
|
13a: cd b7 in r28, 0x3d ; 61
|
|
13c: de b7 in r29, 0x3e ; 62
|
|
TCNT1 = 0;
|
|
13e: 84 e8 ldi r24, 0x84 ; 132
|
|
140: 90 e0 ldi r25, 0x00 ; 0
|
|
142: fc 01 movw r30, r24
|
|
144: 11 82 std Z+1, r1 ; 0x01
|
|
146: 10 82 st Z, r1
|
|
OCR1A = 0x3d09; // 1 second
|
|
148: 88 e8 ldi r24, 0x88 ; 136
|
|
14a: 90 e0 ldi r25, 0x00 ; 0
|
|
14c: 29 e0 ldi r18, 0x09 ; 9
|
|
14e: 3d e3 ldi r19, 0x3D ; 61
|
|
150: fc 01 movw r30, r24
|
|
152: 31 83 std Z+1, r19 ; 0x01
|
|
154: 20 83 st Z, r18
|
|
if(TIFR1 & (1 << OCF1A)) TIFR1 |= (1 << OCF1A);
|
|
156: 86 e3 ldi r24, 0x36 ; 54
|
|
158: 90 e0 ldi r25, 0x00 ; 0
|
|
15a: fc 01 movw r30, r24
|
|
15c: 80 81 ld r24, Z
|
|
15e: 88 2f mov r24, r24
|
|
160: 90 e0 ldi r25, 0x00 ; 0
|
|
162: 82 70 andi r24, 0x02 ; 2
|
|
164: 99 27 eor r25, r25
|
|
166: 89 2b or r24, r25
|
|
168: 49 f0 breq .+18 ; 0x17c <start_timer+0x46>
|
|
16a: 86 e3 ldi r24, 0x36 ; 54
|
|
16c: 90 e0 ldi r25, 0x00 ; 0
|
|
16e: 26 e3 ldi r18, 0x36 ; 54
|
|
170: 30 e0 ldi r19, 0x00 ; 0
|
|
172: f9 01 movw r30, r18
|
|
174: 20 81 ld r18, Z
|
|
176: 22 60 ori r18, 0x02 ; 2
|
|
178: fc 01 movw r30, r24
|
|
17a: 20 83 st Z, r18
|
|
TCCR1B |= (1<<CS12) | (1 << CS10); //start timer with 1024 prescalar
|
|
17c: 81 e8 ldi r24, 0x81 ; 129
|
|
17e: 90 e0 ldi r25, 0x00 ; 0
|
|
180: 21 e8 ldi r18, 0x81 ; 129
|
|
182: 30 e0 ldi r19, 0x00 ; 0
|
|
184: f9 01 movw r30, r18
|
|
186: 20 81 ld r18, Z
|
|
188: 25 60 ori r18, 0x05 ; 5
|
|
18a: fc 01 movw r30, r24
|
|
18c: 20 83 st Z, r18
|
|
}
|
|
18e: 00 00 nop
|
|
190: df 91 pop r29
|
|
192: cf 91 pop r28
|
|
194: 08 95 ret
|
|
|
|
00000196 <stop_timer>:
|
|
|
|
void stop_timer() {
|
|
196: cf 93 push r28
|
|
198: df 93 push r29
|
|
19a: cd b7 in r28, 0x3d ; 61
|
|
19c: de b7 in r29, 0x3e ; 62
|
|
if(TIFR1 & (1 << OCF1A)) TIFR1 |= (1 << OCF1A);
|
|
19e: 86 e3 ldi r24, 0x36 ; 54
|
|
1a0: 90 e0 ldi r25, 0x00 ; 0
|
|
1a2: fc 01 movw r30, r24
|
|
1a4: 80 81 ld r24, Z
|
|
1a6: 88 2f mov r24, r24
|
|
1a8: 90 e0 ldi r25, 0x00 ; 0
|
|
1aa: 82 70 andi r24, 0x02 ; 2
|
|
1ac: 99 27 eor r25, r25
|
|
1ae: 89 2b or r24, r25
|
|
1b0: 49 f0 breq .+18 ; 0x1c4 <stop_timer+0x2e>
|
|
1b2: 86 e3 ldi r24, 0x36 ; 54
|
|
1b4: 90 e0 ldi r25, 0x00 ; 0
|
|
1b6: 26 e3 ldi r18, 0x36 ; 54
|
|
1b8: 30 e0 ldi r19, 0x00 ; 0
|
|
1ba: f9 01 movw r30, r18
|
|
1bc: 20 81 ld r18, Z
|
|
1be: 22 60 ori r18, 0x02 ; 2
|
|
1c0: fc 01 movw r30, r24
|
|
1c2: 20 83 st Z, r18
|
|
TIMSK1 = (1 << WGM12);
|
|
1c4: 8f e6 ldi r24, 0x6F ; 111
|
|
1c6: 90 e0 ldi r25, 0x00 ; 0
|
|
1c8: 28 e0 ldi r18, 0x08 ; 8
|
|
1ca: fc 01 movw r30, r24
|
|
1cc: 20 83 st Z, r18
|
|
}
|
|
1ce: 00 00 nop
|
|
1d0: df 91 pop r29
|
|
1d2: cf 91 pop r28
|
|
1d4: 08 95 ret
|
|
|
|
000001d6 <timer_done>:
|
|
|
|
bool timer_done() {
|
|
1d6: cf 93 push r28
|
|
1d8: df 93 push r29
|
|
1da: cd b7 in r28, 0x3d ; 61
|
|
1dc: de b7 in r29, 0x3e ; 62
|
|
return (TIFR1 & (1 << OCF1A));
|
|
1de: 86 e3 ldi r24, 0x36 ; 54
|
|
1e0: 90 e0 ldi r25, 0x00 ; 0
|
|
1e2: fc 01 movw r30, r24
|
|
1e4: 80 81 ld r24, Z
|
|
1e6: 88 2f mov r24, r24
|
|
1e8: 90 e0 ldi r25, 0x00 ; 0
|
|
1ea: 82 70 andi r24, 0x02 ; 2
|
|
1ec: 99 27 eor r25, r25
|
|
1ee: 21 e0 ldi r18, 0x01 ; 1
|
|
1f0: 89 2b or r24, r25
|
|
1f2: 09 f4 brne .+2 ; 0x1f6 <timer_done+0x20>
|
|
1f4: 20 e0 ldi r18, 0x00 ; 0
|
|
1f6: 82 2f mov r24, r18
|
|
1f8: df 91 pop r29
|
|
1fa: cf 91 pop r28
|
|
1fc: 08 95 ret
|
|
|
|
000001fe <usart_init>:
|
|
1fe: cf 93 push r28
|
|
200: df 93 push r29
|
|
202: 00 d0 rcall .+0 ; 0x204 <usart_init+0x6>
|
|
204: cd b7 in r28, 0x3d ; 61
|
|
206: de b7 in r29, 0x3e ; 62
|
|
208: 87 e6 ldi r24, 0x67 ; 103
|
|
20a: 90 e0 ldi r25, 0x00 ; 0
|
|
20c: 9a 83 std Y+2, r25 ; 0x02
|
|
20e: 89 83 std Y+1, r24 ; 0x01
|
|
210: 88 ec ldi r24, 0xC8 ; 200
|
|
212: 90 e0 ldi r25, 0x00 ; 0
|
|
214: fc 01 movw r30, r24
|
|
216: 10 82 st Z, r1
|
|
218: 89 ec ldi r24, 0xC9 ; 201
|
|
21a: 90 e0 ldi r25, 0x00 ; 0
|
|
21c: 28 e1 ldi r18, 0x18 ; 24
|
|
21e: fc 01 movw r30, r24
|
|
220: 20 83 st Z, r18
|
|
222: 8a ec ldi r24, 0xCA ; 202
|
|
224: 90 e0 ldi r25, 0x00 ; 0
|
|
226: 26 e0 ldi r18, 0x06 ; 6
|
|
228: fc 01 movw r30, r24
|
|
22a: 20 83 st Z, r18
|
|
22c: 89 81 ldd r24, Y+1 ; 0x01
|
|
22e: 9a 81 ldd r25, Y+2 ; 0x02
|
|
230: 8d ec ldi r24, 0xCD ; 205
|
|
232: 90 e0 ldi r25, 0x00 ; 0
|
|
234: fc 01 movw r30, r24
|
|
236: 10 82 st Z, r1
|
|
238: 8c ec ldi r24, 0xCC ; 204
|
|
23a: 90 e0 ldi r25, 0x00 ; 0
|
|
23c: 29 81 ldd r18, Y+1 ; 0x01
|
|
23e: 3a 81 ldd r19, Y+2 ; 0x02
|
|
240: fc 01 movw r30, r24
|
|
242: 20 83 st Z, r18
|
|
244: 00 00 nop
|
|
246: 0f 90 pop r0
|
|
248: 0f 90 pop r0
|
|
24a: df 91 pop r29
|
|
24c: cf 91 pop r28
|
|
24e: 08 95 ret
|
|
|
|
00000250 <usart_txt>:
|
|
250: cf 93 push r28
|
|
252: df 93 push r29
|
|
254: 1f 92 push r1
|
|
256: cd b7 in r28, 0x3d ; 61
|
|
258: de b7 in r29, 0x3e ; 62
|
|
25a: 89 83 std Y+1, r24 ; 0x01
|
|
25c: 8e ec ldi r24, 0xCE ; 206
|
|
25e: 90 e0 ldi r25, 0x00 ; 0
|
|
260: 29 81 ldd r18, Y+1 ; 0x01
|
|
262: fc 01 movw r30, r24
|
|
264: 20 83 st Z, r18
|
|
266: 00 00 nop
|
|
268: 88 ec ldi r24, 0xC8 ; 200
|
|
26a: 90 e0 ldi r25, 0x00 ; 0
|
|
26c: fc 01 movw r30, r24
|
|
26e: 80 81 ld r24, Z
|
|
270: 88 2f mov r24, r24
|
|
272: 90 e0 ldi r25, 0x00 ; 0
|
|
274: 80 74 andi r24, 0x40 ; 64
|
|
276: 99 27 eor r25, r25
|
|
278: 89 2b or r24, r25
|
|
27a: b1 f3 breq .-20 ; 0x268 <usart_txt+0x18>
|
|
27c: 88 ec ldi r24, 0xC8 ; 200
|
|
27e: 90 e0 ldi r25, 0x00 ; 0
|
|
280: 28 ec ldi r18, 0xC8 ; 200
|
|
282: 30 e0 ldi r19, 0x00 ; 0
|
|
284: f9 01 movw r30, r18
|
|
286: 20 81 ld r18, Z
|
|
288: 20 64 ori r18, 0x40 ; 64
|
|
28a: fc 01 movw r30, r24
|
|
28c: 20 83 st Z, r18
|
|
28e: 00 00 nop
|
|
290: 0f 90 pop r0
|
|
292: df 91 pop r29
|
|
294: cf 91 pop r28
|
|
296: 08 95 ret
|
|
|
|
00000298 <usart_rxt_blocking>:
|
|
298: cf 93 push r28
|
|
29a: df 93 push r29
|
|
29c: cd b7 in r28, 0x3d ; 61
|
|
29e: de b7 in r29, 0x3e ; 62
|
|
2a0: 00 00 nop
|
|
2a2: 88 ec ldi r24, 0xC8 ; 200
|
|
2a4: 90 e0 ldi r25, 0x00 ; 0
|
|
2a6: fc 01 movw r30, r24
|
|
2a8: 80 81 ld r24, Z
|
|
2aa: 88 23 and r24, r24
|
|
2ac: d4 f7 brge .-12 ; 0x2a2 <usart_rxt_blocking+0xa>
|
|
2ae: 8e ec ldi r24, 0xCE ; 206
|
|
2b0: 90 e0 ldi r25, 0x00 ; 0
|
|
2b2: fc 01 movw r30, r24
|
|
2b4: 80 81 ld r24, Z
|
|
2b6: df 91 pop r29
|
|
2b8: cf 91 pop r28
|
|
2ba: 08 95 ret
|
|
|
|
000002bc <usart_txstr>:
|
|
2bc: cf 93 push r28
|
|
2be: df 93 push r29
|
|
2c0: 00 d0 rcall .+0 ; 0x2c2 <usart_txstr+0x6>
|
|
2c2: 00 d0 rcall .+0 ; 0x2c4 <usart_txstr+0x8>
|
|
2c4: cd b7 in r28, 0x3d ; 61
|
|
2c6: de b7 in r29, 0x3e ; 62
|
|
2c8: 9c 83 std Y+4, r25 ; 0x04
|
|
2ca: 8b 83 std Y+3, r24 ; 0x03
|
|
2cc: 1a 82 std Y+2, r1 ; 0x02
|
|
2ce: 19 82 std Y+1, r1 ; 0x01
|
|
2d0: 0f c0 rjmp .+30 ; 0x2f0 <usart_txstr+0x34>
|
|
2d2: 89 81 ldd r24, Y+1 ; 0x01
|
|
2d4: 9a 81 ldd r25, Y+2 ; 0x02
|
|
2d6: 2b 81 ldd r18, Y+3 ; 0x03
|
|
2d8: 3c 81 ldd r19, Y+4 ; 0x04
|
|
2da: 82 0f add r24, r18
|
|
2dc: 93 1f adc r25, r19
|
|
2de: fc 01 movw r30, r24
|
|
2e0: 80 81 ld r24, Z
|
|
2e2: 0e 94 28 01 call 0x250 ; 0x250 <usart_txt>
|
|
2e6: 89 81 ldd r24, Y+1 ; 0x01
|
|
2e8: 9a 81 ldd r25, Y+2 ; 0x02
|
|
2ea: 01 96 adiw r24, 0x01 ; 1
|
|
2ec: 9a 83 std Y+2, r25 ; 0x02
|
|
2ee: 89 83 std Y+1, r24 ; 0x01
|
|
2f0: 89 81 ldd r24, Y+1 ; 0x01
|
|
2f2: 9a 81 ldd r25, Y+2 ; 0x02
|
|
2f4: 2b 81 ldd r18, Y+3 ; 0x03
|
|
2f6: 3c 81 ldd r19, Y+4 ; 0x04
|
|
2f8: 82 0f add r24, r18
|
|
2fa: 93 1f adc r25, r19
|
|
2fc: fc 01 movw r30, r24
|
|
2fe: 80 81 ld r24, Z
|
|
300: 88 23 and r24, r24
|
|
302: 39 f7 brne .-50 ; 0x2d2 <usart_txstr+0x16>
|
|
304: 00 00 nop
|
|
306: 0f 90 pop r0
|
|
308: 0f 90 pop r0
|
|
30a: 0f 90 pop r0
|
|
30c: 0f 90 pop r0
|
|
30e: df 91 pop r29
|
|
310: cf 91 pop r28
|
|
312: 08 95 ret
|
|
|
|
00000314 <get_button>:
|
|
for(;;) {
|
|
usart_txstr("timer test\n");
|
|
start_timer();
|
|
while(!timer_done());
|
|
stop_timer();
|
|
}
|
|
314: cf 93 push r28
|
|
316: df 93 push r29
|
|
318: cd b7 in r28, 0x3d ; 61
|
|
31a: de b7 in r29, 0x3e ; 62
|
|
31c: 8c e2 ldi r24, 0x2C ; 44
|
|
31e: 90 e0 ldi r25, 0x00 ; 0
|
|
320: fc 01 movw r30, r24
|
|
322: 80 81 ld r24, Z
|
|
324: 88 2f mov r24, r24
|
|
326: 90 e0 ldi r25, 0x00 ; 0
|
|
328: 80 74 andi r24, 0x40 ; 64
|
|
32a: 99 27 eor r25, r25
|
|
32c: 89 2b or r24, r25
|
|
32e: 11 f4 brne .+4 ; 0x334 <get_button+0x20>
|
|
330: 84 e0 ldi r24, 0x04 ; 4
|
|
332: 06 c0 rjmp .+12 ; 0x340 <get_button+0x2c>
|
|
334: 80 e2 ldi r24, 0x20 ; 32
|
|
336: 90 e0 ldi r25, 0x00 ; 0
|
|
338: fc 01 movw r30, r24
|
|
33a: 80 81 ld r24, Z
|
|
33c: 80 95 com r24
|
|
33e: 83 7f andi r24, 0xF3 ; 243
|
|
340: df 91 pop r29
|
|
342: cf 91 pop r28
|
|
344: 08 95 ret
|
|
|
|
00000346 <display_element>:
|
|
346: cf 93 push r28
|
|
348: df 93 push r29
|
|
34a: cd b7 in r28, 0x3d ; 61
|
|
34c: de b7 in r29, 0x3e ; 62
|
|
34e: 63 97 sbiw r28, 0x13 ; 19
|
|
350: 0f b6 in r0, 0x3f ; 63
|
|
352: f8 94 cli
|
|
354: de bf out 0x3e, r29 ; 62
|
|
356: 0f be out 0x3f, r0 ; 63
|
|
358: cd bf out 0x3d, r28 ; 61
|
|
35a: 89 8b std Y+17, r24 ; 0x11
|
|
35c: 7b 8b std Y+19, r23 ; 0x13
|
|
35e: 6a 8b std Y+18, r22 ; 0x12
|
|
360: 1a 82 std Y+2, r1 ; 0x02
|
|
362: 19 82 std Y+1, r1 ; 0x01
|
|
364: 89 89 ldd r24, Y+17 ; 0x11
|
|
366: 88 2f mov r24, r24
|
|
368: 90 e0 ldi r25, 0x00 ; 0
|
|
36a: 84 70 andi r24, 0x04 ; 4
|
|
36c: 99 27 eor r25, r25
|
|
36e: 89 2b or r24, r25
|
|
370: 11 f0 breq .+4 ; 0x376 <display_element+0x30>
|
|
372: 80 e2 ldi r24, 0x20 ; 32
|
|
374: 89 83 std Y+1, r24 ; 0x01
|
|
376: 89 89 ldd r24, Y+17 ; 0x11
|
|
378: 83 7f andi r24, 0xF3 ; 243
|
|
37a: 8a 83 std Y+2, r24 ; 0x02
|
|
37c: 8b e2 ldi r24, 0x2B ; 43
|
|
37e: 90 e0 ldi r25, 0x00 ; 0
|
|
380: 2b e2 ldi r18, 0x2B ; 43
|
|
382: 30 e0 ldi r19, 0x00 ; 0
|
|
384: f9 01 movw r30, r18
|
|
386: 30 81 ld r19, Z
|
|
388: 2a 81 ldd r18, Y+2 ; 0x02
|
|
38a: 23 27 eor r18, r19
|
|
38c: fc 01 movw r30, r24
|
|
38e: 20 83 st Z, r18
|
|
390: 8e e2 ldi r24, 0x2E ; 46
|
|
392: 90 e0 ldi r25, 0x00 ; 0
|
|
394: 2e e2 ldi r18, 0x2E ; 46
|
|
396: 30 e0 ldi r19, 0x00 ; 0
|
|
398: f9 01 movw r30, r18
|
|
39a: 30 81 ld r19, Z
|
|
39c: 29 81 ldd r18, Y+1 ; 0x01
|
|
39e: 23 27 eor r18, r19
|
|
3a0: fc 01 movw r30, r24
|
|
3a2: 20 83 st Z, r18
|
|
3a4: 20 e0 ldi r18, 0x00 ; 0
|
|
3a6: 30 e0 ldi r19, 0x00 ; 0
|
|
3a8: 40 e8 ldi r20, 0x80 ; 128
|
|
3aa: 5e e3 ldi r21, 0x3E ; 62
|
|
3ac: 64 ea ldi r22, 0xA4 ; 164
|
|
3ae: 70 ed ldi r23, 0xD0 ; 208
|
|
3b0: 84 ea ldi r24, 0xA4 ; 164
|
|
3b2: 93 e4 ldi r25, 0x43 ; 67
|
|
3b4: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
3b8: 4a 89 ldd r20, Y+18 ; 0x12
|
|
3ba: 5b 89 ldd r21, Y+19 ; 0x13
|
|
3bc: 28 ee ldi r18, 0xE8 ; 232
|
|
3be: 33 e0 ldi r19, 0x03 ; 3
|
|
3c0: 42 9f mul r20, r18
|
|
3c2: c0 01 movw r24, r0
|
|
3c4: 43 9f mul r20, r19
|
|
3c6: 90 0d add r25, r0
|
|
3c8: 52 9f mul r21, r18
|
|
3ca: 90 0d add r25, r0
|
|
3cc: 11 24 eor r1, r1
|
|
3ce: cc 01 movw r24, r24
|
|
3d0: a0 e0 ldi r26, 0x00 ; 0
|
|
3d2: b0 e0 ldi r27, 0x00 ; 0
|
|
3d4: bc 01 movw r22, r24
|
|
3d6: cd 01 movw r24, r26
|
|
3d8: 0e 94 40 08 call 0x1080 ; 0x1080 <__floatunsisf>
|
|
3dc: dc 01 movw r26, r24
|
|
3de: cb 01 movw r24, r22
|
|
3e0: 8b 83 std Y+3, r24 ; 0x03
|
|
3e2: 9c 83 std Y+4, r25 ; 0x04
|
|
3e4: ad 83 std Y+5, r26 ; 0x05
|
|
3e6: be 83 std Y+6, r27 ; 0x06
|
|
3e8: 20 e0 ldi r18, 0x00 ; 0
|
|
3ea: 30 e0 ldi r19, 0x00 ; 0
|
|
3ec: 4a e7 ldi r20, 0x7A ; 122
|
|
3ee: 55 e4 ldi r21, 0x45 ; 69
|
|
3f0: 6b 81 ldd r22, Y+3 ; 0x03
|
|
3f2: 7c 81 ldd r23, Y+4 ; 0x04
|
|
3f4: 8d 81 ldd r24, Y+5 ; 0x05
|
|
3f6: 9e 81 ldd r25, Y+6 ; 0x06
|
|
3f8: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
3fc: dc 01 movw r26, r24
|
|
3fe: cb 01 movw r24, r22
|
|
400: 8f 83 std Y+7, r24 ; 0x07
|
|
402: 98 87 std Y+8, r25 ; 0x08
|
|
404: a9 87 std Y+9, r26 ; 0x09
|
|
406: ba 87 std Y+10, r27 ; 0x0a
|
|
408: 20 e0 ldi r18, 0x00 ; 0
|
|
40a: 30 e0 ldi r19, 0x00 ; 0
|
|
40c: 40 e8 ldi r20, 0x80 ; 128
|
|
40e: 5f e3 ldi r21, 0x3F ; 63
|
|
410: 6f 81 ldd r22, Y+7 ; 0x07
|
|
412: 78 85 ldd r23, Y+8 ; 0x08
|
|
414: 89 85 ldd r24, Y+9 ; 0x09
|
|
416: 9a 85 ldd r25, Y+10 ; 0x0a
|
|
418: 0e 94 93 07 call 0xf26 ; 0xf26 <__cmpsf2>
|
|
41c: 88 23 and r24, r24
|
|
41e: 2c f4 brge .+10 ; 0x42a <__EEPROM_REGION_LENGTH__+0x2a>
|
|
420: 81 e0 ldi r24, 0x01 ; 1
|
|
422: 90 e0 ldi r25, 0x00 ; 0
|
|
424: 9c 87 std Y+12, r25 ; 0x0c
|
|
426: 8b 87 std Y+11, r24 ; 0x0b
|
|
428: 3f c0 rjmp .+126 ; 0x4a8 <__EEPROM_REGION_LENGTH__+0xa8>
|
|
42a: 20 e0 ldi r18, 0x00 ; 0
|
|
42c: 3f ef ldi r19, 0xFF ; 255
|
|
42e: 4f e7 ldi r20, 0x7F ; 127
|
|
430: 57 e4 ldi r21, 0x47 ; 71
|
|
432: 6f 81 ldd r22, Y+7 ; 0x07
|
|
434: 78 85 ldd r23, Y+8 ; 0x08
|
|
436: 89 85 ldd r24, Y+9 ; 0x09
|
|
438: 9a 85 ldd r25, Y+10 ; 0x0a
|
|
43a: 0e 94 33 09 call 0x1266 ; 0x1266 <__gesf2>
|
|
43e: 18 16 cp r1, r24
|
|
440: 4c f5 brge .+82 ; 0x494 <__EEPROM_REGION_LENGTH__+0x94>
|
|
442: 20 e0 ldi r18, 0x00 ; 0
|
|
444: 30 e0 ldi r19, 0x00 ; 0
|
|
446: 40 e2 ldi r20, 0x20 ; 32
|
|
448: 51 e4 ldi r21, 0x41 ; 65
|
|
44a: 6b 81 ldd r22, Y+3 ; 0x03
|
|
44c: 7c 81 ldd r23, Y+4 ; 0x04
|
|
44e: 8d 81 ldd r24, Y+5 ; 0x05
|
|
450: 9e 81 ldd r25, Y+6 ; 0x06
|
|
452: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
456: dc 01 movw r26, r24
|
|
458: cb 01 movw r24, r22
|
|
45a: bc 01 movw r22, r24
|
|
45c: cd 01 movw r24, r26
|
|
45e: 0e 94 11 08 call 0x1022 ; 0x1022 <__fixunssfsi>
|
|
462: dc 01 movw r26, r24
|
|
464: cb 01 movw r24, r22
|
|
466: 9c 87 std Y+12, r25 ; 0x0c
|
|
468: 8b 87 std Y+11, r24 ; 0x0b
|
|
46a: 0f c0 rjmp .+30 ; 0x48a <__EEPROM_REGION_LENGTH__+0x8a>
|
|
46c: 80 e9 ldi r24, 0x90 ; 144
|
|
46e: 91 e0 ldi r25, 0x01 ; 1
|
|
470: 9e 87 std Y+14, r25 ; 0x0e
|
|
472: 8d 87 std Y+13, r24 ; 0x0d
|
|
474: 8d 85 ldd r24, Y+13 ; 0x0d
|
|
476: 9e 85 ldd r25, Y+14 ; 0x0e
|
|
478: 01 97 sbiw r24, 0x01 ; 1
|
|
47a: f1 f7 brne .-4 ; 0x478 <__EEPROM_REGION_LENGTH__+0x78>
|
|
47c: 9e 87 std Y+14, r25 ; 0x0e
|
|
47e: 8d 87 std Y+13, r24 ; 0x0d
|
|
480: 8b 85 ldd r24, Y+11 ; 0x0b
|
|
482: 9c 85 ldd r25, Y+12 ; 0x0c
|
|
484: 01 97 sbiw r24, 0x01 ; 1
|
|
486: 9c 87 std Y+12, r25 ; 0x0c
|
|
488: 8b 87 std Y+11, r24 ; 0x0b
|
|
48a: 8b 85 ldd r24, Y+11 ; 0x0b
|
|
48c: 9c 85 ldd r25, Y+12 ; 0x0c
|
|
48e: 89 2b or r24, r25
|
|
490: 69 f7 brne .-38 ; 0x46c <__EEPROM_REGION_LENGTH__+0x6c>
|
|
492: 14 c0 rjmp .+40 ; 0x4bc <__EEPROM_REGION_LENGTH__+0xbc>
|
|
494: 6f 81 ldd r22, Y+7 ; 0x07
|
|
496: 78 85 ldd r23, Y+8 ; 0x08
|
|
498: 89 85 ldd r24, Y+9 ; 0x09
|
|
49a: 9a 85 ldd r25, Y+10 ; 0x0a
|
|
49c: 0e 94 11 08 call 0x1022 ; 0x1022 <__fixunssfsi>
|
|
4a0: dc 01 movw r26, r24
|
|
4a2: cb 01 movw r24, r22
|
|
4a4: 9c 87 std Y+12, r25 ; 0x0c
|
|
4a6: 8b 87 std Y+11, r24 ; 0x0b
|
|
4a8: 8b 85 ldd r24, Y+11 ; 0x0b
|
|
4aa: 9c 85 ldd r25, Y+12 ; 0x0c
|
|
4ac: 98 8b std Y+16, r25 ; 0x10
|
|
4ae: 8f 87 std Y+15, r24 ; 0x0f
|
|
4b0: 8f 85 ldd r24, Y+15 ; 0x0f
|
|
4b2: 98 89 ldd r25, Y+16 ; 0x10
|
|
4b4: 01 97 sbiw r24, 0x01 ; 1
|
|
4b6: f1 f7 brne .-4 ; 0x4b4 <__EEPROM_REGION_LENGTH__+0xb4>
|
|
4b8: 98 8b std Y+16, r25 ; 0x10
|
|
4ba: 8f 87 std Y+15, r24 ; 0x0f
|
|
4bc: 8b e2 ldi r24, 0x2B ; 43
|
|
4be: 90 e0 ldi r25, 0x00 ; 0
|
|
4c0: 2b e2 ldi r18, 0x2B ; 43
|
|
4c2: 30 e0 ldi r19, 0x00 ; 0
|
|
4c4: f9 01 movw r30, r18
|
|
4c6: 30 81 ld r19, Z
|
|
4c8: 2a 81 ldd r18, Y+2 ; 0x02
|
|
4ca: 23 27 eor r18, r19
|
|
4cc: fc 01 movw r30, r24
|
|
4ce: 20 83 st Z, r18
|
|
4d0: 8e e2 ldi r24, 0x2E ; 46
|
|
4d2: 90 e0 ldi r25, 0x00 ; 0
|
|
4d4: 2e e2 ldi r18, 0x2E ; 46
|
|
4d6: 30 e0 ldi r19, 0x00 ; 0
|
|
4d8: f9 01 movw r30, r18
|
|
4da: 30 81 ld r19, Z
|
|
4dc: 29 81 ldd r18, Y+1 ; 0x01
|
|
4de: 23 27 eor r18, r19
|
|
4e0: fc 01 movw r30, r24
|
|
4e2: 20 83 st Z, r18
|
|
4e4: 00 00 nop
|
|
4e6: 63 96 adiw r28, 0x13 ; 19
|
|
4e8: 0f b6 in r0, 0x3f ; 63
|
|
4ea: f8 94 cli
|
|
4ec: de bf out 0x3e, r29 ; 62
|
|
4ee: 0f be out 0x3f, r0 ; 63
|
|
4f0: cd bf out 0x3d, r28 ; 61
|
|
4f2: df 91 pop r29
|
|
4f4: cf 91 pop r28
|
|
4f6: 08 95 ret
|
|
|
|
000004f8 <init_io>:
|
|
4f8: cf 93 push r28
|
|
4fa: df 93 push r29
|
|
4fc: cd b7 in r28, 0x3d ; 61
|
|
4fe: de b7 in r29, 0x3e ; 62
|
|
500: 81 e2 ldi r24, 0x21 ; 33
|
|
502: 90 e0 ldi r25, 0x00 ; 0
|
|
504: fc 01 movw r30, r24
|
|
506: 10 82 st Z, r1
|
|
508: 82 e2 ldi r24, 0x22 ; 34
|
|
50a: 90 e0 ldi r25, 0x00 ; 0
|
|
50c: 2f ef ldi r18, 0xFF ; 255
|
|
50e: fc 01 movw r30, r24
|
|
510: 20 83 st Z, r18
|
|
512: 8a e2 ldi r24, 0x2A ; 42
|
|
514: 90 e0 ldi r25, 0x00 ; 0
|
|
516: 2f ef ldi r18, 0xFF ; 255
|
|
518: fc 01 movw r30, r24
|
|
51a: 20 83 st Z, r18
|
|
51c: 8b e2 ldi r24, 0x2B ; 43
|
|
51e: 90 e0 ldi r25, 0x00 ; 0
|
|
520: 2f ef ldi r18, 0xFF ; 255
|
|
522: fc 01 movw r30, r24
|
|
524: 20 83 st Z, r18
|
|
526: 8d e2 ldi r24, 0x2D ; 45
|
|
528: 90 e0 ldi r25, 0x00 ; 0
|
|
52a: 20 e3 ldi r18, 0x30 ; 48
|
|
52c: fc 01 movw r30, r24
|
|
52e: 20 83 st Z, r18
|
|
530: 8e e2 ldi r24, 0x2E ; 46
|
|
532: 90 e0 ldi r25, 0x00 ; 0
|
|
534: 2f ef ldi r18, 0xFF ; 255
|
|
536: fc 01 movw r30, r24
|
|
538: 20 83 st Z, r18
|
|
53a: 00 00 nop
|
|
53c: df 91 pop r29
|
|
53e: cf 91 pop r28
|
|
540: 08 95 ret
|
|
|
|
00000542 <main>:
|
|
}
|
|
|
|
int main(void) {
|
|
542: 8f 92 push r8
|
|
544: 9f 92 push r9
|
|
546: af 92 push r10
|
|
548: bf 92 push r11
|
|
54a: cf 92 push r12
|
|
54c: df 92 push r13
|
|
54e: ef 92 push r14
|
|
550: ff 92 push r15
|
|
552: cf 93 push r28
|
|
554: df 93 push r29
|
|
556: cd b7 in r28, 0x3d ; 61
|
|
558: de b7 in r29, 0x3e ; 62
|
|
55a: e3 97 sbiw r28, 0x33 ; 51
|
|
55c: 0f b6 in r0, 0x3f ; 63
|
|
55e: f8 94 cli
|
|
560: de bf out 0x3e, r29 ; 62
|
|
562: 0f be out 0x3f, r0 ; 63
|
|
564: cd bf out 0x3d, r28 ; 61
|
|
cli();
|
|
566: f8 94 cli
|
|
timer_init_ctc();
|
|
568: 0e 94 85 00 call 0x10a ; 0x10a <timer_init_ctc>
|
|
init_io();
|
|
56c: 0e 94 7c 02 call 0x4f8 ; 0x4f8 <init_io>
|
|
usart_init();
|
|
570: 0e 94 ff 00 call 0x1fe ; 0x1fe <usart_init>
|
|
|
|
|
|
while(1) {
|
|
int level = 0;
|
|
574: 1a 82 std Y+2, r1 ; 0x02
|
|
576: 19 82 std Y+1, r1 ; 0x01
|
|
|
|
//get level
|
|
usart_txstr(
|
|
578: 80 e1 ldi r24, 0x10 ; 16
|
|
57a: 91 e0 ldi r25, 0x01 ; 1
|
|
57c: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
|
|
"Enter your starting difficulty level:\n"
|
|
"1. Easy\n"
|
|
"2. Moderate\n"
|
|
"3. Give me pain.");
|
|
|
|
while((level > 3) || (level < 1)) level = (int)(usart_rxt_blocking() - '0');
|
|
580: 07 c0 rjmp .+14 ; 0x590 <main+0x4e>
|
|
582: 0e 94 4c 01 call 0x298 ; 0x298 <usart_rxt_blocking>
|
|
586: 88 2f mov r24, r24
|
|
588: 90 e0 ldi r25, 0x00 ; 0
|
|
58a: c0 97 sbiw r24, 0x30 ; 48
|
|
58c: 9a 83 std Y+2, r25 ; 0x02
|
|
58e: 89 83 std Y+1, r24 ; 0x01
|
|
590: 89 81 ldd r24, Y+1 ; 0x01
|
|
592: 9a 81 ldd r25, Y+2 ; 0x02
|
|
594: 04 97 sbiw r24, 0x04 ; 4
|
|
596: ac f7 brge .-22 ; 0x582 <main+0x40>
|
|
598: 89 81 ldd r24, Y+1 ; 0x01
|
|
59a: 9a 81 ldd r25, Y+2 ; 0x02
|
|
59c: 18 16 cp r1, r24
|
|
59e: 19 06 cpc r1, r25
|
|
5a0: 84 f7 brge .-32 ; 0x582 <main+0x40>
|
|
|
|
|
|
//main simon game
|
|
while(level < 3) {
|
|
5a2: 16 c2 rjmp .+1068 ; 0x9d0 <__stack+0xd1>
|
|
int elements_max;
|
|
double score;
|
|
uint8_t element_list[5]; // TODO
|
|
|
|
|
|
switch(level) {
|
|
5a4: 89 81 ldd r24, Y+1 ; 0x01
|
|
5a6: 9a 81 ldd r25, Y+2 ; 0x02
|
|
5a8: 82 30 cpi r24, 0x02 ; 2
|
|
5aa: 91 05 cpc r25, r1
|
|
5ac: d9 f0 breq .+54 ; 0x5e4 <main+0xa2>
|
|
5ae: 83 30 cpi r24, 0x03 ; 3
|
|
5b0: 91 05 cpc r25, r1
|
|
5b2: 69 f1 breq .+90 ; 0x60e <main+0xcc>
|
|
5b4: 01 97 sbiw r24, 0x01 ; 1
|
|
5b6: 09 f0 breq .+2 ; 0x5ba <main+0x78>
|
|
5b8: 3f c0 rjmp .+126 ; 0x638 <main+0xf6>
|
|
case 1:
|
|
sets = 3;
|
|
5ba: 83 e0 ldi r24, 0x03 ; 3
|
|
5bc: 90 e0 ldi r25, 0x00 ; 0
|
|
5be: 9e 83 std Y+6, r25 ; 0x06
|
|
5c0: 8d 83 std Y+5, r24 ; 0x05
|
|
display_time = 3;
|
|
5c2: 83 e0 ldi r24, 0x03 ; 3
|
|
5c4: 90 e0 ldi r25, 0x00 ; 0
|
|
5c6: 9c 83 std Y+4, r25 ; 0x04
|
|
5c8: 8b 83 std Y+3, r24 ; 0x03
|
|
response_time = 5;
|
|
5ca: 85 e0 ldi r24, 0x05 ; 5
|
|
5cc: 90 e0 ldi r25, 0x00 ; 0
|
|
5ce: 98 87 std Y+8, r25 ; 0x08
|
|
5d0: 8f 83 std Y+7, r24 ; 0x07
|
|
elements_min = 3;
|
|
5d2: 83 e0 ldi r24, 0x03 ; 3
|
|
5d4: 90 e0 ldi r25, 0x00 ; 0
|
|
5d6: 9a 87 std Y+10, r25 ; 0x0a
|
|
5d8: 89 87 std Y+9, r24 ; 0x09
|
|
elements_max = 5;
|
|
5da: 85 e0 ldi r24, 0x05 ; 5
|
|
5dc: 90 e0 ldi r25, 0x00 ; 0
|
|
5de: 9c 87 std Y+12, r25 ; 0x0c
|
|
5e0: 8b 87 std Y+11, r24 ; 0x0b
|
|
break;
|
|
5e2: 2a c0 rjmp .+84 ; 0x638 <main+0xf6>
|
|
case 2:
|
|
sets = 4;
|
|
5e4: 84 e0 ldi r24, 0x04 ; 4
|
|
5e6: 90 e0 ldi r25, 0x00 ; 0
|
|
5e8: 9e 83 std Y+6, r25 ; 0x06
|
|
5ea: 8d 83 std Y+5, r24 ; 0x05
|
|
display_time = 2;
|
|
5ec: 82 e0 ldi r24, 0x02 ; 2
|
|
5ee: 90 e0 ldi r25, 0x00 ; 0
|
|
5f0: 9c 83 std Y+4, r25 ; 0x04
|
|
5f2: 8b 83 std Y+3, r24 ; 0x03
|
|
response_time = 7;
|
|
5f4: 87 e0 ldi r24, 0x07 ; 7
|
|
5f6: 90 e0 ldi r25, 0x00 ; 0
|
|
5f8: 98 87 std Y+8, r25 ; 0x08
|
|
5fa: 8f 83 std Y+7, r24 ; 0x07
|
|
elements_min = 3;
|
|
5fc: 83 e0 ldi r24, 0x03 ; 3
|
|
5fe: 90 e0 ldi r25, 0x00 ; 0
|
|
600: 9a 87 std Y+10, r25 ; 0x0a
|
|
602: 89 87 std Y+9, r24 ; 0x09
|
|
elements_max = 10;
|
|
604: 8a e0 ldi r24, 0x0A ; 10
|
|
606: 90 e0 ldi r25, 0x00 ; 0
|
|
608: 9c 87 std Y+12, r25 ; 0x0c
|
|
60a: 8b 87 std Y+11, r24 ; 0x0b
|
|
break;
|
|
60c: 15 c0 rjmp .+42 ; 0x638 <main+0xf6>
|
|
case 3:
|
|
sets = 5;
|
|
60e: 85 e0 ldi r24, 0x05 ; 5
|
|
610: 90 e0 ldi r25, 0x00 ; 0
|
|
612: 9e 83 std Y+6, r25 ; 0x06
|
|
614: 8d 83 std Y+5, r24 ; 0x05
|
|
display_time = 1;
|
|
616: 81 e0 ldi r24, 0x01 ; 1
|
|
618: 90 e0 ldi r25, 0x00 ; 0
|
|
61a: 9c 83 std Y+4, r25 ; 0x04
|
|
61c: 8b 83 std Y+3, r24 ; 0x03
|
|
response_time = 10;
|
|
61e: 8a e0 ldi r24, 0x0A ; 10
|
|
620: 90 e0 ldi r25, 0x00 ; 0
|
|
622: 98 87 std Y+8, r25 ; 0x08
|
|
624: 8f 83 std Y+7, r24 ; 0x07
|
|
elements_min = 5;
|
|
626: 85 e0 ldi r24, 0x05 ; 5
|
|
628: 90 e0 ldi r25, 0x00 ; 0
|
|
62a: 9a 87 std Y+10, r25 ; 0x0a
|
|
62c: 89 87 std Y+9, r24 ; 0x09
|
|
elements_max = 15;
|
|
62e: 8f e0 ldi r24, 0x0F ; 15
|
|
630: 90 e0 ldi r25, 0x00 ; 0
|
|
632: 9c 87 std Y+12, r25 ; 0x0c
|
|
634: 8b 87 std Y+11, r24 ; 0x0b
|
|
break;
|
|
636: 00 00 nop
|
|
|
|
|
|
/************************************************************************/
|
|
|
|
//main level
|
|
int max_score = 0;
|
|
638: 1e 86 std Y+14, r1 ; 0x0e
|
|
63a: 1d 86 std Y+13, r1 ; 0x0d
|
|
int current_score = 0;
|
|
63c: 18 8a std Y+16, r1 ; 0x10
|
|
63e: 1f 86 std Y+15, r1 ; 0x0f
|
|
for(int set = 0; set < sets; set++) {
|
|
640: 1a 8a std Y+18, r1 ; 0x12
|
|
642: 19 8a std Y+17, r1 ; 0x11
|
|
644: 7f c1 rjmp .+766 ; 0x944 <__stack+0x45>
|
|
int elements = elements_min + ceil(((elements_max - elements_min) / (float)(sets - 1)) * set);
|
|
646: 89 85 ldd r24, Y+9 ; 0x09
|
|
648: 9a 85 ldd r25, Y+10 ; 0x0a
|
|
64a: 09 2e mov r0, r25
|
|
64c: 00 0c add r0, r0
|
|
64e: aa 0b sbc r26, r26
|
|
650: bb 0b sbc r27, r27
|
|
652: bc 01 movw r22, r24
|
|
654: cd 01 movw r24, r26
|
|
656: 0e 94 42 08 call 0x1084 ; 0x1084 <__floatsisf>
|
|
65a: 6b 01 movw r12, r22
|
|
65c: 7c 01 movw r14, r24
|
|
65e: 2b 85 ldd r18, Y+11 ; 0x0b
|
|
660: 3c 85 ldd r19, Y+12 ; 0x0c
|
|
662: 89 85 ldd r24, Y+9 ; 0x09
|
|
664: 9a 85 ldd r25, Y+10 ; 0x0a
|
|
666: a9 01 movw r20, r18
|
|
668: 48 1b sub r20, r24
|
|
66a: 59 0b sbc r21, r25
|
|
66c: ca 01 movw r24, r20
|
|
66e: 09 2e mov r0, r25
|
|
670: 00 0c add r0, r0
|
|
672: aa 0b sbc r26, r26
|
|
674: bb 0b sbc r27, r27
|
|
676: bc 01 movw r22, r24
|
|
678: cd 01 movw r24, r26
|
|
67a: 0e 94 42 08 call 0x1084 ; 0x1084 <__floatsisf>
|
|
67e: 4b 01 movw r8, r22
|
|
680: 5c 01 movw r10, r24
|
|
682: 8d 81 ldd r24, Y+5 ; 0x05
|
|
684: 9e 81 ldd r25, Y+6 ; 0x06
|
|
686: 01 97 sbiw r24, 0x01 ; 1
|
|
688: 09 2e mov r0, r25
|
|
68a: 00 0c add r0, r0
|
|
68c: aa 0b sbc r26, r26
|
|
68e: bb 0b sbc r27, r27
|
|
690: bc 01 movw r22, r24
|
|
692: cd 01 movw r24, r26
|
|
694: 0e 94 42 08 call 0x1084 ; 0x1084 <__floatsisf>
|
|
698: dc 01 movw r26, r24
|
|
69a: cb 01 movw r24, r22
|
|
69c: 9c 01 movw r18, r24
|
|
69e: ad 01 movw r20, r26
|
|
6a0: c5 01 movw r24, r10
|
|
6a2: b4 01 movw r22, r8
|
|
6a4: 0e 94 98 07 call 0xf30 ; 0xf30 <__divsf3>
|
|
6a8: dc 01 movw r26, r24
|
|
6aa: cb 01 movw r24, r22
|
|
6ac: 4c 01 movw r8, r24
|
|
6ae: 5d 01 movw r10, r26
|
|
6b0: 89 89 ldd r24, Y+17 ; 0x11
|
|
6b2: 9a 89 ldd r25, Y+18 ; 0x12
|
|
6b4: 09 2e mov r0, r25
|
|
6b6: 00 0c add r0, r0
|
|
6b8: aa 0b sbc r26, r26
|
|
6ba: bb 0b sbc r27, r27
|
|
6bc: bc 01 movw r22, r24
|
|
6be: cd 01 movw r24, r26
|
|
6c0: 0e 94 42 08 call 0x1084 ; 0x1084 <__floatsisf>
|
|
6c4: dc 01 movw r26, r24
|
|
6c6: cb 01 movw r24, r22
|
|
6c8: 9c 01 movw r18, r24
|
|
6ca: ad 01 movw r20, r26
|
|
6cc: c5 01 movw r24, r10
|
|
6ce: b4 01 movw r22, r8
|
|
6d0: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
6d4: dc 01 movw r26, r24
|
|
6d6: cb 01 movw r24, r22
|
|
6d8: bc 01 movw r22, r24
|
|
6da: cd 01 movw r24, r26
|
|
6dc: 0e 94 7c 07 call 0xef8 ; 0xef8 <ceil>
|
|
6e0: dc 01 movw r26, r24
|
|
6e2: cb 01 movw r24, r22
|
|
6e4: 9c 01 movw r18, r24
|
|
6e6: ad 01 movw r20, r26
|
|
6e8: c7 01 movw r24, r14
|
|
6ea: b6 01 movw r22, r12
|
|
6ec: 0e 94 10 07 call 0xe20 ; 0xe20 <__addsf3>
|
|
6f0: dc 01 movw r26, r24
|
|
6f2: cb 01 movw r24, r22
|
|
6f4: bc 01 movw r22, r24
|
|
6f6: cd 01 movw r24, r26
|
|
6f8: 0e 94 0a 08 call 0x1014 ; 0x1014 <__fixsfsi>
|
|
6fc: dc 01 movw r26, r24
|
|
6fe: cb 01 movw r24, r22
|
|
700: 9b 8f std Y+27, r25 ; 0x1b
|
|
702: 8a 8f std Y+26, r24 ; 0x1a
|
|
//generate, display elements
|
|
for(int element = 0; element < elements; element++) {
|
|
704: 1c 8a std Y+20, r1 ; 0x14
|
|
706: 1b 8a std Y+19, r1 ; 0x13
|
|
708: 37 c0 rjmp .+110 ; 0x778 <main+0x236>
|
|
uint8_t element_bit = (rand() % ELEMENT_COUNT);
|
|
70a: 0e 94 19 0a call 0x1432 ; 0x1432 <rand>
|
|
70e: 27 e0 ldi r18, 0x07 ; 7
|
|
710: 30 e0 ldi r19, 0x00 ; 0
|
|
712: b9 01 movw r22, r18
|
|
714: 0e 94 a5 09 call 0x134a ; 0x134a <__divmodhi4>
|
|
718: 8d 8b std Y+21, r24 ; 0x15
|
|
if(element_bit == 3) element_bit = 7;
|
|
71a: 8d 89 ldd r24, Y+21 ; 0x15
|
|
71c: 83 30 cpi r24, 0x03 ; 3
|
|
71e: 11 f4 brne .+4 ; 0x724 <main+0x1e2>
|
|
720: 87 e0 ldi r24, 0x07 ; 7
|
|
722: 8d 8b std Y+21, r24 ; 0x15
|
|
uint8_t this_element = 1 << element_bit;
|
|
724: 8d 89 ldd r24, Y+21 ; 0x15
|
|
726: 28 2f mov r18, r24
|
|
728: 30 e0 ldi r19, 0x00 ; 0
|
|
72a: 81 e0 ldi r24, 0x01 ; 1
|
|
72c: 90 e0 ldi r25, 0x00 ; 0
|
|
72e: 02 c0 rjmp .+4 ; 0x734 <main+0x1f2>
|
|
730: 88 0f add r24, r24
|
|
732: 99 1f adc r25, r25
|
|
734: 2a 95 dec r18
|
|
736: e2 f7 brpl .-8 ; 0x730 <main+0x1ee>
|
|
738: 8c 8f std Y+28, r24 ; 0x1c
|
|
usart_txt('\n');
|
|
73a: 8a e0 ldi r24, 0x0A ; 10
|
|
73c: 0e 94 28 01 call 0x250 ; 0x250 <usart_txt>
|
|
usart_txt(element_bit + '0');
|
|
740: 8d 89 ldd r24, Y+21 ; 0x15
|
|
742: 80 5d subi r24, 0xD0 ; 208
|
|
744: 0e 94 28 01 call 0x250 ; 0x250 <usart_txt>
|
|
usart_txt('\n');
|
|
748: 8a e0 ldi r24, 0x0A ; 10
|
|
74a: 0e 94 28 01 call 0x250 ; 0x250 <usart_txt>
|
|
element_list[element] = this_element; // could optimize
|
|
74e: 9e 01 movw r18, r28
|
|
750: 21 5d subi r18, 0xD1 ; 209
|
|
752: 3f 4f sbci r19, 0xFF ; 255
|
|
754: 8b 89 ldd r24, Y+19 ; 0x13
|
|
756: 9c 89 ldd r25, Y+20 ; 0x14
|
|
758: 82 0f add r24, r18
|
|
75a: 93 1f adc r25, r19
|
|
75c: 2c 8d ldd r18, Y+28 ; 0x1c
|
|
75e: fc 01 movw r30, r24
|
|
760: 20 83 st Z, r18
|
|
display_element(this_element, display_time);
|
|
762: 8b 81 ldd r24, Y+3 ; 0x03
|
|
764: 9c 81 ldd r25, Y+4 ; 0x04
|
|
766: bc 01 movw r22, r24
|
|
768: 8c 8d ldd r24, Y+28 ; 0x1c
|
|
76a: 0e 94 a3 01 call 0x346 ; 0x346 <display_element>
|
|
int max_score = 0;
|
|
int current_score = 0;
|
|
for(int set = 0; set < sets; set++) {
|
|
int elements = elements_min + ceil(((elements_max - elements_min) / (float)(sets - 1)) * set);
|
|
//generate, display elements
|
|
for(int element = 0; element < elements; element++) {
|
|
76e: 8b 89 ldd r24, Y+19 ; 0x13
|
|
770: 9c 89 ldd r25, Y+20 ; 0x14
|
|
772: 01 96 adiw r24, 0x01 ; 1
|
|
774: 9c 8b std Y+20, r25 ; 0x14
|
|
776: 8b 8b std Y+19, r24 ; 0x13
|
|
778: 2b 89 ldd r18, Y+19 ; 0x13
|
|
77a: 3c 89 ldd r19, Y+20 ; 0x14
|
|
77c: 8a 8d ldd r24, Y+26 ; 0x1a
|
|
77e: 9b 8d ldd r25, Y+27 ; 0x1b
|
|
780: 28 17 cp r18, r24
|
|
782: 39 07 cpc r19, r25
|
|
784: 14 f2 brlt .-124 ; 0x70a <main+0x1c8>
|
|
element_list[element] = this_element; // could optimize
|
|
display_element(this_element, display_time);
|
|
|
|
}
|
|
//get elements
|
|
seconds_remaining = response_time;
|
|
786: 8f 81 ldd r24, Y+7 ; 0x07
|
|
788: 98 85 ldd r25, Y+8 ; 0x08
|
|
78a: 90 93 d9 01 sts 0x01D9, r25 ; 0x8001d9 <__data_end+0x1>
|
|
78e: 80 93 d8 01 sts 0x01D8, r24 ; 0x8001d8 <__data_end>
|
|
start_timer();
|
|
792: 0e 94 9b 00 call 0x136 ; 0x136 <start_timer>
|
|
uint16_t guess;
|
|
for(int element = 0; element < elements; element++) {
|
|
796: 19 8e std Y+25, r1 ; 0x19
|
|
798: 18 8e std Y+24, r1 ; 0x18
|
|
79a: c7 c0 rjmp .+398 ; 0x92a <__stack+0x2b>
|
|
usart_txstr("\ngot element, waiting...\n");
|
|
79c: 86 e6 ldi r24, 0x66 ; 102
|
|
79e: 91 e0 ldi r25, 0x01 ; 1
|
|
7a0: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
|
|
do {
|
|
if(timer_done()) {
|
|
7a4: 0e 94 eb 00 call 0x1d6 ; 0x1d6 <timer_done>
|
|
7a8: 88 23 and r24, r24
|
|
7aa: c1 f0 breq .+48 ; 0x7dc <main+0x29a>
|
|
seconds_remaining--;
|
|
7ac: 80 91 d8 01 lds r24, 0x01D8 ; 0x8001d8 <__data_end>
|
|
7b0: 90 91 d9 01 lds r25, 0x01D9 ; 0x8001d9 <__data_end+0x1>
|
|
7b4: 01 97 sbiw r24, 0x01 ; 1
|
|
7b6: 90 93 d9 01 sts 0x01D9, r25 ; 0x8001d9 <__data_end+0x1>
|
|
7ba: 80 93 d8 01 sts 0x01D8, r24 ; 0x8001d8 <__data_end>
|
|
stop_timer(); //TODO only need one function
|
|
7be: 0e 94 cb 00 call 0x196 ; 0x196 <stop_timer>
|
|
start_timer();
|
|
7c2: 0e 94 9b 00 call 0x136 ; 0x136 <start_timer>
|
|
beep(261.63, .1);
|
|
7c6: 2d ec ldi r18, 0xCD ; 205
|
|
7c8: 3c ec ldi r19, 0xCC ; 204
|
|
7ca: 4c ec ldi r20, 0xCC ; 204
|
|
7cc: 5d e3 ldi r21, 0x3D ; 61
|
|
7ce: 64 ea ldi r22, 0xA4 ; 164
|
|
7d0: 70 ed ldi r23, 0xD0 ; 208
|
|
7d2: 82 e8 ldi r24, 0x82 ; 130
|
|
7d4: 93 e4 ldi r25, 0x43 ; 67
|
|
7d6: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
7da: 06 c0 rjmp .+12 ; 0x7e8 <main+0x2a6>
|
|
}
|
|
else { guess = get_button(); }
|
|
7dc: 0e 94 8a 01 call 0x314 ; 0x314 <get_button>
|
|
7e0: 88 2f mov r24, r24
|
|
7e2: 90 e0 ldi r25, 0x00 ; 0
|
|
7e4: 9f 8b std Y+23, r25 ; 0x17
|
|
7e6: 8e 8b std Y+22, r24 ; 0x16
|
|
} while((!guess) && (seconds_remaining > 0));
|
|
7e8: 8e 89 ldd r24, Y+22 ; 0x16
|
|
7ea: 9f 89 ldd r25, Y+23 ; 0x17
|
|
7ec: 89 2b or r24, r25
|
|
7ee: 39 f4 brne .+14 ; 0x7fe <main+0x2bc>
|
|
7f0: 80 91 d8 01 lds r24, 0x01D8 ; 0x8001d8 <__data_end>
|
|
7f4: 90 91 d9 01 lds r25, 0x01D9 ; 0x8001d9 <__data_end+0x1>
|
|
7f8: 18 16 cp r1, r24
|
|
7fa: 19 06 cpc r1, r25
|
|
7fc: 9c f2 brlt .-90 ; 0x7a4 <main+0x262>
|
|
7fe: 80 e0 ldi r24, 0x00 ; 0
|
|
800: 90 e0 ldi r25, 0x00 ; 0
|
|
802: aa e7 ldi r26, 0x7A ; 122
|
|
804: b3 e4 ldi r27, 0x43 ; 67
|
|
806: 89 a3 std Y+33, r24 ; 0x21
|
|
808: 9a a3 std Y+34, r25 ; 0x22
|
|
80a: ab a3 std Y+35, r26 ; 0x23
|
|
80c: bc a3 std Y+36, r27 ; 0x24
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
|
|
|
#else
|
|
uint16_t __ticks;
|
|
__tmp = ((F_CPU) / 4e3) * __ms;
|
|
80e: 20 e0 ldi r18, 0x00 ; 0
|
|
810: 30 e0 ldi r19, 0x00 ; 0
|
|
812: 4a e7 ldi r20, 0x7A ; 122
|
|
814: 55 e4 ldi r21, 0x45 ; 69
|
|
816: 69 a1 ldd r22, Y+33 ; 0x21
|
|
818: 7a a1 ldd r23, Y+34 ; 0x22
|
|
81a: 8b a1 ldd r24, Y+35 ; 0x23
|
|
81c: 9c a1 ldd r25, Y+36 ; 0x24
|
|
81e: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
822: dc 01 movw r26, r24
|
|
824: cb 01 movw r24, r22
|
|
826: 8d a3 std Y+37, r24 ; 0x25
|
|
828: 9e a3 std Y+38, r25 ; 0x26
|
|
82a: af a3 std Y+39, r26 ; 0x27
|
|
82c: b8 a7 std Y+40, r27 ; 0x28
|
|
if (__tmp < 1.0)
|
|
82e: 20 e0 ldi r18, 0x00 ; 0
|
|
830: 30 e0 ldi r19, 0x00 ; 0
|
|
832: 40 e8 ldi r20, 0x80 ; 128
|
|
834: 5f e3 ldi r21, 0x3F ; 63
|
|
836: 6d a1 ldd r22, Y+37 ; 0x25
|
|
838: 7e a1 ldd r23, Y+38 ; 0x26
|
|
83a: 8f a1 ldd r24, Y+39 ; 0x27
|
|
83c: 98 a5 ldd r25, Y+40 ; 0x28
|
|
83e: 0e 94 93 07 call 0xf26 ; 0xf26 <__cmpsf2>
|
|
842: 88 23 and r24, r24
|
|
844: 2c f4 brge .+10 ; 0x850 <__DATA_REGION_LENGTH__+0x50>
|
|
__ticks = 1;
|
|
846: 81 e0 ldi r24, 0x01 ; 1
|
|
848: 90 e0 ldi r25, 0x00 ; 0
|
|
84a: 9a a7 std Y+42, r25 ; 0x2a
|
|
84c: 89 a7 std Y+41, r24 ; 0x29
|
|
84e: 3f c0 rjmp .+126 ; 0x8ce <__DATA_REGION_LENGTH__+0xce>
|
|
else if (__tmp > 65535)
|
|
850: 20 e0 ldi r18, 0x00 ; 0
|
|
852: 3f ef ldi r19, 0xFF ; 255
|
|
854: 4f e7 ldi r20, 0x7F ; 127
|
|
856: 57 e4 ldi r21, 0x47 ; 71
|
|
858: 6d a1 ldd r22, Y+37 ; 0x25
|
|
85a: 7e a1 ldd r23, Y+38 ; 0x26
|
|
85c: 8f a1 ldd r24, Y+39 ; 0x27
|
|
85e: 98 a5 ldd r25, Y+40 ; 0x28
|
|
860: 0e 94 33 09 call 0x1266 ; 0x1266 <__gesf2>
|
|
864: 18 16 cp r1, r24
|
|
866: 4c f5 brge .+82 ; 0x8ba <__DATA_REGION_LENGTH__+0xba>
|
|
{
|
|
// __ticks = requested delay in 1/10 ms
|
|
__ticks = (uint16_t) (__ms * 10.0);
|
|
868: 20 e0 ldi r18, 0x00 ; 0
|
|
86a: 30 e0 ldi r19, 0x00 ; 0
|
|
86c: 40 e2 ldi r20, 0x20 ; 32
|
|
86e: 51 e4 ldi r21, 0x41 ; 65
|
|
870: 69 a1 ldd r22, Y+33 ; 0x21
|
|
872: 7a a1 ldd r23, Y+34 ; 0x22
|
|
874: 8b a1 ldd r24, Y+35 ; 0x23
|
|
876: 9c a1 ldd r25, Y+36 ; 0x24
|
|
878: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
87c: dc 01 movw r26, r24
|
|
87e: cb 01 movw r24, r22
|
|
880: bc 01 movw r22, r24
|
|
882: cd 01 movw r24, r26
|
|
884: 0e 94 11 08 call 0x1022 ; 0x1022 <__fixunssfsi>
|
|
888: dc 01 movw r26, r24
|
|
88a: cb 01 movw r24, r22
|
|
88c: 9a a7 std Y+42, r25 ; 0x2a
|
|
88e: 89 a7 std Y+41, r24 ; 0x29
|
|
890: 0f c0 rjmp .+30 ; 0x8b0 <__DATA_REGION_LENGTH__+0xb0>
|
|
892: 80 e9 ldi r24, 0x90 ; 144
|
|
894: 91 e0 ldi r25, 0x01 ; 1
|
|
896: 9c a7 std Y+44, r25 ; 0x2c
|
|
898: 8b a7 std Y+43, r24 ; 0x2b
|
|
milliseconds can be achieved.
|
|
*/
|
|
void
|
|
_delay_loop_2(uint16_t __count)
|
|
{
|
|
__asm__ volatile (
|
|
89a: 8b a5 ldd r24, Y+43 ; 0x2b
|
|
89c: 9c a5 ldd r25, Y+44 ; 0x2c
|
|
89e: 01 97 sbiw r24, 0x01 ; 1
|
|
8a0: f1 f7 brne .-4 ; 0x89e <__DATA_REGION_LENGTH__+0x9e>
|
|
8a2: 9c a7 std Y+44, r25 ; 0x2c
|
|
8a4: 8b a7 std Y+43, r24 ; 0x2b
|
|
while(__ticks)
|
|
{
|
|
// wait 1/10 ms
|
|
_delay_loop_2(((F_CPU) / 4e3) / 10);
|
|
__ticks --;
|
|
8a6: 89 a5 ldd r24, Y+41 ; 0x29
|
|
8a8: 9a a5 ldd r25, Y+42 ; 0x2a
|
|
8aa: 01 97 sbiw r24, 0x01 ; 1
|
|
8ac: 9a a7 std Y+42, r25 ; 0x2a
|
|
8ae: 89 a7 std Y+41, r24 ; 0x29
|
|
__ticks = 1;
|
|
else if (__tmp > 65535)
|
|
{
|
|
// __ticks = requested delay in 1/10 ms
|
|
__ticks = (uint16_t) (__ms * 10.0);
|
|
while(__ticks)
|
|
8b0: 89 a5 ldd r24, Y+41 ; 0x29
|
|
8b2: 9a a5 ldd r25, Y+42 ; 0x2a
|
|
8b4: 89 2b or r24, r25
|
|
8b6: 69 f7 brne .-38 ; 0x892 <__DATA_REGION_LENGTH__+0x92>
|
|
8b8: 14 c0 rjmp .+40 ; 0x8e2 <__DATA_REGION_LENGTH__+0xe2>
|
|
__ticks --;
|
|
}
|
|
return;
|
|
}
|
|
else
|
|
__ticks = (uint16_t)__tmp;
|
|
8ba: 6d a1 ldd r22, Y+37 ; 0x25
|
|
8bc: 7e a1 ldd r23, Y+38 ; 0x26
|
|
8be: 8f a1 ldd r24, Y+39 ; 0x27
|
|
8c0: 98 a5 ldd r25, Y+40 ; 0x28
|
|
8c2: 0e 94 11 08 call 0x1022 ; 0x1022 <__fixunssfsi>
|
|
8c6: dc 01 movw r26, r24
|
|
8c8: cb 01 movw r24, r22
|
|
8ca: 9a a7 std Y+42, r25 ; 0x2a
|
|
8cc: 89 a7 std Y+41, r24 ; 0x29
|
|
8ce: 89 a5 ldd r24, Y+41 ; 0x29
|
|
8d0: 9a a5 ldd r25, Y+42 ; 0x2a
|
|
8d2: 9e a7 std Y+46, r25 ; 0x2e
|
|
8d4: 8d a7 std Y+45, r24 ; 0x2d
|
|
8d6: 8d a5 ldd r24, Y+45 ; 0x2d
|
|
8d8: 9e a5 ldd r25, Y+46 ; 0x2e
|
|
8da: 01 97 sbiw r24, 0x01 ; 1
|
|
8dc: f1 f7 brne .-4 ; 0x8da <__DATA_REGION_LENGTH__+0xda>
|
|
8de: 9e a7 std Y+46, r25 ; 0x2e
|
|
8e0: 8d a7 std Y+45, r24 ; 0x2d
|
|
_delay_ms(250); //prevent double press
|
|
max_score++;
|
|
8e2: 8d 85 ldd r24, Y+13 ; 0x0d
|
|
8e4: 9e 85 ldd r25, Y+14 ; 0x0e
|
|
8e6: 01 96 adiw r24, 0x01 ; 1
|
|
8e8: 9e 87 std Y+14, r25 ; 0x0e
|
|
8ea: 8d 87 std Y+13, r24 ; 0x0d
|
|
if(guess == element_list[element]) {
|
|
8ec: 9e 01 movw r18, r28
|
|
8ee: 21 5d subi r18, 0xD1 ; 209
|
|
8f0: 3f 4f sbci r19, 0xFF ; 255
|
|
8f2: 88 8d ldd r24, Y+24 ; 0x18
|
|
8f4: 99 8d ldd r25, Y+25 ; 0x19
|
|
8f6: 82 0f add r24, r18
|
|
8f8: 93 1f adc r25, r19
|
|
8fa: fc 01 movw r30, r24
|
|
8fc: 80 81 ld r24, Z
|
|
8fe: 28 2f mov r18, r24
|
|
900: 30 e0 ldi r19, 0x00 ; 0
|
|
902: 8e 89 ldd r24, Y+22 ; 0x16
|
|
904: 9f 89 ldd r25, Y+23 ; 0x17
|
|
906: 28 17 cp r18, r24
|
|
908: 39 07 cpc r19, r25
|
|
90a: 41 f4 brne .+16 ; 0x91c <__stack+0x1d>
|
|
current_score++;
|
|
90c: 8f 85 ldd r24, Y+15 ; 0x0f
|
|
90e: 98 89 ldd r25, Y+16 ; 0x10
|
|
910: 01 96 adiw r24, 0x01 ; 1
|
|
912: 98 8b std Y+16, r25 ; 0x10
|
|
914: 8f 87 std Y+15, r24 ; 0x0f
|
|
correct_beep();
|
|
916: 0e 94 31 05 call 0xa62 ; 0xa62 <correct_beep>
|
|
91a: 02 c0 rjmp .+4 ; 0x920 <__stack+0x21>
|
|
}
|
|
else {
|
|
incorrect_beep();
|
|
91c: 0e 94 47 05 call 0xa8e ; 0xa8e <incorrect_beep>
|
|
}
|
|
//get elements
|
|
seconds_remaining = response_time;
|
|
start_timer();
|
|
uint16_t guess;
|
|
for(int element = 0; element < elements; element++) {
|
|
920: 88 8d ldd r24, Y+24 ; 0x18
|
|
922: 99 8d ldd r25, Y+25 ; 0x19
|
|
924: 01 96 adiw r24, 0x01 ; 1
|
|
926: 99 8f std Y+25, r25 ; 0x19
|
|
928: 88 8f std Y+24, r24 ; 0x18
|
|
92a: 28 8d ldd r18, Y+24 ; 0x18
|
|
92c: 39 8d ldd r19, Y+25 ; 0x19
|
|
92e: 8a 8d ldd r24, Y+26 ; 0x1a
|
|
930: 9b 8d ldd r25, Y+27 ; 0x1b
|
|
932: 28 17 cp r18, r24
|
|
934: 39 07 cpc r19, r25
|
|
936: 0c f4 brge .+2 ; 0x93a <__stack+0x3b>
|
|
938: 31 cf rjmp .-414 ; 0x79c <main+0x25a>
|
|
/************************************************************************/
|
|
|
|
//main level
|
|
int max_score = 0;
|
|
int current_score = 0;
|
|
for(int set = 0; set < sets; set++) {
|
|
93a: 89 89 ldd r24, Y+17 ; 0x11
|
|
93c: 9a 89 ldd r25, Y+18 ; 0x12
|
|
93e: 01 96 adiw r24, 0x01 ; 1
|
|
940: 9a 8b std Y+18, r25 ; 0x12
|
|
942: 89 8b std Y+17, r24 ; 0x11
|
|
944: 29 89 ldd r18, Y+17 ; 0x11
|
|
946: 3a 89 ldd r19, Y+18 ; 0x12
|
|
948: 8d 81 ldd r24, Y+5 ; 0x05
|
|
94a: 9e 81 ldd r25, Y+6 ; 0x06
|
|
94c: 28 17 cp r18, r24
|
|
94e: 39 07 cpc r19, r25
|
|
950: 0c f4 brge .+2 ; 0x954 <__stack+0x55>
|
|
952: 79 ce rjmp .-782 ; 0x646 <main+0x104>
|
|
else {
|
|
incorrect_beep();
|
|
}
|
|
}
|
|
}
|
|
score = (float)current_score / max_score;
|
|
954: 8f 85 ldd r24, Y+15 ; 0x0f
|
|
956: 98 89 ldd r25, Y+16 ; 0x10
|
|
958: 09 2e mov r0, r25
|
|
95a: 00 0c add r0, r0
|
|
95c: aa 0b sbc r26, r26
|
|
95e: bb 0b sbc r27, r27
|
|
960: bc 01 movw r22, r24
|
|
962: cd 01 movw r24, r26
|
|
964: 0e 94 42 08 call 0x1084 ; 0x1084 <__floatsisf>
|
|
968: 6b 01 movw r12, r22
|
|
96a: 7c 01 movw r14, r24
|
|
96c: 8d 85 ldd r24, Y+13 ; 0x0d
|
|
96e: 9e 85 ldd r25, Y+14 ; 0x0e
|
|
970: 09 2e mov r0, r25
|
|
972: 00 0c add r0, r0
|
|
974: aa 0b sbc r26, r26
|
|
976: bb 0b sbc r27, r27
|
|
978: bc 01 movw r22, r24
|
|
97a: cd 01 movw r24, r26
|
|
97c: 0e 94 42 08 call 0x1084 ; 0x1084 <__floatsisf>
|
|
980: dc 01 movw r26, r24
|
|
982: cb 01 movw r24, r22
|
|
984: 9c 01 movw r18, r24
|
|
986: ad 01 movw r20, r26
|
|
988: c7 01 movw r24, r14
|
|
98a: b6 01 movw r22, r12
|
|
98c: 0e 94 98 07 call 0xf30 ; 0xf30 <__divsf3>
|
|
990: dc 01 movw r26, r24
|
|
992: cb 01 movw r24, r22
|
|
994: 8d 8f std Y+29, r24 ; 0x1d
|
|
996: 9e 8f std Y+30, r25 ; 0x1e
|
|
998: af 8f std Y+31, r26 ; 0x1f
|
|
99a: b8 a3 std Y+32, r27 ; 0x20
|
|
if(score >= .8) {
|
|
99c: 2d ec ldi r18, 0xCD ; 205
|
|
99e: 3c ec ldi r19, 0xCC ; 204
|
|
9a0: 4c e4 ldi r20, 0x4C ; 76
|
|
9a2: 5f e3 ldi r21, 0x3F ; 63
|
|
9a4: 6d 8d ldd r22, Y+29 ; 0x1d
|
|
9a6: 7e 8d ldd r23, Y+30 ; 0x1e
|
|
9a8: 8f 8d ldd r24, Y+31 ; 0x1f
|
|
9aa: 98 a1 ldd r25, Y+32 ; 0x20
|
|
9ac: 0e 94 33 09 call 0x1266 ; 0x1266 <__gesf2>
|
|
9b0: 88 23 and r24, r24
|
|
9b2: 54 f0 brlt .+20 ; 0x9c8 <__stack+0xc9>
|
|
level++;
|
|
9b4: 89 81 ldd r24, Y+1 ; 0x01
|
|
9b6: 9a 81 ldd r25, Y+2 ; 0x02
|
|
9b8: 01 96 adiw r24, 0x01 ; 1
|
|
9ba: 9a 83 std Y+2, r25 ; 0x02
|
|
9bc: 89 83 std Y+1, r24 ; 0x01
|
|
usart_txstr("\nnext level\n");
|
|
9be: 80 e8 ldi r24, 0x80 ; 128
|
|
9c0: 91 e0 ldi r25, 0x01 ; 1
|
|
9c2: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
|
|
9c6: 04 c0 rjmp .+8 ; 0x9d0 <__stack+0xd1>
|
|
}
|
|
else {
|
|
loose();
|
|
9c8: 0e 94 05 06 call 0xc0a ; 0xc0a <loose>
|
|
break;
|
|
9cc: 00 00 nop
|
|
9ce: 05 c0 rjmp .+10 ; 0x9da <__stack+0xdb>
|
|
|
|
while((level > 3) || (level < 1)) level = (int)(usart_rxt_blocking() - '0');
|
|
|
|
|
|
//main simon game
|
|
while(level < 3) {
|
|
9d0: 89 81 ldd r24, Y+1 ; 0x01
|
|
9d2: 9a 81 ldd r25, Y+2 ; 0x02
|
|
9d4: 03 97 sbiw r24, 0x03 ; 3
|
|
9d6: 0c f4 brge .+2 ; 0x9da <__stack+0xdb>
|
|
9d8: e5 cd rjmp .-1078 ; 0x5a4 <main+0x62>
|
|
else {
|
|
loose();
|
|
break;
|
|
}
|
|
}
|
|
if(level >= 3) win();
|
|
9da: 89 81 ldd r24, Y+1 ; 0x01
|
|
9dc: 9a 81 ldd r25, Y+2 ; 0x02
|
|
9de: 03 97 sbiw r24, 0x03 ; 3
|
|
9e0: 0c f4 brge .+2 ; 0x9e4 <__stack+0xe5>
|
|
9e2: c8 cd rjmp .-1136 ; 0x574 <main+0x32>
|
|
9e4: 0e 94 e5 05 call 0xbca ; 0xbca <win>
|
|
}
|
|
9e8: c5 cd rjmp .-1142 ; 0x574 <main+0x32>
|
|
|
|
000009ea <__vector_13>:
|
|
}
|
|
|
|
//timer interrupt
|
|
ISR(TIMER1_COMPA_vect) {
|
|
9ea: 1f 92 push r1
|
|
9ec: 0f 92 push r0
|
|
9ee: 00 90 5f 00 lds r0, 0x005F ; 0x80005f <__TEXT_REGION_LENGTH__+0x7f805f>
|
|
9f2: 0f 92 push r0
|
|
9f4: 11 24 eor r1, r1
|
|
9f6: 2f 93 push r18
|
|
9f8: 3f 93 push r19
|
|
9fa: 4f 93 push r20
|
|
9fc: 5f 93 push r21
|
|
9fe: 6f 93 push r22
|
|
a00: 7f 93 push r23
|
|
a02: 8f 93 push r24
|
|
a04: 9f 93 push r25
|
|
a06: af 93 push r26
|
|
a08: bf 93 push r27
|
|
a0a: ef 93 push r30
|
|
a0c: ff 93 push r31
|
|
a0e: cf 93 push r28
|
|
a10: df 93 push r29
|
|
a12: cd b7 in r28, 0x3d ; 61
|
|
a14: de b7 in r29, 0x3e ; 62
|
|
if(seconds_remaining-- > 0) return;
|
|
a16: 80 91 d8 01 lds r24, 0x01D8 ; 0x8001d8 <__data_end>
|
|
a1a: 90 91 d9 01 lds r25, 0x01D9 ; 0x8001d9 <__data_end+0x1>
|
|
a1e: 9c 01 movw r18, r24
|
|
a20: 21 50 subi r18, 0x01 ; 1
|
|
a22: 31 09 sbc r19, r1
|
|
a24: 30 93 d9 01 sts 0x01D9, r19 ; 0x8001d9 <__data_end+0x1>
|
|
a28: 20 93 d8 01 sts 0x01D8, r18 ; 0x8001d8 <__data_end>
|
|
a2c: 18 16 cp r1, r24
|
|
a2e: 19 06 cpc r1, r25
|
|
a30: 1c f0 brlt .+6 ; 0xa38 <__vector_13+0x4e>
|
|
for(;;) {
|
|
beep();
|
|
a32: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
}
|
|
a36: fd cf rjmp .-6 ; 0xa32 <__vector_13+0x48>
|
|
}
|
|
}
|
|
|
|
//timer interrupt
|
|
ISR(TIMER1_COMPA_vect) {
|
|
if(seconds_remaining-- > 0) return;
|
|
a38: 00 00 nop
|
|
for(;;) {
|
|
beep();
|
|
}
|
|
}
|
|
a3a: df 91 pop r29
|
|
a3c: cf 91 pop r28
|
|
a3e: ff 91 pop r31
|
|
a40: ef 91 pop r30
|
|
a42: bf 91 pop r27
|
|
a44: af 91 pop r26
|
|
a46: 9f 91 pop r25
|
|
a48: 8f 91 pop r24
|
|
a4a: 7f 91 pop r23
|
|
a4c: 6f 91 pop r22
|
|
a4e: 5f 91 pop r21
|
|
a50: 4f 91 pop r20
|
|
a52: 3f 91 pop r19
|
|
a54: 2f 91 pop r18
|
|
a56: 0f 90 pop r0
|
|
a58: 00 92 5f 00 sts 0x005F, r0 ; 0x80005f <__TEXT_REGION_LENGTH__+0x7f805f>
|
|
a5c: 0f 90 pop r0
|
|
a5e: 1f 90 pop r1
|
|
a60: 18 95 reti
|
|
|
|
00000a62 <correct_beep>:
|
|
|
|
void correct_beep() {
|
|
a62: cf 93 push r28
|
|
a64: df 93 push r29
|
|
a66: cd b7 in r28, 0x3d ; 61
|
|
a68: de b7 in r29, 0x3e ; 62
|
|
usart_txstr("\nCorrect!\n");
|
|
a6a: 8d e8 ldi r24, 0x8D ; 141
|
|
a6c: 91 e0 ldi r25, 0x01 ; 1
|
|
a6e: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
|
|
beep(440.0, .1);
|
|
a72: 2d ec ldi r18, 0xCD ; 205
|
|
a74: 3c ec ldi r19, 0xCC ; 204
|
|
a76: 4c ec ldi r20, 0xCC ; 204
|
|
a78: 5d e3 ldi r21, 0x3D ; 61
|
|
a7a: 60 e0 ldi r22, 0x00 ; 0
|
|
a7c: 70 e0 ldi r23, 0x00 ; 0
|
|
a7e: 8c ed ldi r24, 0xDC ; 220
|
|
a80: 93 e4 ldi r25, 0x43 ; 67
|
|
a82: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
}
|
|
a86: 00 00 nop
|
|
a88: df 91 pop r29
|
|
a8a: cf 91 pop r28
|
|
a8c: 08 95 ret
|
|
|
|
00000a8e <incorrect_beep>:
|
|
|
|
void incorrect_beep() {
|
|
a8e: cf 93 push r28
|
|
a90: df 93 push r29
|
|
a92: cd b7 in r28, 0x3d ; 61
|
|
a94: de b7 in r29, 0x3e ; 62
|
|
a96: 2e 97 sbiw r28, 0x0e ; 14
|
|
a98: 0f b6 in r0, 0x3f ; 63
|
|
a9a: f8 94 cli
|
|
a9c: de bf out 0x3e, r29 ; 62
|
|
a9e: 0f be out 0x3f, r0 ; 63
|
|
aa0: cd bf out 0x3d, r28 ; 61
|
|
usart_txstr("\nIncorrect guess.\n");
|
|
aa2: 88 e9 ldi r24, 0x98 ; 152
|
|
aa4: 91 e0 ldi r25, 0x01 ; 1
|
|
aa6: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
|
|
beep(261.62, .2);
|
|
aaa: 2d ec ldi r18, 0xCD ; 205
|
|
aac: 3c ec ldi r19, 0xCC ; 204
|
|
aae: 4c e4 ldi r20, 0x4C ; 76
|
|
ab0: 5e e3 ldi r21, 0x3E ; 62
|
|
ab2: 6c e5 ldi r22, 0x5C ; 92
|
|
ab4: 7f ec ldi r23, 0xCF ; 207
|
|
ab6: 82 e8 ldi r24, 0x82 ; 130
|
|
ab8: 93 e4 ldi r25, 0x43 ; 67
|
|
aba: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
abe: 80 e0 ldi r24, 0x00 ; 0
|
|
ac0: 90 e0 ldi r25, 0x00 ; 0
|
|
ac2: a8 ec ldi r26, 0xC8 ; 200
|
|
ac4: b1 e4 ldi r27, 0x41 ; 65
|
|
ac6: 89 83 std Y+1, r24 ; 0x01
|
|
ac8: 9a 83 std Y+2, r25 ; 0x02
|
|
aca: ab 83 std Y+3, r26 ; 0x03
|
|
acc: bc 83 std Y+4, r27 ; 0x04
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
|
|
|
#else
|
|
uint16_t __ticks;
|
|
__tmp = ((F_CPU) / 4e3) * __ms;
|
|
ace: 20 e0 ldi r18, 0x00 ; 0
|
|
ad0: 30 e0 ldi r19, 0x00 ; 0
|
|
ad2: 4a e7 ldi r20, 0x7A ; 122
|
|
ad4: 55 e4 ldi r21, 0x45 ; 69
|
|
ad6: 69 81 ldd r22, Y+1 ; 0x01
|
|
ad8: 7a 81 ldd r23, Y+2 ; 0x02
|
|
ada: 8b 81 ldd r24, Y+3 ; 0x03
|
|
adc: 9c 81 ldd r25, Y+4 ; 0x04
|
|
ade: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
ae2: dc 01 movw r26, r24
|
|
ae4: cb 01 movw r24, r22
|
|
ae6: 8d 83 std Y+5, r24 ; 0x05
|
|
ae8: 9e 83 std Y+6, r25 ; 0x06
|
|
aea: af 83 std Y+7, r26 ; 0x07
|
|
aec: b8 87 std Y+8, r27 ; 0x08
|
|
if (__tmp < 1.0)
|
|
aee: 20 e0 ldi r18, 0x00 ; 0
|
|
af0: 30 e0 ldi r19, 0x00 ; 0
|
|
af2: 40 e8 ldi r20, 0x80 ; 128
|
|
af4: 5f e3 ldi r21, 0x3F ; 63
|
|
af6: 6d 81 ldd r22, Y+5 ; 0x05
|
|
af8: 7e 81 ldd r23, Y+6 ; 0x06
|
|
afa: 8f 81 ldd r24, Y+7 ; 0x07
|
|
afc: 98 85 ldd r25, Y+8 ; 0x08
|
|
afe: 0e 94 93 07 call 0xf26 ; 0xf26 <__cmpsf2>
|
|
b02: 88 23 and r24, r24
|
|
b04: 2c f4 brge .+10 ; 0xb10 <incorrect_beep+0x82>
|
|
__ticks = 1;
|
|
b06: 81 e0 ldi r24, 0x01 ; 1
|
|
b08: 90 e0 ldi r25, 0x00 ; 0
|
|
b0a: 9a 87 std Y+10, r25 ; 0x0a
|
|
b0c: 89 87 std Y+9, r24 ; 0x09
|
|
b0e: 3f c0 rjmp .+126 ; 0xb8e <incorrect_beep+0x100>
|
|
else if (__tmp > 65535)
|
|
b10: 20 e0 ldi r18, 0x00 ; 0
|
|
b12: 3f ef ldi r19, 0xFF ; 255
|
|
b14: 4f e7 ldi r20, 0x7F ; 127
|
|
b16: 57 e4 ldi r21, 0x47 ; 71
|
|
b18: 6d 81 ldd r22, Y+5 ; 0x05
|
|
b1a: 7e 81 ldd r23, Y+6 ; 0x06
|
|
b1c: 8f 81 ldd r24, Y+7 ; 0x07
|
|
b1e: 98 85 ldd r25, Y+8 ; 0x08
|
|
b20: 0e 94 33 09 call 0x1266 ; 0x1266 <__gesf2>
|
|
b24: 18 16 cp r1, r24
|
|
b26: 4c f5 brge .+82 ; 0xb7a <incorrect_beep+0xec>
|
|
{
|
|
// __ticks = requested delay in 1/10 ms
|
|
__ticks = (uint16_t) (__ms * 10.0);
|
|
b28: 20 e0 ldi r18, 0x00 ; 0
|
|
b2a: 30 e0 ldi r19, 0x00 ; 0
|
|
b2c: 40 e2 ldi r20, 0x20 ; 32
|
|
b2e: 51 e4 ldi r21, 0x41 ; 65
|
|
b30: 69 81 ldd r22, Y+1 ; 0x01
|
|
b32: 7a 81 ldd r23, Y+2 ; 0x02
|
|
b34: 8b 81 ldd r24, Y+3 ; 0x03
|
|
b36: 9c 81 ldd r25, Y+4 ; 0x04
|
|
b38: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
b3c: dc 01 movw r26, r24
|
|
b3e: cb 01 movw r24, r22
|
|
b40: bc 01 movw r22, r24
|
|
b42: cd 01 movw r24, r26
|
|
b44: 0e 94 11 08 call 0x1022 ; 0x1022 <__fixunssfsi>
|
|
b48: dc 01 movw r26, r24
|
|
b4a: cb 01 movw r24, r22
|
|
b4c: 9a 87 std Y+10, r25 ; 0x0a
|
|
b4e: 89 87 std Y+9, r24 ; 0x09
|
|
b50: 0f c0 rjmp .+30 ; 0xb70 <incorrect_beep+0xe2>
|
|
b52: 80 e9 ldi r24, 0x90 ; 144
|
|
b54: 91 e0 ldi r25, 0x01 ; 1
|
|
b56: 9c 87 std Y+12, r25 ; 0x0c
|
|
b58: 8b 87 std Y+11, r24 ; 0x0b
|
|
b5a: 8b 85 ldd r24, Y+11 ; 0x0b
|
|
b5c: 9c 85 ldd r25, Y+12 ; 0x0c
|
|
b5e: 01 97 sbiw r24, 0x01 ; 1
|
|
b60: f1 f7 brne .-4 ; 0xb5e <incorrect_beep+0xd0>
|
|
b62: 9c 87 std Y+12, r25 ; 0x0c
|
|
b64: 8b 87 std Y+11, r24 ; 0x0b
|
|
while(__ticks)
|
|
{
|
|
// wait 1/10 ms
|
|
_delay_loop_2(((F_CPU) / 4e3) / 10);
|
|
__ticks --;
|
|
b66: 89 85 ldd r24, Y+9 ; 0x09
|
|
b68: 9a 85 ldd r25, Y+10 ; 0x0a
|
|
b6a: 01 97 sbiw r24, 0x01 ; 1
|
|
b6c: 9a 87 std Y+10, r25 ; 0x0a
|
|
b6e: 89 87 std Y+9, r24 ; 0x09
|
|
__ticks = 1;
|
|
else if (__tmp > 65535)
|
|
{
|
|
// __ticks = requested delay in 1/10 ms
|
|
__ticks = (uint16_t) (__ms * 10.0);
|
|
while(__ticks)
|
|
b70: 89 85 ldd r24, Y+9 ; 0x09
|
|
b72: 9a 85 ldd r25, Y+10 ; 0x0a
|
|
b74: 89 2b or r24, r25
|
|
b76: 69 f7 brne .-38 ; 0xb52 <incorrect_beep+0xc4>
|
|
b78: 14 c0 rjmp .+40 ; 0xba2 <incorrect_beep+0x114>
|
|
__ticks --;
|
|
}
|
|
return;
|
|
}
|
|
else
|
|
__ticks = (uint16_t)__tmp;
|
|
b7a: 6d 81 ldd r22, Y+5 ; 0x05
|
|
b7c: 7e 81 ldd r23, Y+6 ; 0x06
|
|
b7e: 8f 81 ldd r24, Y+7 ; 0x07
|
|
b80: 98 85 ldd r25, Y+8 ; 0x08
|
|
b82: 0e 94 11 08 call 0x1022 ; 0x1022 <__fixunssfsi>
|
|
b86: dc 01 movw r26, r24
|
|
b88: cb 01 movw r24, r22
|
|
b8a: 9a 87 std Y+10, r25 ; 0x0a
|
|
b8c: 89 87 std Y+9, r24 ; 0x09
|
|
b8e: 89 85 ldd r24, Y+9 ; 0x09
|
|
b90: 9a 85 ldd r25, Y+10 ; 0x0a
|
|
b92: 9e 87 std Y+14, r25 ; 0x0e
|
|
b94: 8d 87 std Y+13, r24 ; 0x0d
|
|
b96: 8d 85 ldd r24, Y+13 ; 0x0d
|
|
b98: 9e 85 ldd r25, Y+14 ; 0x0e
|
|
b9a: 01 97 sbiw r24, 0x01 ; 1
|
|
b9c: f1 f7 brne .-4 ; 0xb9a <incorrect_beep+0x10c>
|
|
b9e: 9e 87 std Y+14, r25 ; 0x0e
|
|
ba0: 8d 87 std Y+13, r24 ; 0x0d
|
|
_delay_ms(25);
|
|
beep(261.62, .2);
|
|
ba2: 2d ec ldi r18, 0xCD ; 205
|
|
ba4: 3c ec ldi r19, 0xCC ; 204
|
|
ba6: 4c e4 ldi r20, 0x4C ; 76
|
|
ba8: 5e e3 ldi r21, 0x3E ; 62
|
|
baa: 6c e5 ldi r22, 0x5C ; 92
|
|
bac: 7f ec ldi r23, 0xCF ; 207
|
|
bae: 82 e8 ldi r24, 0x82 ; 130
|
|
bb0: 93 e4 ldi r25, 0x43 ; 67
|
|
bb2: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
}
|
|
bb6: 00 00 nop
|
|
bb8: 2e 96 adiw r28, 0x0e ; 14
|
|
bba: 0f b6 in r0, 0x3f ; 63
|
|
bbc: f8 94 cli
|
|
bbe: de bf out 0x3e, r29 ; 62
|
|
bc0: 0f be out 0x3f, r0 ; 63
|
|
bc2: cd bf out 0x3d, r28 ; 61
|
|
bc4: df 91 pop r29
|
|
bc6: cf 91 pop r28
|
|
bc8: 08 95 ret
|
|
|
|
00000bca <win>:
|
|
|
|
void win() {
|
|
bca: cf 93 push r28
|
|
bcc: df 93 push r29
|
|
bce: cd b7 in r28, 0x3d ; 61
|
|
bd0: de b7 in r29, 0x3e ; 62
|
|
usart_txstr("\nYou beat the game!\n");
|
|
bd2: 8b ea ldi r24, 0xAB ; 171
|
|
bd4: 91 e0 ldi r25, 0x01 ; 1
|
|
bd6: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
|
|
beep(262., .5);
|
|
bda: 20 e0 ldi r18, 0x00 ; 0
|
|
bdc: 30 e0 ldi r19, 0x00 ; 0
|
|
bde: 40 e0 ldi r20, 0x00 ; 0
|
|
be0: 5f e3 ldi r21, 0x3F ; 63
|
|
be2: 60 e0 ldi r22, 0x00 ; 0
|
|
be4: 70 e0 ldi r23, 0x00 ; 0
|
|
be6: 83 e8 ldi r24, 0x83 ; 131
|
|
be8: 93 e4 ldi r25, 0x43 ; 67
|
|
bea: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
beep(392., .5);
|
|
bee: 20 e0 ldi r18, 0x00 ; 0
|
|
bf0: 30 e0 ldi r19, 0x00 ; 0
|
|
bf2: 40 e0 ldi r20, 0x00 ; 0
|
|
bf4: 5f e3 ldi r21, 0x3F ; 63
|
|
bf6: 60 e0 ldi r22, 0x00 ; 0
|
|
bf8: 70 e0 ldi r23, 0x00 ; 0
|
|
bfa: 84 ec ldi r24, 0xC4 ; 196
|
|
bfc: 93 e4 ldi r25, 0x43 ; 67
|
|
bfe: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
}
|
|
c02: 00 00 nop
|
|
c04: df 91 pop r29
|
|
c06: cf 91 pop r28
|
|
c08: 08 95 ret
|
|
|
|
00000c0a <loose>:
|
|
|
|
void loose() {
|
|
c0a: cf 93 push r28
|
|
c0c: df 93 push r29
|
|
c0e: cd b7 in r28, 0x3d ; 61
|
|
c10: de b7 in r29, 0x3e ; 62
|
|
usart_txstr("\nYou loose, try again?\n");
|
|
c12: 80 ec ldi r24, 0xC0 ; 192
|
|
c14: 91 e0 ldi r25, 0x01 ; 1
|
|
c16: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
|
|
beep(330., .5);
|
|
c1a: 20 e0 ldi r18, 0x00 ; 0
|
|
c1c: 30 e0 ldi r19, 0x00 ; 0
|
|
c1e: 40 e0 ldi r20, 0x00 ; 0
|
|
c20: 5f e3 ldi r21, 0x3F ; 63
|
|
c22: 60 e0 ldi r22, 0x00 ; 0
|
|
c24: 70 e0 ldi r23, 0x00 ; 0
|
|
c26: 85 ea ldi r24, 0xA5 ; 165
|
|
c28: 93 e4 ldi r25, 0x43 ; 67
|
|
c2a: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
beep(294., .5);
|
|
c2e: 20 e0 ldi r18, 0x00 ; 0
|
|
c30: 30 e0 ldi r19, 0x00 ; 0
|
|
c32: 40 e0 ldi r20, 0x00 ; 0
|
|
c34: 5f e3 ldi r21, 0x3F ; 63
|
|
c36: 60 e0 ldi r22, 0x00 ; 0
|
|
c38: 70 e0 ldi r23, 0x00 ; 0
|
|
c3a: 83 e9 ldi r24, 0x93 ; 147
|
|
c3c: 93 e4 ldi r25, 0x43 ; 67
|
|
c3e: 0e 94 25 06 call 0xc4a ; 0xc4a <beep>
|
|
}
|
|
c42: 00 00 nop
|
|
c44: df 91 pop r29
|
|
c46: cf 91 pop r28
|
|
c48: 08 95 ret
|
|
|
|
00000c4a <beep>:
|
|
|
|
|
|
//TODO move somewhere else
|
|
void beep(double frequency, double durientation) {
|
|
c4a: cf 93 push r28
|
|
c4c: df 93 push r29
|
|
c4e: cd b7 in r28, 0x3d ; 61
|
|
c50: de b7 in r29, 0x3e ; 62
|
|
c52: 6e 97 sbiw r28, 0x1e ; 30
|
|
c54: 0f b6 in r0, 0x3f ; 63
|
|
c56: f8 94 cli
|
|
c58: de bf out 0x3e, r29 ; 62
|
|
c5a: 0f be out 0x3f, r0 ; 63
|
|
c5c: cd bf out 0x3d, r28 ; 61
|
|
c5e: 6f 8b std Y+23, r22 ; 0x17
|
|
c60: 78 8f std Y+24, r23 ; 0x18
|
|
c62: 89 8f std Y+25, r24 ; 0x19
|
|
c64: 9a 8f std Y+26, r25 ; 0x1a
|
|
c66: 2b 8f std Y+27, r18 ; 0x1b
|
|
c68: 3c 8f std Y+28, r19 ; 0x1c
|
|
c6a: 4d 8f std Y+29, r20 ; 0x1d
|
|
c6c: 5e 8f std Y+30, r21 ; 0x1e
|
|
double speaker_ms = ((1.0 / frequency) / 2.0) * 1000.0; //TODO clean up
|
|
c6e: 2f 89 ldd r18, Y+23 ; 0x17
|
|
c70: 38 8d ldd r19, Y+24 ; 0x18
|
|
c72: 49 8d ldd r20, Y+25 ; 0x19
|
|
c74: 5a 8d ldd r21, Y+26 ; 0x1a
|
|
c76: 60 e0 ldi r22, 0x00 ; 0
|
|
c78: 70 e0 ldi r23, 0x00 ; 0
|
|
c7a: 80 e8 ldi r24, 0x80 ; 128
|
|
c7c: 9f e3 ldi r25, 0x3F ; 63
|
|
c7e: 0e 94 98 07 call 0xf30 ; 0xf30 <__divsf3>
|
|
c82: dc 01 movw r26, r24
|
|
c84: cb 01 movw r24, r22
|
|
c86: 20 e0 ldi r18, 0x00 ; 0
|
|
c88: 30 e0 ldi r19, 0x00 ; 0
|
|
c8a: 40 e0 ldi r20, 0x00 ; 0
|
|
c8c: 50 e4 ldi r21, 0x40 ; 64
|
|
c8e: bc 01 movw r22, r24
|
|
c90: cd 01 movw r24, r26
|
|
c92: 0e 94 98 07 call 0xf30 ; 0xf30 <__divsf3>
|
|
c96: dc 01 movw r26, r24
|
|
c98: cb 01 movw r24, r22
|
|
c9a: 20 e0 ldi r18, 0x00 ; 0
|
|
c9c: 30 e0 ldi r19, 0x00 ; 0
|
|
c9e: 4a e7 ldi r20, 0x7A ; 122
|
|
ca0: 54 e4 ldi r21, 0x44 ; 68
|
|
ca2: bc 01 movw r22, r24
|
|
ca4: cd 01 movw r24, r26
|
|
ca6: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
caa: dc 01 movw r26, r24
|
|
cac: cb 01 movw r24, r22
|
|
cae: 8b 83 std Y+3, r24 ; 0x03
|
|
cb0: 9c 83 std Y+4, r25 ; 0x04
|
|
cb2: ad 83 std Y+5, r26 ; 0x05
|
|
cb4: be 83 std Y+6, r27 ; 0x06
|
|
int loop_count = durientation / (1.0 / frequency);
|
|
cb6: 2f 89 ldd r18, Y+23 ; 0x17
|
|
cb8: 38 8d ldd r19, Y+24 ; 0x18
|
|
cba: 49 8d ldd r20, Y+25 ; 0x19
|
|
cbc: 5a 8d ldd r21, Y+26 ; 0x1a
|
|
cbe: 60 e0 ldi r22, 0x00 ; 0
|
|
cc0: 70 e0 ldi r23, 0x00 ; 0
|
|
cc2: 80 e8 ldi r24, 0x80 ; 128
|
|
cc4: 9f e3 ldi r25, 0x3F ; 63
|
|
cc6: 0e 94 98 07 call 0xf30 ; 0xf30 <__divsf3>
|
|
cca: dc 01 movw r26, r24
|
|
ccc: cb 01 movw r24, r22
|
|
cce: 9c 01 movw r18, r24
|
|
cd0: ad 01 movw r20, r26
|
|
cd2: 6b 8d ldd r22, Y+27 ; 0x1b
|
|
cd4: 7c 8d ldd r23, Y+28 ; 0x1c
|
|
cd6: 8d 8d ldd r24, Y+29 ; 0x1d
|
|
cd8: 9e 8d ldd r25, Y+30 ; 0x1e
|
|
cda: 0e 94 98 07 call 0xf30 ; 0xf30 <__divsf3>
|
|
cde: dc 01 movw r26, r24
|
|
ce0: cb 01 movw r24, r22
|
|
ce2: bc 01 movw r22, r24
|
|
ce4: cd 01 movw r24, r26
|
|
ce6: 0e 94 0a 08 call 0x1014 ; 0x1014 <__fixsfsi>
|
|
cea: dc 01 movw r26, r24
|
|
cec: cb 01 movw r24, r22
|
|
cee: 98 87 std Y+8, r25 ; 0x08
|
|
cf0: 8f 83 std Y+7, r24 ; 0x07
|
|
for(unsigned int i = 0; i < loop_count; i++) {
|
|
cf2: 1a 82 std Y+2, r1 ; 0x02
|
|
cf4: 19 82 std Y+1, r1 ; 0x01
|
|
cf6: 81 c0 rjmp .+258 ; 0xdfa <beep+0x1b0>
|
|
cf8: 8b 81 ldd r24, Y+3 ; 0x03
|
|
cfa: 9c 81 ldd r25, Y+4 ; 0x04
|
|
cfc: ad 81 ldd r26, Y+5 ; 0x05
|
|
cfe: be 81 ldd r27, Y+6 ; 0x06
|
|
d00: 89 87 std Y+9, r24 ; 0x09
|
|
d02: 9a 87 std Y+10, r25 ; 0x0a
|
|
d04: ab 87 std Y+11, r26 ; 0x0b
|
|
d06: bc 87 std Y+12, r27 ; 0x0c
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
|
|
|
#else
|
|
uint16_t __ticks;
|
|
__tmp = ((F_CPU) / 4e3) * __ms;
|
|
d08: 20 e0 ldi r18, 0x00 ; 0
|
|
d0a: 30 e0 ldi r19, 0x00 ; 0
|
|
d0c: 4a e7 ldi r20, 0x7A ; 122
|
|
d0e: 55 e4 ldi r21, 0x45 ; 69
|
|
d10: 69 85 ldd r22, Y+9 ; 0x09
|
|
d12: 7a 85 ldd r23, Y+10 ; 0x0a
|
|
d14: 8b 85 ldd r24, Y+11 ; 0x0b
|
|
d16: 9c 85 ldd r25, Y+12 ; 0x0c
|
|
d18: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
d1c: dc 01 movw r26, r24
|
|
d1e: cb 01 movw r24, r22
|
|
d20: 8d 87 std Y+13, r24 ; 0x0d
|
|
d22: 9e 87 std Y+14, r25 ; 0x0e
|
|
d24: af 87 std Y+15, r26 ; 0x0f
|
|
d26: b8 8b std Y+16, r27 ; 0x10
|
|
if (__tmp < 1.0)
|
|
d28: 20 e0 ldi r18, 0x00 ; 0
|
|
d2a: 30 e0 ldi r19, 0x00 ; 0
|
|
d2c: 40 e8 ldi r20, 0x80 ; 128
|
|
d2e: 5f e3 ldi r21, 0x3F ; 63
|
|
d30: 6d 85 ldd r22, Y+13 ; 0x0d
|
|
d32: 7e 85 ldd r23, Y+14 ; 0x0e
|
|
d34: 8f 85 ldd r24, Y+15 ; 0x0f
|
|
d36: 98 89 ldd r25, Y+16 ; 0x10
|
|
d38: 0e 94 93 07 call 0xf26 ; 0xf26 <__cmpsf2>
|
|
d3c: 88 23 and r24, r24
|
|
d3e: 2c f4 brge .+10 ; 0xd4a <beep+0x100>
|
|
__ticks = 1;
|
|
d40: 81 e0 ldi r24, 0x01 ; 1
|
|
d42: 90 e0 ldi r25, 0x00 ; 0
|
|
d44: 9a 8b std Y+18, r25 ; 0x12
|
|
d46: 89 8b std Y+17, r24 ; 0x11
|
|
d48: 3f c0 rjmp .+126 ; 0xdc8 <beep+0x17e>
|
|
else if (__tmp > 65535)
|
|
d4a: 20 e0 ldi r18, 0x00 ; 0
|
|
d4c: 3f ef ldi r19, 0xFF ; 255
|
|
d4e: 4f e7 ldi r20, 0x7F ; 127
|
|
d50: 57 e4 ldi r21, 0x47 ; 71
|
|
d52: 6d 85 ldd r22, Y+13 ; 0x0d
|
|
d54: 7e 85 ldd r23, Y+14 ; 0x0e
|
|
d56: 8f 85 ldd r24, Y+15 ; 0x0f
|
|
d58: 98 89 ldd r25, Y+16 ; 0x10
|
|
d5a: 0e 94 33 09 call 0x1266 ; 0x1266 <__gesf2>
|
|
d5e: 18 16 cp r1, r24
|
|
d60: 4c f5 brge .+82 ; 0xdb4 <beep+0x16a>
|
|
{
|
|
// __ticks = requested delay in 1/10 ms
|
|
__ticks = (uint16_t) (__ms * 10.0);
|
|
d62: 20 e0 ldi r18, 0x00 ; 0
|
|
d64: 30 e0 ldi r19, 0x00 ; 0
|
|
d66: 40 e2 ldi r20, 0x20 ; 32
|
|
d68: 51 e4 ldi r21, 0x41 ; 65
|
|
d6a: 69 85 ldd r22, Y+9 ; 0x09
|
|
d6c: 7a 85 ldd r23, Y+10 ; 0x0a
|
|
d6e: 8b 85 ldd r24, Y+11 ; 0x0b
|
|
d70: 9c 85 ldd r25, Y+12 ; 0x0c
|
|
d72: 0e 94 38 09 call 0x1270 ; 0x1270 <__mulsf3>
|
|
d76: dc 01 movw r26, r24
|
|
d78: cb 01 movw r24, r22
|
|
d7a: bc 01 movw r22, r24
|
|
d7c: cd 01 movw r24, r26
|
|
d7e: 0e 94 11 08 call 0x1022 ; 0x1022 <__fixunssfsi>
|
|
d82: dc 01 movw r26, r24
|
|
d84: cb 01 movw r24, r22
|
|
d86: 9a 8b std Y+18, r25 ; 0x12
|
|
d88: 89 8b std Y+17, r24 ; 0x11
|
|
d8a: 0f c0 rjmp .+30 ; 0xdaa <beep+0x160>
|
|
d8c: 80 e9 ldi r24, 0x90 ; 144
|
|
d8e: 91 e0 ldi r25, 0x01 ; 1
|
|
d90: 9c 8b std Y+20, r25 ; 0x14
|
|
d92: 8b 8b std Y+19, r24 ; 0x13
|
|
d94: 8b 89 ldd r24, Y+19 ; 0x13
|
|
d96: 9c 89 ldd r25, Y+20 ; 0x14
|
|
d98: 01 97 sbiw r24, 0x01 ; 1
|
|
d9a: f1 f7 brne .-4 ; 0xd98 <beep+0x14e>
|
|
d9c: 9c 8b std Y+20, r25 ; 0x14
|
|
d9e: 8b 8b std Y+19, r24 ; 0x13
|
|
while(__ticks)
|
|
{
|
|
// wait 1/10 ms
|
|
_delay_loop_2(((F_CPU) / 4e3) / 10);
|
|
__ticks --;
|
|
da0: 89 89 ldd r24, Y+17 ; 0x11
|
|
da2: 9a 89 ldd r25, Y+18 ; 0x12
|
|
da4: 01 97 sbiw r24, 0x01 ; 1
|
|
da6: 9a 8b std Y+18, r25 ; 0x12
|
|
da8: 89 8b std Y+17, r24 ; 0x11
|
|
__ticks = 1;
|
|
else if (__tmp > 65535)
|
|
{
|
|
// __ticks = requested delay in 1/10 ms
|
|
__ticks = (uint16_t) (__ms * 10.0);
|
|
while(__ticks)
|
|
daa: 89 89 ldd r24, Y+17 ; 0x11
|
|
dac: 9a 89 ldd r25, Y+18 ; 0x12
|
|
dae: 89 2b or r24, r25
|
|
db0: 69 f7 brne .-38 ; 0xd8c <beep+0x142>
|
|
db2: 14 c0 rjmp .+40 ; 0xddc <beep+0x192>
|
|
__ticks --;
|
|
}
|
|
return;
|
|
}
|
|
else
|
|
__ticks = (uint16_t)__tmp;
|
|
db4: 6d 85 ldd r22, Y+13 ; 0x0d
|
|
db6: 7e 85 ldd r23, Y+14 ; 0x0e
|
|
db8: 8f 85 ldd r24, Y+15 ; 0x0f
|
|
dba: 98 89 ldd r25, Y+16 ; 0x10
|
|
dbc: 0e 94 11 08 call 0x1022 ; 0x1022 <__fixunssfsi>
|
|
dc0: dc 01 movw r26, r24
|
|
dc2: cb 01 movw r24, r22
|
|
dc4: 9a 8b std Y+18, r25 ; 0x12
|
|
dc6: 89 8b std Y+17, r24 ; 0x11
|
|
dc8: 89 89 ldd r24, Y+17 ; 0x11
|
|
dca: 9a 89 ldd r25, Y+18 ; 0x12
|
|
dcc: 9e 8b std Y+22, r25 ; 0x16
|
|
dce: 8d 8b std Y+21, r24 ; 0x15
|
|
dd0: 8d 89 ldd r24, Y+21 ; 0x15
|
|
dd2: 9e 89 ldd r25, Y+22 ; 0x16
|
|
dd4: 01 97 sbiw r24, 0x01 ; 1
|
|
dd6: f1 f7 brne .-4 ; 0xdd4 <beep+0x18a>
|
|
dd8: 9e 8b std Y+22, r25 ; 0x16
|
|
dda: 8d 8b std Y+21, r24 ; 0x15
|
|
_delay_ms(speaker_ms);
|
|
SPEAKER_PORT ^= (1 << SPEAKER_PIN);
|
|
ddc: 8e e2 ldi r24, 0x2E ; 46
|
|
dde: 90 e0 ldi r25, 0x00 ; 0
|
|
de0: 2e e2 ldi r18, 0x2E ; 46
|
|
de2: 30 e0 ldi r19, 0x00 ; 0
|
|
de4: f9 01 movw r30, r18
|
|
de6: 30 81 ld r19, Z
|
|
de8: 20 e1 ldi r18, 0x10 ; 16
|
|
dea: 23 27 eor r18, r19
|
|
dec: fc 01 movw r30, r24
|
|
dee: 20 83 st Z, r18
|
|
|
|
//TODO move somewhere else
|
|
void beep(double frequency, double durientation) {
|
|
double speaker_ms = ((1.0 / frequency) / 2.0) * 1000.0; //TODO clean up
|
|
int loop_count = durientation / (1.0 / frequency);
|
|
for(unsigned int i = 0; i < loop_count; i++) {
|
|
df0: 89 81 ldd r24, Y+1 ; 0x01
|
|
df2: 9a 81 ldd r25, Y+2 ; 0x02
|
|
df4: 01 96 adiw r24, 0x01 ; 1
|
|
df6: 9a 83 std Y+2, r25 ; 0x02
|
|
df8: 89 83 std Y+1, r24 ; 0x01
|
|
dfa: 8f 81 ldd r24, Y+7 ; 0x07
|
|
dfc: 98 85 ldd r25, Y+8 ; 0x08
|
|
dfe: 29 81 ldd r18, Y+1 ; 0x01
|
|
e00: 3a 81 ldd r19, Y+2 ; 0x02
|
|
e02: 28 17 cp r18, r24
|
|
e04: 39 07 cpc r19, r25
|
|
e06: 08 f4 brcc .+2 ; 0xe0a <beep+0x1c0>
|
|
e08: 77 cf rjmp .-274 ; 0xcf8 <beep+0xae>
|
|
_delay_ms(speaker_ms);
|
|
SPEAKER_PORT ^= (1 << SPEAKER_PIN);
|
|
}
|
|
e0a: 00 00 nop
|
|
e0c: 6e 96 adiw r28, 0x1e ; 30
|
|
e0e: 0f b6 in r0, 0x3f ; 63
|
|
e10: f8 94 cli
|
|
e12: de bf out 0x3e, r29 ; 62
|
|
e14: 0f be out 0x3f, r0 ; 63
|
|
e16: cd bf out 0x3d, r28 ; 61
|
|
e18: df 91 pop r29
|
|
e1a: cf 91 pop r28
|
|
e1c: 08 95 ret
|
|
|
|
00000e1e <__subsf3>:
|
|
e1e: 50 58 subi r21, 0x80 ; 128
|
|
|
|
00000e20 <__addsf3>:
|
|
e20: bb 27 eor r27, r27
|
|
e22: aa 27 eor r26, r26
|
|
e24: 0e 94 27 07 call 0xe4e ; 0xe4e <__addsf3x>
|
|
e28: 0c 94 e1 08 jmp 0x11c2 ; 0x11c2 <__fp_round>
|
|
e2c: 0e 94 d3 08 call 0x11a6 ; 0x11a6 <__fp_pscA>
|
|
e30: 38 f0 brcs .+14 ; 0xe40 <__addsf3+0x20>
|
|
e32: 0e 94 da 08 call 0x11b4 ; 0x11b4 <__fp_pscB>
|
|
e36: 20 f0 brcs .+8 ; 0xe40 <__addsf3+0x20>
|
|
e38: 39 f4 brne .+14 ; 0xe48 <__addsf3+0x28>
|
|
e3a: 9f 3f cpi r25, 0xFF ; 255
|
|
e3c: 19 f4 brne .+6 ; 0xe44 <__addsf3+0x24>
|
|
e3e: 26 f4 brtc .+8 ; 0xe48 <__addsf3+0x28>
|
|
e40: 0c 94 d0 08 jmp 0x11a0 ; 0x11a0 <__fp_nan>
|
|
e44: 0e f4 brtc .+2 ; 0xe48 <__addsf3+0x28>
|
|
e46: e0 95 com r30
|
|
e48: e7 fb bst r30, 7
|
|
e4a: 0c 94 a1 08 jmp 0x1142 ; 0x1142 <__fp_inf>
|
|
|
|
00000e4e <__addsf3x>:
|
|
e4e: e9 2f mov r30, r25
|
|
e50: 0e 94 f2 08 call 0x11e4 ; 0x11e4 <__fp_split3>
|
|
e54: 58 f3 brcs .-42 ; 0xe2c <__addsf3+0xc>
|
|
e56: ba 17 cp r27, r26
|
|
e58: 62 07 cpc r22, r18
|
|
e5a: 73 07 cpc r23, r19
|
|
e5c: 84 07 cpc r24, r20
|
|
e5e: 95 07 cpc r25, r21
|
|
e60: 20 f0 brcs .+8 ; 0xe6a <__addsf3x+0x1c>
|
|
e62: 79 f4 brne .+30 ; 0xe82 <__addsf3x+0x34>
|
|
e64: a6 f5 brtc .+104 ; 0xece <__addsf3x+0x80>
|
|
e66: 0c 94 2c 09 jmp 0x1258 ; 0x1258 <__fp_zero>
|
|
e6a: 0e f4 brtc .+2 ; 0xe6e <__addsf3x+0x20>
|
|
e6c: e0 95 com r30
|
|
e6e: 0b 2e mov r0, r27
|
|
e70: ba 2f mov r27, r26
|
|
e72: a0 2d mov r26, r0
|
|
e74: 0b 01 movw r0, r22
|
|
e76: b9 01 movw r22, r18
|
|
e78: 90 01 movw r18, r0
|
|
e7a: 0c 01 movw r0, r24
|
|
e7c: ca 01 movw r24, r20
|
|
e7e: a0 01 movw r20, r0
|
|
e80: 11 24 eor r1, r1
|
|
e82: ff 27 eor r31, r31
|
|
e84: 59 1b sub r21, r25
|
|
e86: 99 f0 breq .+38 ; 0xeae <__addsf3x+0x60>
|
|
e88: 59 3f cpi r21, 0xF9 ; 249
|
|
e8a: 50 f4 brcc .+20 ; 0xea0 <__addsf3x+0x52>
|
|
e8c: 50 3e cpi r21, 0xE0 ; 224
|
|
e8e: 68 f1 brcs .+90 ; 0xeea <__addsf3x+0x9c>
|
|
e90: 1a 16 cp r1, r26
|
|
e92: f0 40 sbci r31, 0x00 ; 0
|
|
e94: a2 2f mov r26, r18
|
|
e96: 23 2f mov r18, r19
|
|
e98: 34 2f mov r19, r20
|
|
e9a: 44 27 eor r20, r20
|
|
e9c: 58 5f subi r21, 0xF8 ; 248
|
|
e9e: f3 cf rjmp .-26 ; 0xe86 <__addsf3x+0x38>
|
|
ea0: 46 95 lsr r20
|
|
ea2: 37 95 ror r19
|
|
ea4: 27 95 ror r18
|
|
ea6: a7 95 ror r26
|
|
ea8: f0 40 sbci r31, 0x00 ; 0
|
|
eaa: 53 95 inc r21
|
|
eac: c9 f7 brne .-14 ; 0xea0 <__addsf3x+0x52>
|
|
eae: 7e f4 brtc .+30 ; 0xece <__addsf3x+0x80>
|
|
eb0: 1f 16 cp r1, r31
|
|
eb2: ba 0b sbc r27, r26
|
|
eb4: 62 0b sbc r22, r18
|
|
eb6: 73 0b sbc r23, r19
|
|
eb8: 84 0b sbc r24, r20
|
|
eba: ba f0 brmi .+46 ; 0xeea <__addsf3x+0x9c>
|
|
ebc: 91 50 subi r25, 0x01 ; 1
|
|
ebe: a1 f0 breq .+40 ; 0xee8 <__addsf3x+0x9a>
|
|
ec0: ff 0f add r31, r31
|
|
ec2: bb 1f adc r27, r27
|
|
ec4: 66 1f adc r22, r22
|
|
ec6: 77 1f adc r23, r23
|
|
ec8: 88 1f adc r24, r24
|
|
eca: c2 f7 brpl .-16 ; 0xebc <__addsf3x+0x6e>
|
|
ecc: 0e c0 rjmp .+28 ; 0xeea <__addsf3x+0x9c>
|
|
ece: ba 0f add r27, r26
|
|
ed0: 62 1f adc r22, r18
|
|
ed2: 73 1f adc r23, r19
|
|
ed4: 84 1f adc r24, r20
|
|
ed6: 48 f4 brcc .+18 ; 0xeea <__addsf3x+0x9c>
|
|
ed8: 87 95 ror r24
|
|
eda: 77 95 ror r23
|
|
edc: 67 95 ror r22
|
|
ede: b7 95 ror r27
|
|
ee0: f7 95 ror r31
|
|
ee2: 9e 3f cpi r25, 0xFE ; 254
|
|
ee4: 08 f0 brcs .+2 ; 0xee8 <__addsf3x+0x9a>
|
|
ee6: b0 cf rjmp .-160 ; 0xe48 <__addsf3+0x28>
|
|
ee8: 93 95 inc r25
|
|
eea: 88 0f add r24, r24
|
|
eec: 08 f0 brcs .+2 ; 0xef0 <__addsf3x+0xa2>
|
|
eee: 99 27 eor r25, r25
|
|
ef0: ee 0f add r30, r30
|
|
ef2: 97 95 ror r25
|
|
ef4: 87 95 ror r24
|
|
ef6: 08 95 ret
|
|
|
|
00000ef8 <ceil>:
|
|
ef8: 0e 94 14 09 call 0x1228 ; 0x1228 <__fp_trunc>
|
|
efc: 90 f0 brcs .+36 ; 0xf22 <ceil+0x2a>
|
|
efe: 9f 37 cpi r25, 0x7F ; 127
|
|
f00: 48 f4 brcc .+18 ; 0xf14 <ceil+0x1c>
|
|
f02: 91 11 cpse r25, r1
|
|
f04: 16 f4 brtc .+4 ; 0xf0a <ceil+0x12>
|
|
f06: 0c 94 2d 09 jmp 0x125a ; 0x125a <__fp_szero>
|
|
f0a: 60 e0 ldi r22, 0x00 ; 0
|
|
f0c: 70 e0 ldi r23, 0x00 ; 0
|
|
f0e: 80 e8 ldi r24, 0x80 ; 128
|
|
f10: 9f e3 ldi r25, 0x3F ; 63
|
|
f12: 08 95 ret
|
|
f14: 26 f0 brts .+8 ; 0xf1e <ceil+0x26>
|
|
f16: 1b 16 cp r1, r27
|
|
f18: 61 1d adc r22, r1
|
|
f1a: 71 1d adc r23, r1
|
|
f1c: 81 1d adc r24, r1
|
|
f1e: 0c 94 a7 08 jmp 0x114e ; 0x114e <__fp_mintl>
|
|
f22: 0c 94 c2 08 jmp 0x1184 ; 0x1184 <__fp_mpack>
|
|
|
|
00000f26 <__cmpsf2>:
|
|
f26: 0e 94 7d 08 call 0x10fa ; 0x10fa <__fp_cmp>
|
|
f2a: 08 f4 brcc .+2 ; 0xf2e <__cmpsf2+0x8>
|
|
f2c: 81 e0 ldi r24, 0x01 ; 1
|
|
f2e: 08 95 ret
|
|
|
|
00000f30 <__divsf3>:
|
|
f30: 0e 94 ac 07 call 0xf58 ; 0xf58 <__divsf3x>
|
|
f34: 0c 94 e1 08 jmp 0x11c2 ; 0x11c2 <__fp_round>
|
|
f38: 0e 94 da 08 call 0x11b4 ; 0x11b4 <__fp_pscB>
|
|
f3c: 58 f0 brcs .+22 ; 0xf54 <__divsf3+0x24>
|
|
f3e: 0e 94 d3 08 call 0x11a6 ; 0x11a6 <__fp_pscA>
|
|
f42: 40 f0 brcs .+16 ; 0xf54 <__divsf3+0x24>
|
|
f44: 29 f4 brne .+10 ; 0xf50 <__divsf3+0x20>
|
|
f46: 5f 3f cpi r21, 0xFF ; 255
|
|
f48: 29 f0 breq .+10 ; 0xf54 <__divsf3+0x24>
|
|
f4a: 0c 94 a1 08 jmp 0x1142 ; 0x1142 <__fp_inf>
|
|
f4e: 51 11 cpse r21, r1
|
|
f50: 0c 94 2d 09 jmp 0x125a ; 0x125a <__fp_szero>
|
|
f54: 0c 94 d0 08 jmp 0x11a0 ; 0x11a0 <__fp_nan>
|
|
|
|
00000f58 <__divsf3x>:
|
|
f58: 0e 94 f2 08 call 0x11e4 ; 0x11e4 <__fp_split3>
|
|
f5c: 68 f3 brcs .-38 ; 0xf38 <__divsf3+0x8>
|
|
|
|
00000f5e <__divsf3_pse>:
|
|
f5e: 99 23 and r25, r25
|
|
f60: b1 f3 breq .-20 ; 0xf4e <__divsf3+0x1e>
|
|
f62: 55 23 and r21, r21
|
|
f64: 91 f3 breq .-28 ; 0xf4a <__divsf3+0x1a>
|
|
f66: 95 1b sub r25, r21
|
|
f68: 55 0b sbc r21, r21
|
|
f6a: bb 27 eor r27, r27
|
|
f6c: aa 27 eor r26, r26
|
|
f6e: 62 17 cp r22, r18
|
|
f70: 73 07 cpc r23, r19
|
|
f72: 84 07 cpc r24, r20
|
|
f74: 38 f0 brcs .+14 ; 0xf84 <__divsf3_pse+0x26>
|
|
f76: 9f 5f subi r25, 0xFF ; 255
|
|
f78: 5f 4f sbci r21, 0xFF ; 255
|
|
f7a: 22 0f add r18, r18
|
|
f7c: 33 1f adc r19, r19
|
|
f7e: 44 1f adc r20, r20
|
|
f80: aa 1f adc r26, r26
|
|
f82: a9 f3 breq .-22 ; 0xf6e <__divsf3_pse+0x10>
|
|
f84: 35 d0 rcall .+106 ; 0xff0 <__divsf3_pse+0x92>
|
|
f86: 0e 2e mov r0, r30
|
|
f88: 3a f0 brmi .+14 ; 0xf98 <__divsf3_pse+0x3a>
|
|
f8a: e0 e8 ldi r30, 0x80 ; 128
|
|
f8c: 32 d0 rcall .+100 ; 0xff2 <__divsf3_pse+0x94>
|
|
f8e: 91 50 subi r25, 0x01 ; 1
|
|
f90: 50 40 sbci r21, 0x00 ; 0
|
|
f92: e6 95 lsr r30
|
|
f94: 00 1c adc r0, r0
|
|
f96: ca f7 brpl .-14 ; 0xf8a <__divsf3_pse+0x2c>
|
|
f98: 2b d0 rcall .+86 ; 0xff0 <__divsf3_pse+0x92>
|
|
f9a: fe 2f mov r31, r30
|
|
f9c: 29 d0 rcall .+82 ; 0xff0 <__divsf3_pse+0x92>
|
|
f9e: 66 0f add r22, r22
|
|
fa0: 77 1f adc r23, r23
|
|
fa2: 88 1f adc r24, r24
|
|
fa4: bb 1f adc r27, r27
|
|
fa6: 26 17 cp r18, r22
|
|
fa8: 37 07 cpc r19, r23
|
|
faa: 48 07 cpc r20, r24
|
|
fac: ab 07 cpc r26, r27
|
|
fae: b0 e8 ldi r27, 0x80 ; 128
|
|
fb0: 09 f0 breq .+2 ; 0xfb4 <__divsf3_pse+0x56>
|
|
fb2: bb 0b sbc r27, r27
|
|
fb4: 80 2d mov r24, r0
|
|
fb6: bf 01 movw r22, r30
|
|
fb8: ff 27 eor r31, r31
|
|
fba: 93 58 subi r25, 0x83 ; 131
|
|
fbc: 5f 4f sbci r21, 0xFF ; 255
|
|
fbe: 3a f0 brmi .+14 ; 0xfce <__divsf3_pse+0x70>
|
|
fc0: 9e 3f cpi r25, 0xFE ; 254
|
|
fc2: 51 05 cpc r21, r1
|
|
fc4: 78 f0 brcs .+30 ; 0xfe4 <__divsf3_pse+0x86>
|
|
fc6: 0c 94 a1 08 jmp 0x1142 ; 0x1142 <__fp_inf>
|
|
fca: 0c 94 2d 09 jmp 0x125a ; 0x125a <__fp_szero>
|
|
fce: 5f 3f cpi r21, 0xFF ; 255
|
|
fd0: e4 f3 brlt .-8 ; 0xfca <__divsf3_pse+0x6c>
|
|
fd2: 98 3e cpi r25, 0xE8 ; 232
|
|
fd4: d4 f3 brlt .-12 ; 0xfca <__divsf3_pse+0x6c>
|
|
fd6: 86 95 lsr r24
|
|
fd8: 77 95 ror r23
|
|
fda: 67 95 ror r22
|
|
fdc: b7 95 ror r27
|
|
fde: f7 95 ror r31
|
|
fe0: 9f 5f subi r25, 0xFF ; 255
|
|
fe2: c9 f7 brne .-14 ; 0xfd6 <__divsf3_pse+0x78>
|
|
fe4: 88 0f add r24, r24
|
|
fe6: 91 1d adc r25, r1
|
|
fe8: 96 95 lsr r25
|
|
fea: 87 95 ror r24
|
|
fec: 97 f9 bld r25, 7
|
|
fee: 08 95 ret
|
|
ff0: e1 e0 ldi r30, 0x01 ; 1
|
|
ff2: 66 0f add r22, r22
|
|
ff4: 77 1f adc r23, r23
|
|
ff6: 88 1f adc r24, r24
|
|
ff8: bb 1f adc r27, r27
|
|
ffa: 62 17 cp r22, r18
|
|
ffc: 73 07 cpc r23, r19
|
|
ffe: 84 07 cpc r24, r20
|
|
1000: ba 07 cpc r27, r26
|
|
1002: 20 f0 brcs .+8 ; 0x100c <__divsf3_pse+0xae>
|
|
1004: 62 1b sub r22, r18
|
|
1006: 73 0b sbc r23, r19
|
|
1008: 84 0b sbc r24, r20
|
|
100a: ba 0b sbc r27, r26
|
|
100c: ee 1f adc r30, r30
|
|
100e: 88 f7 brcc .-30 ; 0xff2 <__divsf3_pse+0x94>
|
|
1010: e0 95 com r30
|
|
1012: 08 95 ret
|
|
|
|
00001014 <__fixsfsi>:
|
|
1014: 0e 94 11 08 call 0x1022 ; 0x1022 <__fixunssfsi>
|
|
1018: 68 94 set
|
|
101a: b1 11 cpse r27, r1
|
|
101c: 0c 94 2d 09 jmp 0x125a ; 0x125a <__fp_szero>
|
|
1020: 08 95 ret
|
|
|
|
00001022 <__fixunssfsi>:
|
|
1022: 0e 94 fa 08 call 0x11f4 ; 0x11f4 <__fp_splitA>
|
|
1026: 88 f0 brcs .+34 ; 0x104a <__fixunssfsi+0x28>
|
|
1028: 9f 57 subi r25, 0x7F ; 127
|
|
102a: 98 f0 brcs .+38 ; 0x1052 <__fixunssfsi+0x30>
|
|
102c: b9 2f mov r27, r25
|
|
102e: 99 27 eor r25, r25
|
|
1030: b7 51 subi r27, 0x17 ; 23
|
|
1032: b0 f0 brcs .+44 ; 0x1060 <__fixunssfsi+0x3e>
|
|
1034: e1 f0 breq .+56 ; 0x106e <__fixunssfsi+0x4c>
|
|
1036: 66 0f add r22, r22
|
|
1038: 77 1f adc r23, r23
|
|
103a: 88 1f adc r24, r24
|
|
103c: 99 1f adc r25, r25
|
|
103e: 1a f0 brmi .+6 ; 0x1046 <__fixunssfsi+0x24>
|
|
1040: ba 95 dec r27
|
|
1042: c9 f7 brne .-14 ; 0x1036 <__fixunssfsi+0x14>
|
|
1044: 14 c0 rjmp .+40 ; 0x106e <__fixunssfsi+0x4c>
|
|
1046: b1 30 cpi r27, 0x01 ; 1
|
|
1048: 91 f0 breq .+36 ; 0x106e <__fixunssfsi+0x4c>
|
|
104a: 0e 94 2c 09 call 0x1258 ; 0x1258 <__fp_zero>
|
|
104e: b1 e0 ldi r27, 0x01 ; 1
|
|
1050: 08 95 ret
|
|
1052: 0c 94 2c 09 jmp 0x1258 ; 0x1258 <__fp_zero>
|
|
1056: 67 2f mov r22, r23
|
|
1058: 78 2f mov r23, r24
|
|
105a: 88 27 eor r24, r24
|
|
105c: b8 5f subi r27, 0xF8 ; 248
|
|
105e: 39 f0 breq .+14 ; 0x106e <__fixunssfsi+0x4c>
|
|
1060: b9 3f cpi r27, 0xF9 ; 249
|
|
1062: cc f3 brlt .-14 ; 0x1056 <__fixunssfsi+0x34>
|
|
1064: 86 95 lsr r24
|
|
1066: 77 95 ror r23
|
|
1068: 67 95 ror r22
|
|
106a: b3 95 inc r27
|
|
106c: d9 f7 brne .-10 ; 0x1064 <__fixunssfsi+0x42>
|
|
106e: 3e f4 brtc .+14 ; 0x107e <__fixunssfsi+0x5c>
|
|
1070: 90 95 com r25
|
|
1072: 80 95 com r24
|
|
1074: 70 95 com r23
|
|
1076: 61 95 neg r22
|
|
1078: 7f 4f sbci r23, 0xFF ; 255
|
|
107a: 8f 4f sbci r24, 0xFF ; 255
|
|
107c: 9f 4f sbci r25, 0xFF ; 255
|
|
107e: 08 95 ret
|
|
|
|
00001080 <__floatunsisf>:
|
|
1080: e8 94 clt
|
|
1082: 09 c0 rjmp .+18 ; 0x1096 <__floatsisf+0x12>
|
|
|
|
00001084 <__floatsisf>:
|
|
1084: 97 fb bst r25, 7
|
|
1086: 3e f4 brtc .+14 ; 0x1096 <__floatsisf+0x12>
|
|
1088: 90 95 com r25
|
|
108a: 80 95 com r24
|
|
108c: 70 95 com r23
|
|
108e: 61 95 neg r22
|
|
1090: 7f 4f sbci r23, 0xFF ; 255
|
|
1092: 8f 4f sbci r24, 0xFF ; 255
|
|
1094: 9f 4f sbci r25, 0xFF ; 255
|
|
1096: 99 23 and r25, r25
|
|
1098: a9 f0 breq .+42 ; 0x10c4 <__floatsisf+0x40>
|
|
109a: f9 2f mov r31, r25
|
|
109c: 96 e9 ldi r25, 0x96 ; 150
|
|
109e: bb 27 eor r27, r27
|
|
10a0: 93 95 inc r25
|
|
10a2: f6 95 lsr r31
|
|
10a4: 87 95 ror r24
|
|
10a6: 77 95 ror r23
|
|
10a8: 67 95 ror r22
|
|
10aa: b7 95 ror r27
|
|
10ac: f1 11 cpse r31, r1
|
|
10ae: f8 cf rjmp .-16 ; 0x10a0 <__floatsisf+0x1c>
|
|
10b0: fa f4 brpl .+62 ; 0x10f0 <__floatsisf+0x6c>
|
|
10b2: bb 0f add r27, r27
|
|
10b4: 11 f4 brne .+4 ; 0x10ba <__floatsisf+0x36>
|
|
10b6: 60 ff sbrs r22, 0
|
|
10b8: 1b c0 rjmp .+54 ; 0x10f0 <__floatsisf+0x6c>
|
|
10ba: 6f 5f subi r22, 0xFF ; 255
|
|
10bc: 7f 4f sbci r23, 0xFF ; 255
|
|
10be: 8f 4f sbci r24, 0xFF ; 255
|
|
10c0: 9f 4f sbci r25, 0xFF ; 255
|
|
10c2: 16 c0 rjmp .+44 ; 0x10f0 <__floatsisf+0x6c>
|
|
10c4: 88 23 and r24, r24
|
|
10c6: 11 f0 breq .+4 ; 0x10cc <__floatsisf+0x48>
|
|
10c8: 96 e9 ldi r25, 0x96 ; 150
|
|
10ca: 11 c0 rjmp .+34 ; 0x10ee <__floatsisf+0x6a>
|
|
10cc: 77 23 and r23, r23
|
|
10ce: 21 f0 breq .+8 ; 0x10d8 <__floatsisf+0x54>
|
|
10d0: 9e e8 ldi r25, 0x8E ; 142
|
|
10d2: 87 2f mov r24, r23
|
|
10d4: 76 2f mov r23, r22
|
|
10d6: 05 c0 rjmp .+10 ; 0x10e2 <__floatsisf+0x5e>
|
|
10d8: 66 23 and r22, r22
|
|
10da: 71 f0 breq .+28 ; 0x10f8 <__floatsisf+0x74>
|
|
10dc: 96 e8 ldi r25, 0x86 ; 134
|
|
10de: 86 2f mov r24, r22
|
|
10e0: 70 e0 ldi r23, 0x00 ; 0
|
|
10e2: 60 e0 ldi r22, 0x00 ; 0
|
|
10e4: 2a f0 brmi .+10 ; 0x10f0 <__floatsisf+0x6c>
|
|
10e6: 9a 95 dec r25
|
|
10e8: 66 0f add r22, r22
|
|
10ea: 77 1f adc r23, r23
|
|
10ec: 88 1f adc r24, r24
|
|
10ee: da f7 brpl .-10 ; 0x10e6 <__floatsisf+0x62>
|
|
10f0: 88 0f add r24, r24
|
|
10f2: 96 95 lsr r25
|
|
10f4: 87 95 ror r24
|
|
10f6: 97 f9 bld r25, 7
|
|
10f8: 08 95 ret
|
|
|
|
000010fa <__fp_cmp>:
|
|
10fa: 99 0f add r25, r25
|
|
10fc: 00 08 sbc r0, r0
|
|
10fe: 55 0f add r21, r21
|
|
1100: aa 0b sbc r26, r26
|
|
1102: e0 e8 ldi r30, 0x80 ; 128
|
|
1104: fe ef ldi r31, 0xFE ; 254
|
|
1106: 16 16 cp r1, r22
|
|
1108: 17 06 cpc r1, r23
|
|
110a: e8 07 cpc r30, r24
|
|
110c: f9 07 cpc r31, r25
|
|
110e: c0 f0 brcs .+48 ; 0x1140 <__fp_cmp+0x46>
|
|
1110: 12 16 cp r1, r18
|
|
1112: 13 06 cpc r1, r19
|
|
1114: e4 07 cpc r30, r20
|
|
1116: f5 07 cpc r31, r21
|
|
1118: 98 f0 brcs .+38 ; 0x1140 <__fp_cmp+0x46>
|
|
111a: 62 1b sub r22, r18
|
|
111c: 73 0b sbc r23, r19
|
|
111e: 84 0b sbc r24, r20
|
|
1120: 95 0b sbc r25, r21
|
|
1122: 39 f4 brne .+14 ; 0x1132 <__fp_cmp+0x38>
|
|
1124: 0a 26 eor r0, r26
|
|
1126: 61 f0 breq .+24 ; 0x1140 <__fp_cmp+0x46>
|
|
1128: 23 2b or r18, r19
|
|
112a: 24 2b or r18, r20
|
|
112c: 25 2b or r18, r21
|
|
112e: 21 f4 brne .+8 ; 0x1138 <__fp_cmp+0x3e>
|
|
1130: 08 95 ret
|
|
1132: 0a 26 eor r0, r26
|
|
1134: 09 f4 brne .+2 ; 0x1138 <__fp_cmp+0x3e>
|
|
1136: a1 40 sbci r26, 0x01 ; 1
|
|
1138: a6 95 lsr r26
|
|
113a: 8f ef ldi r24, 0xFF ; 255
|
|
113c: 81 1d adc r24, r1
|
|
113e: 81 1d adc r24, r1
|
|
1140: 08 95 ret
|
|
|
|
00001142 <__fp_inf>:
|
|
1142: 97 f9 bld r25, 7
|
|
1144: 9f 67 ori r25, 0x7F ; 127
|
|
1146: 80 e8 ldi r24, 0x80 ; 128
|
|
1148: 70 e0 ldi r23, 0x00 ; 0
|
|
114a: 60 e0 ldi r22, 0x00 ; 0
|
|
114c: 08 95 ret
|
|
|
|
0000114e <__fp_mintl>:
|
|
114e: 88 23 and r24, r24
|
|
1150: 71 f4 brne .+28 ; 0x116e <__fp_mintl+0x20>
|
|
1152: 77 23 and r23, r23
|
|
1154: 21 f0 breq .+8 ; 0x115e <__fp_mintl+0x10>
|
|
1156: 98 50 subi r25, 0x08 ; 8
|
|
1158: 87 2b or r24, r23
|
|
115a: 76 2f mov r23, r22
|
|
115c: 07 c0 rjmp .+14 ; 0x116c <__fp_mintl+0x1e>
|
|
115e: 66 23 and r22, r22
|
|
1160: 11 f4 brne .+4 ; 0x1166 <__fp_mintl+0x18>
|
|
1162: 99 27 eor r25, r25
|
|
1164: 0d c0 rjmp .+26 ; 0x1180 <__fp_mintl+0x32>
|
|
1166: 90 51 subi r25, 0x10 ; 16
|
|
1168: 86 2b or r24, r22
|
|
116a: 70 e0 ldi r23, 0x00 ; 0
|
|
116c: 60 e0 ldi r22, 0x00 ; 0
|
|
116e: 2a f0 brmi .+10 ; 0x117a <__fp_mintl+0x2c>
|
|
1170: 9a 95 dec r25
|
|
1172: 66 0f add r22, r22
|
|
1174: 77 1f adc r23, r23
|
|
1176: 88 1f adc r24, r24
|
|
1178: da f7 brpl .-10 ; 0x1170 <__fp_mintl+0x22>
|
|
117a: 88 0f add r24, r24
|
|
117c: 96 95 lsr r25
|
|
117e: 87 95 ror r24
|
|
1180: 97 f9 bld r25, 7
|
|
1182: 08 95 ret
|
|
|
|
00001184 <__fp_mpack>:
|
|
1184: 9f 3f cpi r25, 0xFF ; 255
|
|
1186: 31 f0 breq .+12 ; 0x1194 <__fp_mpack_finite+0xc>
|
|
|
|
00001188 <__fp_mpack_finite>:
|
|
1188: 91 50 subi r25, 0x01 ; 1
|
|
118a: 20 f4 brcc .+8 ; 0x1194 <__fp_mpack_finite+0xc>
|
|
118c: 87 95 ror r24
|
|
118e: 77 95 ror r23
|
|
1190: 67 95 ror r22
|
|
1192: b7 95 ror r27
|
|
1194: 88 0f add r24, r24
|
|
1196: 91 1d adc r25, r1
|
|
1198: 96 95 lsr r25
|
|
119a: 87 95 ror r24
|
|
119c: 97 f9 bld r25, 7
|
|
119e: 08 95 ret
|
|
|
|
000011a0 <__fp_nan>:
|
|
11a0: 9f ef ldi r25, 0xFF ; 255
|
|
11a2: 80 ec ldi r24, 0xC0 ; 192
|
|
11a4: 08 95 ret
|
|
|
|
000011a6 <__fp_pscA>:
|
|
11a6: 00 24 eor r0, r0
|
|
11a8: 0a 94 dec r0
|
|
11aa: 16 16 cp r1, r22
|
|
11ac: 17 06 cpc r1, r23
|
|
11ae: 18 06 cpc r1, r24
|
|
11b0: 09 06 cpc r0, r25
|
|
11b2: 08 95 ret
|
|
|
|
000011b4 <__fp_pscB>:
|
|
11b4: 00 24 eor r0, r0
|
|
11b6: 0a 94 dec r0
|
|
11b8: 12 16 cp r1, r18
|
|
11ba: 13 06 cpc r1, r19
|
|
11bc: 14 06 cpc r1, r20
|
|
11be: 05 06 cpc r0, r21
|
|
11c0: 08 95 ret
|
|
|
|
000011c2 <__fp_round>:
|
|
11c2: 09 2e mov r0, r25
|
|
11c4: 03 94 inc r0
|
|
11c6: 00 0c add r0, r0
|
|
11c8: 11 f4 brne .+4 ; 0x11ce <__fp_round+0xc>
|
|
11ca: 88 23 and r24, r24
|
|
11cc: 52 f0 brmi .+20 ; 0x11e2 <__fp_round+0x20>
|
|
11ce: bb 0f add r27, r27
|
|
11d0: 40 f4 brcc .+16 ; 0x11e2 <__fp_round+0x20>
|
|
11d2: bf 2b or r27, r31
|
|
11d4: 11 f4 brne .+4 ; 0x11da <__fp_round+0x18>
|
|
11d6: 60 ff sbrs r22, 0
|
|
11d8: 04 c0 rjmp .+8 ; 0x11e2 <__fp_round+0x20>
|
|
11da: 6f 5f subi r22, 0xFF ; 255
|
|
11dc: 7f 4f sbci r23, 0xFF ; 255
|
|
11de: 8f 4f sbci r24, 0xFF ; 255
|
|
11e0: 9f 4f sbci r25, 0xFF ; 255
|
|
11e2: 08 95 ret
|
|
|
|
000011e4 <__fp_split3>:
|
|
11e4: 57 fd sbrc r21, 7
|
|
11e6: 90 58 subi r25, 0x80 ; 128
|
|
11e8: 44 0f add r20, r20
|
|
11ea: 55 1f adc r21, r21
|
|
11ec: 59 f0 breq .+22 ; 0x1204 <__fp_splitA+0x10>
|
|
11ee: 5f 3f cpi r21, 0xFF ; 255
|
|
11f0: 71 f0 breq .+28 ; 0x120e <__fp_splitA+0x1a>
|
|
11f2: 47 95 ror r20
|
|
|
|
000011f4 <__fp_splitA>:
|
|
11f4: 88 0f add r24, r24
|
|
11f6: 97 fb bst r25, 7
|
|
11f8: 99 1f adc r25, r25
|
|
11fa: 61 f0 breq .+24 ; 0x1214 <__fp_splitA+0x20>
|
|
11fc: 9f 3f cpi r25, 0xFF ; 255
|
|
11fe: 79 f0 breq .+30 ; 0x121e <__fp_splitA+0x2a>
|
|
1200: 87 95 ror r24
|
|
1202: 08 95 ret
|
|
1204: 12 16 cp r1, r18
|
|
1206: 13 06 cpc r1, r19
|
|
1208: 14 06 cpc r1, r20
|
|
120a: 55 1f adc r21, r21
|
|
120c: f2 cf rjmp .-28 ; 0x11f2 <__fp_split3+0xe>
|
|
120e: 46 95 lsr r20
|
|
1210: f1 df rcall .-30 ; 0x11f4 <__fp_splitA>
|
|
1212: 08 c0 rjmp .+16 ; 0x1224 <__fp_splitA+0x30>
|
|
1214: 16 16 cp r1, r22
|
|
1216: 17 06 cpc r1, r23
|
|
1218: 18 06 cpc r1, r24
|
|
121a: 99 1f adc r25, r25
|
|
121c: f1 cf rjmp .-30 ; 0x1200 <__fp_splitA+0xc>
|
|
121e: 86 95 lsr r24
|
|
1220: 71 05 cpc r23, r1
|
|
1222: 61 05 cpc r22, r1
|
|
1224: 08 94 sec
|
|
1226: 08 95 ret
|
|
|
|
00001228 <__fp_trunc>:
|
|
1228: 0e 94 fa 08 call 0x11f4 ; 0x11f4 <__fp_splitA>
|
|
122c: a0 f0 brcs .+40 ; 0x1256 <__fp_trunc+0x2e>
|
|
122e: be e7 ldi r27, 0x7E ; 126
|
|
1230: b9 17 cp r27, r25
|
|
1232: 88 f4 brcc .+34 ; 0x1256 <__fp_trunc+0x2e>
|
|
1234: bb 27 eor r27, r27
|
|
1236: 9f 38 cpi r25, 0x8F ; 143
|
|
1238: 60 f4 brcc .+24 ; 0x1252 <__fp_trunc+0x2a>
|
|
123a: 16 16 cp r1, r22
|
|
123c: b1 1d adc r27, r1
|
|
123e: 67 2f mov r22, r23
|
|
1240: 78 2f mov r23, r24
|
|
1242: 88 27 eor r24, r24
|
|
1244: 98 5f subi r25, 0xF8 ; 248
|
|
1246: f7 cf rjmp .-18 ; 0x1236 <__fp_trunc+0xe>
|
|
1248: 86 95 lsr r24
|
|
124a: 77 95 ror r23
|
|
124c: 67 95 ror r22
|
|
124e: b1 1d adc r27, r1
|
|
1250: 93 95 inc r25
|
|
1252: 96 39 cpi r25, 0x96 ; 150
|
|
1254: c8 f3 brcs .-14 ; 0x1248 <__fp_trunc+0x20>
|
|
1256: 08 95 ret
|
|
|
|
00001258 <__fp_zero>:
|
|
1258: e8 94 clt
|
|
|
|
0000125a <__fp_szero>:
|
|
125a: bb 27 eor r27, r27
|
|
125c: 66 27 eor r22, r22
|
|
125e: 77 27 eor r23, r23
|
|
1260: cb 01 movw r24, r22
|
|
1262: 97 f9 bld r25, 7
|
|
1264: 08 95 ret
|
|
|
|
00001266 <__gesf2>:
|
|
1266: 0e 94 7d 08 call 0x10fa ; 0x10fa <__fp_cmp>
|
|
126a: 08 f4 brcc .+2 ; 0x126e <__gesf2+0x8>
|
|
126c: 8f ef ldi r24, 0xFF ; 255
|
|
126e: 08 95 ret
|
|
|
|
00001270 <__mulsf3>:
|
|
1270: 0e 94 4b 09 call 0x1296 ; 0x1296 <__mulsf3x>
|
|
1274: 0c 94 e1 08 jmp 0x11c2 ; 0x11c2 <__fp_round>
|
|
1278: 0e 94 d3 08 call 0x11a6 ; 0x11a6 <__fp_pscA>
|
|
127c: 38 f0 brcs .+14 ; 0x128c <__mulsf3+0x1c>
|
|
127e: 0e 94 da 08 call 0x11b4 ; 0x11b4 <__fp_pscB>
|
|
1282: 20 f0 brcs .+8 ; 0x128c <__mulsf3+0x1c>
|
|
1284: 95 23 and r25, r21
|
|
1286: 11 f0 breq .+4 ; 0x128c <__mulsf3+0x1c>
|
|
1288: 0c 94 a1 08 jmp 0x1142 ; 0x1142 <__fp_inf>
|
|
128c: 0c 94 d0 08 jmp 0x11a0 ; 0x11a0 <__fp_nan>
|
|
1290: 11 24 eor r1, r1
|
|
1292: 0c 94 2d 09 jmp 0x125a ; 0x125a <__fp_szero>
|
|
|
|
00001296 <__mulsf3x>:
|
|
1296: 0e 94 f2 08 call 0x11e4 ; 0x11e4 <__fp_split3>
|
|
129a: 70 f3 brcs .-36 ; 0x1278 <__mulsf3+0x8>
|
|
|
|
0000129c <__mulsf3_pse>:
|
|
129c: 95 9f mul r25, r21
|
|
129e: c1 f3 breq .-16 ; 0x1290 <__mulsf3+0x20>
|
|
12a0: 95 0f add r25, r21
|
|
12a2: 50 e0 ldi r21, 0x00 ; 0
|
|
12a4: 55 1f adc r21, r21
|
|
12a6: 62 9f mul r22, r18
|
|
12a8: f0 01 movw r30, r0
|
|
12aa: 72 9f mul r23, r18
|
|
12ac: bb 27 eor r27, r27
|
|
12ae: f0 0d add r31, r0
|
|
12b0: b1 1d adc r27, r1
|
|
12b2: 63 9f mul r22, r19
|
|
12b4: aa 27 eor r26, r26
|
|
12b6: f0 0d add r31, r0
|
|
12b8: b1 1d adc r27, r1
|
|
12ba: aa 1f adc r26, r26
|
|
12bc: 64 9f mul r22, r20
|
|
12be: 66 27 eor r22, r22
|
|
12c0: b0 0d add r27, r0
|
|
12c2: a1 1d adc r26, r1
|
|
12c4: 66 1f adc r22, r22
|
|
12c6: 82 9f mul r24, r18
|
|
12c8: 22 27 eor r18, r18
|
|
12ca: b0 0d add r27, r0
|
|
12cc: a1 1d adc r26, r1
|
|
12ce: 62 1f adc r22, r18
|
|
12d0: 73 9f mul r23, r19
|
|
12d2: b0 0d add r27, r0
|
|
12d4: a1 1d adc r26, r1
|
|
12d6: 62 1f adc r22, r18
|
|
12d8: 83 9f mul r24, r19
|
|
12da: a0 0d add r26, r0
|
|
12dc: 61 1d adc r22, r1
|
|
12de: 22 1f adc r18, r18
|
|
12e0: 74 9f mul r23, r20
|
|
12e2: 33 27 eor r19, r19
|
|
12e4: a0 0d add r26, r0
|
|
12e6: 61 1d adc r22, r1
|
|
12e8: 23 1f adc r18, r19
|
|
12ea: 84 9f mul r24, r20
|
|
12ec: 60 0d add r22, r0
|
|
12ee: 21 1d adc r18, r1
|
|
12f0: 82 2f mov r24, r18
|
|
12f2: 76 2f mov r23, r22
|
|
12f4: 6a 2f mov r22, r26
|
|
12f6: 11 24 eor r1, r1
|
|
12f8: 9f 57 subi r25, 0x7F ; 127
|
|
12fa: 50 40 sbci r21, 0x00 ; 0
|
|
12fc: 9a f0 brmi .+38 ; 0x1324 <__mulsf3_pse+0x88>
|
|
12fe: f1 f0 breq .+60 ; 0x133c <__mulsf3_pse+0xa0>
|
|
1300: 88 23 and r24, r24
|
|
1302: 4a f0 brmi .+18 ; 0x1316 <__mulsf3_pse+0x7a>
|
|
1304: ee 0f add r30, r30
|
|
1306: ff 1f adc r31, r31
|
|
1308: bb 1f adc r27, r27
|
|
130a: 66 1f adc r22, r22
|
|
130c: 77 1f adc r23, r23
|
|
130e: 88 1f adc r24, r24
|
|
1310: 91 50 subi r25, 0x01 ; 1
|
|
1312: 50 40 sbci r21, 0x00 ; 0
|
|
1314: a9 f7 brne .-22 ; 0x1300 <__mulsf3_pse+0x64>
|
|
1316: 9e 3f cpi r25, 0xFE ; 254
|
|
1318: 51 05 cpc r21, r1
|
|
131a: 80 f0 brcs .+32 ; 0x133c <__mulsf3_pse+0xa0>
|
|
131c: 0c 94 a1 08 jmp 0x1142 ; 0x1142 <__fp_inf>
|
|
1320: 0c 94 2d 09 jmp 0x125a ; 0x125a <__fp_szero>
|
|
1324: 5f 3f cpi r21, 0xFF ; 255
|
|
1326: e4 f3 brlt .-8 ; 0x1320 <__mulsf3_pse+0x84>
|
|
1328: 98 3e cpi r25, 0xE8 ; 232
|
|
132a: d4 f3 brlt .-12 ; 0x1320 <__mulsf3_pse+0x84>
|
|
132c: 86 95 lsr r24
|
|
132e: 77 95 ror r23
|
|
1330: 67 95 ror r22
|
|
1332: b7 95 ror r27
|
|
1334: f7 95 ror r31
|
|
1336: e7 95 ror r30
|
|
1338: 9f 5f subi r25, 0xFF ; 255
|
|
133a: c1 f7 brne .-16 ; 0x132c <__mulsf3_pse+0x90>
|
|
133c: fe 2b or r31, r30
|
|
133e: 88 0f add r24, r24
|
|
1340: 91 1d adc r25, r1
|
|
1342: 96 95 lsr r25
|
|
1344: 87 95 ror r24
|
|
1346: 97 f9 bld r25, 7
|
|
1348: 08 95 ret
|
|
|
|
0000134a <__divmodhi4>:
|
|
134a: 97 fb bst r25, 7
|
|
134c: 07 2e mov r0, r23
|
|
134e: 16 f4 brtc .+4 ; 0x1354 <__divmodhi4+0xa>
|
|
1350: 00 94 com r0
|
|
1352: 07 d0 rcall .+14 ; 0x1362 <__divmodhi4_neg1>
|
|
1354: 77 fd sbrc r23, 7
|
|
1356: 09 d0 rcall .+18 ; 0x136a <__divmodhi4_neg2>
|
|
1358: 0e 94 b9 09 call 0x1372 ; 0x1372 <__udivmodhi4>
|
|
135c: 07 fc sbrc r0, 7
|
|
135e: 05 d0 rcall .+10 ; 0x136a <__divmodhi4_neg2>
|
|
1360: 3e f4 brtc .+14 ; 0x1370 <__divmodhi4_exit>
|
|
|
|
00001362 <__divmodhi4_neg1>:
|
|
1362: 90 95 com r25
|
|
1364: 81 95 neg r24
|
|
1366: 9f 4f sbci r25, 0xFF ; 255
|
|
1368: 08 95 ret
|
|
|
|
0000136a <__divmodhi4_neg2>:
|
|
136a: 70 95 com r23
|
|
136c: 61 95 neg r22
|
|
136e: 7f 4f sbci r23, 0xFF ; 255
|
|
|
|
00001370 <__divmodhi4_exit>:
|
|
1370: 08 95 ret
|
|
|
|
00001372 <__udivmodhi4>:
|
|
1372: aa 1b sub r26, r26
|
|
1374: bb 1b sub r27, r27
|
|
1376: 51 e1 ldi r21, 0x11 ; 17
|
|
1378: 07 c0 rjmp .+14 ; 0x1388 <__udivmodhi4_ep>
|
|
|
|
0000137a <__udivmodhi4_loop>:
|
|
137a: aa 1f adc r26, r26
|
|
137c: bb 1f adc r27, r27
|
|
137e: a6 17 cp r26, r22
|
|
1380: b7 07 cpc r27, r23
|
|
1382: 10 f0 brcs .+4 ; 0x1388 <__udivmodhi4_ep>
|
|
1384: a6 1b sub r26, r22
|
|
1386: b7 0b sbc r27, r23
|
|
|
|
00001388 <__udivmodhi4_ep>:
|
|
1388: 88 1f adc r24, r24
|
|
138a: 99 1f adc r25, r25
|
|
138c: 5a 95 dec r21
|
|
138e: a9 f7 brne .-22 ; 0x137a <__udivmodhi4_loop>
|
|
1390: 80 95 com r24
|
|
1392: 90 95 com r25
|
|
1394: bc 01 movw r22, r24
|
|
1396: cd 01 movw r24, r26
|
|
1398: 08 95 ret
|
|
|
|
0000139a <do_rand>:
|
|
139a: 8f 92 push r8
|
|
139c: 9f 92 push r9
|
|
139e: af 92 push r10
|
|
13a0: bf 92 push r11
|
|
13a2: cf 92 push r12
|
|
13a4: df 92 push r13
|
|
13a6: ef 92 push r14
|
|
13a8: ff 92 push r15
|
|
13aa: cf 93 push r28
|
|
13ac: df 93 push r29
|
|
13ae: ec 01 movw r28, r24
|
|
13b0: 68 81 ld r22, Y
|
|
13b2: 79 81 ldd r23, Y+1 ; 0x01
|
|
13b4: 8a 81 ldd r24, Y+2 ; 0x02
|
|
13b6: 9b 81 ldd r25, Y+3 ; 0x03
|
|
13b8: 61 15 cp r22, r1
|
|
13ba: 71 05 cpc r23, r1
|
|
13bc: 81 05 cpc r24, r1
|
|
13be: 91 05 cpc r25, r1
|
|
13c0: 21 f4 brne .+8 ; 0x13ca <do_rand+0x30>
|
|
13c2: 64 e2 ldi r22, 0x24 ; 36
|
|
13c4: 79 ed ldi r23, 0xD9 ; 217
|
|
13c6: 8b e5 ldi r24, 0x5B ; 91
|
|
13c8: 97 e0 ldi r25, 0x07 ; 7
|
|
13ca: 2d e1 ldi r18, 0x1D ; 29
|
|
13cc: 33 ef ldi r19, 0xF3 ; 243
|
|
13ce: 41 e0 ldi r20, 0x01 ; 1
|
|
13d0: 50 e0 ldi r21, 0x00 ; 0
|
|
13d2: 0e 94 29 0a call 0x1452 ; 0x1452 <__divmodsi4>
|
|
13d6: 49 01 movw r8, r18
|
|
13d8: 5a 01 movw r10, r20
|
|
13da: 9b 01 movw r18, r22
|
|
13dc: ac 01 movw r20, r24
|
|
13de: a7 ea ldi r26, 0xA7 ; 167
|
|
13e0: b1 e4 ldi r27, 0x41 ; 65
|
|
13e2: 0e 94 48 0a call 0x1490 ; 0x1490 <__muluhisi3>
|
|
13e6: 6b 01 movw r12, r22
|
|
13e8: 7c 01 movw r14, r24
|
|
13ea: ac ee ldi r26, 0xEC ; 236
|
|
13ec: b4 ef ldi r27, 0xF4 ; 244
|
|
13ee: a5 01 movw r20, r10
|
|
13f0: 94 01 movw r18, r8
|
|
13f2: 0e 94 56 0a call 0x14ac ; 0x14ac <__mulohisi3>
|
|
13f6: dc 01 movw r26, r24
|
|
13f8: cb 01 movw r24, r22
|
|
13fa: 8c 0d add r24, r12
|
|
13fc: 9d 1d adc r25, r13
|
|
13fe: ae 1d adc r26, r14
|
|
1400: bf 1d adc r27, r15
|
|
1402: b7 ff sbrs r27, 7
|
|
1404: 03 c0 rjmp .+6 ; 0x140c <do_rand+0x72>
|
|
1406: 01 97 sbiw r24, 0x01 ; 1
|
|
1408: a1 09 sbc r26, r1
|
|
140a: b0 48 sbci r27, 0x80 ; 128
|
|
140c: 88 83 st Y, r24
|
|
140e: 99 83 std Y+1, r25 ; 0x01
|
|
1410: aa 83 std Y+2, r26 ; 0x02
|
|
1412: bb 83 std Y+3, r27 ; 0x03
|
|
1414: 9f 77 andi r25, 0x7F ; 127
|
|
1416: df 91 pop r29
|
|
1418: cf 91 pop r28
|
|
141a: ff 90 pop r15
|
|
141c: ef 90 pop r14
|
|
141e: df 90 pop r13
|
|
1420: cf 90 pop r12
|
|
1422: bf 90 pop r11
|
|
1424: af 90 pop r10
|
|
1426: 9f 90 pop r9
|
|
1428: 8f 90 pop r8
|
|
142a: 08 95 ret
|
|
|
|
0000142c <rand_r>:
|
|
142c: 0e 94 cd 09 call 0x139a ; 0x139a <do_rand>
|
|
1430: 08 95 ret
|
|
|
|
00001432 <rand>:
|
|
1432: 80 e0 ldi r24, 0x00 ; 0
|
|
1434: 91 e0 ldi r25, 0x01 ; 1
|
|
1436: 0e 94 cd 09 call 0x139a ; 0x139a <do_rand>
|
|
143a: 08 95 ret
|
|
|
|
0000143c <srand>:
|
|
143c: a0 e0 ldi r26, 0x00 ; 0
|
|
143e: b0 e0 ldi r27, 0x00 ; 0
|
|
1440: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <__DATA_REGION_ORIGIN__>
|
|
1444: 90 93 01 01 sts 0x0101, r25 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
|
|
1448: a0 93 02 01 sts 0x0102, r26 ; 0x800102 <__DATA_REGION_ORIGIN__+0x2>
|
|
144c: b0 93 03 01 sts 0x0103, r27 ; 0x800103 <__DATA_REGION_ORIGIN__+0x3>
|
|
1450: 08 95 ret
|
|
|
|
00001452 <__divmodsi4>:
|
|
1452: 05 2e mov r0, r21
|
|
1454: 97 fb bst r25, 7
|
|
1456: 1e f4 brtc .+6 ; 0x145e <__divmodsi4+0xc>
|
|
1458: 00 94 com r0
|
|
145a: 0e 94 40 0a call 0x1480 ; 0x1480 <__negsi2>
|
|
145e: 57 fd sbrc r21, 7
|
|
1460: 07 d0 rcall .+14 ; 0x1470 <__divmodsi4_neg2>
|
|
1462: 0e 94 5b 0a call 0x14b6 ; 0x14b6 <__udivmodsi4>
|
|
1466: 07 fc sbrc r0, 7
|
|
1468: 03 d0 rcall .+6 ; 0x1470 <__divmodsi4_neg2>
|
|
146a: 4e f4 brtc .+18 ; 0x147e <__divmodsi4_exit>
|
|
146c: 0c 94 40 0a jmp 0x1480 ; 0x1480 <__negsi2>
|
|
|
|
00001470 <__divmodsi4_neg2>:
|
|
1470: 50 95 com r21
|
|
1472: 40 95 com r20
|
|
1474: 30 95 com r19
|
|
1476: 21 95 neg r18
|
|
1478: 3f 4f sbci r19, 0xFF ; 255
|
|
147a: 4f 4f sbci r20, 0xFF ; 255
|
|
147c: 5f 4f sbci r21, 0xFF ; 255
|
|
|
|
0000147e <__divmodsi4_exit>:
|
|
147e: 08 95 ret
|
|
|
|
00001480 <__negsi2>:
|
|
1480: 90 95 com r25
|
|
1482: 80 95 com r24
|
|
1484: 70 95 com r23
|
|
1486: 61 95 neg r22
|
|
1488: 7f 4f sbci r23, 0xFF ; 255
|
|
148a: 8f 4f sbci r24, 0xFF ; 255
|
|
148c: 9f 4f sbci r25, 0xFF ; 255
|
|
148e: 08 95 ret
|
|
|
|
00001490 <__muluhisi3>:
|
|
1490: 0e 94 7d 0a call 0x14fa ; 0x14fa <__umulhisi3>
|
|
1494: a5 9f mul r26, r21
|
|
1496: 90 0d add r25, r0
|
|
1498: b4 9f mul r27, r20
|
|
149a: 90 0d add r25, r0
|
|
149c: a4 9f mul r26, r20
|
|
149e: 80 0d add r24, r0
|
|
14a0: 91 1d adc r25, r1
|
|
14a2: 11 24 eor r1, r1
|
|
14a4: 08 95 ret
|
|
|
|
000014a6 <__mulshisi3>:
|
|
14a6: b7 ff sbrs r27, 7
|
|
14a8: 0c 94 48 0a jmp 0x1490 ; 0x1490 <__muluhisi3>
|
|
|
|
000014ac <__mulohisi3>:
|
|
14ac: 0e 94 48 0a call 0x1490 ; 0x1490 <__muluhisi3>
|
|
14b0: 82 1b sub r24, r18
|
|
14b2: 93 0b sbc r25, r19
|
|
14b4: 08 95 ret
|
|
|
|
000014b6 <__udivmodsi4>:
|
|
14b6: a1 e2 ldi r26, 0x21 ; 33
|
|
14b8: 1a 2e mov r1, r26
|
|
14ba: aa 1b sub r26, r26
|
|
14bc: bb 1b sub r27, r27
|
|
14be: fd 01 movw r30, r26
|
|
14c0: 0d c0 rjmp .+26 ; 0x14dc <__udivmodsi4_ep>
|
|
|
|
000014c2 <__udivmodsi4_loop>:
|
|
14c2: aa 1f adc r26, r26
|
|
14c4: bb 1f adc r27, r27
|
|
14c6: ee 1f adc r30, r30
|
|
14c8: ff 1f adc r31, r31
|
|
14ca: a2 17 cp r26, r18
|
|
14cc: b3 07 cpc r27, r19
|
|
14ce: e4 07 cpc r30, r20
|
|
14d0: f5 07 cpc r31, r21
|
|
14d2: 20 f0 brcs .+8 ; 0x14dc <__udivmodsi4_ep>
|
|
14d4: a2 1b sub r26, r18
|
|
14d6: b3 0b sbc r27, r19
|
|
14d8: e4 0b sbc r30, r20
|
|
14da: f5 0b sbc r31, r21
|
|
|
|
000014dc <__udivmodsi4_ep>:
|
|
14dc: 66 1f adc r22, r22
|
|
14de: 77 1f adc r23, r23
|
|
14e0: 88 1f adc r24, r24
|
|
14e2: 99 1f adc r25, r25
|
|
14e4: 1a 94 dec r1
|
|
14e6: 69 f7 brne .-38 ; 0x14c2 <__udivmodsi4_loop>
|
|
14e8: 60 95 com r22
|
|
14ea: 70 95 com r23
|
|
14ec: 80 95 com r24
|
|
14ee: 90 95 com r25
|
|
14f0: 9b 01 movw r18, r22
|
|
14f2: ac 01 movw r20, r24
|
|
14f4: bd 01 movw r22, r26
|
|
14f6: cf 01 movw r24, r30
|
|
14f8: 08 95 ret
|
|
|
|
000014fa <__umulhisi3>:
|
|
14fa: a2 9f mul r26, r18
|
|
14fc: b0 01 movw r22, r0
|
|
14fe: b3 9f mul r27, r19
|
|
1500: c0 01 movw r24, r0
|
|
1502: a3 9f mul r26, r19
|
|
1504: 70 0d add r23, r0
|
|
1506: 81 1d adc r24, r1
|
|
1508: 11 24 eor r1, r1
|
|
150a: 91 1d adc r25, r1
|
|
150c: b2 9f mul r27, r18
|
|
150e: 70 0d add r23, r0
|
|
1510: 81 1d adc r24, r1
|
|
1512: 11 24 eor r1, r1
|
|
1514: 91 1d adc r25, r1
|
|
1516: 08 95 ret
|
|
|
|
00001518 <_exit>:
|
|
1518: f8 94 cli
|
|
|
|
0000151a <__stop_program>:
|
|
151a: ff cf rjmp .-2 ; 0x151a <__stop_program>
|