AvrLabFinal/final_project/Debug/final_project.lss
2024-04-25 00:09:09 -05:00

3221 lines
125 KiB
Plaintext

final_project.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 000000b2 00800100 000015de 00001672 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 000015de 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .bss 00000002 008001b2 008001b2 00001724 2**0
ALLOC
3 .comment 00000030 00000000 00000000 00001724 2**0
CONTENTS, READONLY
4 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 00001754 2**2
CONTENTS, READONLY
5 .debug_aranges 000000d8 00000000 00000000 00001794 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_info 0000128c 00000000 00000000 0000186c 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_abbrev 00000c65 00000000 00000000 00002af8 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_line 00000b2e 00000000 00000000 0000375d 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_frame 000002a4 00000000 00000000 0000428c 2**2
CONTENTS, READONLY, DEBUGGING
10 .debug_str 000006a3 00000000 00000000 00004530 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_loc 000004f1 00000000 00000000 00004bd3 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_ranges 000000a8 00000000 00000000 000050c4 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 83 00 jmp 0x106 ; 0x106 <__bad_interrupt>
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: ee ed ldi r30, 0xDE ; 222
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: a2 3b cpi r26, 0xB2 ; 178
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: a2 eb ldi r26, 0xB2 ; 178
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: a4 3b cpi r26, 0xB4 ; 180
fa: b2 07 cpc r27, r18
fc: e1 f7 brne .-8 ; 0xf6 <.do_clear_bss_loop>
fe: 0e 94 b2 03 call 0x764 ; 0x764 <main>
102: 0c 94 ed 0a jmp 0x15da ; 0x15da <_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
}
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
//OCRN1A = (seconds to wait / (prescaler / f_cpu))
OCR1A = 0x3d09; // we'll only need to delay 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); //discard possible compare match
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 prescaler
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>:
//disable 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); //discard possible compare match
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); //no clock source
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>:
//see if a second pas passed since start_timer
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)); //check if compare match
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>:
}
char usart_rxt() {
if(UCSR1A & (1 << RXC)) { return UDR1; } //attempt to get input,
return '\0'; //if there is none, then return null char
}
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>:
char 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
while(!(UCSR1A & (1 << RXC))); //wait for input via polling
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>
return UDR1;
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>:
void usart_txstr(char *str) {
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
//transmit strong character by character untill null terminator
for(int i = 0; str[i] != '\0'; i++) usart_txt(str[i]);
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>:
* the 2nd bit is set. When displaying elements, we assume
* the second bit is the middle PORTE LED.
*/
uint8_t get_button() {
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: a1 97 sbiw r28, 0x21 ; 33
31e: 0f b6 in r0, 0x3f ; 63
320: f8 94 cli
322: de bf out 0x3e, r29 ; 62
324: 0f be out 0x3f, r0 ; 63
326: cd bf out 0x3d, r28 ; 61
//debouncing is done by waiting for the user to stop pressing the button,
//then waiting an amount of time for the bouncing to stop.
const double debounce_wait = 100.0;
328: 80 e0 ldi r24, 0x00 ; 0
32a: 90 e0 ldi r25, 0x00 ; 0
32c: a8 ec ldi r26, 0xC8 ; 200
32e: b2 e4 ldi r27, 0x42 ; 66
330: 89 83 std Y+1, r24 ; 0x01
332: 9a 83 std Y+2, r25 ; 0x02
334: ab 83 std Y+3, r26 ; 0x03
336: bc 83 std Y+4, r27 ; 0x04
if(~PINE & (1 << 6)) {
338: 8c e2 ldi r24, 0x2C ; 44
33a: 90 e0 ldi r25, 0x00 ; 0
33c: fc 01 movw r30, r24
33e: 80 81 ld r24, Z
340: 88 2f mov r24, r24
342: 90 e0 ldi r25, 0x00 ; 0
344: 80 74 andi r24, 0x40 ; 64
346: 99 27 eor r25, r25
348: 89 2b or r24, r25
34a: 09 f0 breq .+2 ; 0x34e <get_button+0x3a>
34c: 7f c0 rjmp .+254 ; 0x44c <__EEPROM_REGION_LENGTH__+0x4c>
while((~PINE & (1<<6)));
34e: 00 00 nop
350: 8c e2 ldi r24, 0x2C ; 44
352: 90 e0 ldi r25, 0x00 ; 0
354: fc 01 movw r30, r24
356: 80 81 ld r24, Z
358: 88 2f mov r24, r24
35a: 90 e0 ldi r25, 0x00 ; 0
35c: 80 74 andi r24, 0x40 ; 64
35e: 99 27 eor r25, r25
360: 89 2b or r24, r25
362: b1 f3 breq .-20 ; 0x350 <get_button+0x3c>
364: 89 81 ldd r24, Y+1 ; 0x01
366: 9a 81 ldd r25, Y+2 ; 0x02
368: ab 81 ldd r26, Y+3 ; 0x03
36a: bc 81 ldd r27, Y+4 ; 0x04
36c: 8a 87 std Y+10, r24 ; 0x0a
36e: 9b 87 std Y+11, r25 ; 0x0b
370: ac 87 std Y+12, r26 ; 0x0c
372: bd 87 std Y+13, r27 ; 0x0d
__builtin_avr_delay_cycles(__ticks_dc);
#else
uint16_t __ticks;
__tmp = ((F_CPU) / 4e3) * __ms;
374: 20 e0 ldi r18, 0x00 ; 0
376: 30 e0 ldi r19, 0x00 ; 0
378: 4a e7 ldi r20, 0x7A ; 122
37a: 55 e4 ldi r21, 0x45 ; 69
37c: 6a 85 ldd r22, Y+10 ; 0x0a
37e: 7b 85 ldd r23, Y+11 ; 0x0b
380: 8c 85 ldd r24, Y+12 ; 0x0c
382: 9d 85 ldd r25, Y+13 ; 0x0d
384: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
388: dc 01 movw r26, r24
38a: cb 01 movw r24, r22
38c: 8e 87 std Y+14, r24 ; 0x0e
38e: 9f 87 std Y+15, r25 ; 0x0f
390: a8 8b std Y+16, r26 ; 0x10
392: b9 8b std Y+17, r27 ; 0x11
if (__tmp < 1.0)
394: 20 e0 ldi r18, 0x00 ; 0
396: 30 e0 ldi r19, 0x00 ; 0
398: 40 e8 ldi r20, 0x80 ; 128
39a: 5f e3 ldi r21, 0x3F ; 63
39c: 6e 85 ldd r22, Y+14 ; 0x0e
39e: 7f 85 ldd r23, Y+15 ; 0x0f
3a0: 88 89 ldd r24, Y+16 ; 0x10
3a2: 99 89 ldd r25, Y+17 ; 0x11
3a4: 0e 94 f4 07 call 0xfe8 ; 0xfe8 <__cmpsf2>
3a8: 88 23 and r24, r24
3aa: 2c f4 brge .+10 ; 0x3b6 <get_button+0xa2>
__ticks = 1;
3ac: 81 e0 ldi r24, 0x01 ; 1
3ae: 90 e0 ldi r25, 0x00 ; 0
3b0: 9b 8b std Y+19, r25 ; 0x13
3b2: 8a 8b std Y+18, r24 ; 0x12
3b4: 3f c0 rjmp .+126 ; 0x434 <__EEPROM_REGION_LENGTH__+0x34>
else if (__tmp > 65535)
3b6: 20 e0 ldi r18, 0x00 ; 0
3b8: 3f ef ldi r19, 0xFF ; 255
3ba: 4f e7 ldi r20, 0x7F ; 127
3bc: 57 e4 ldi r21, 0x47 ; 71
3be: 6e 85 ldd r22, Y+14 ; 0x0e
3c0: 7f 85 ldd r23, Y+15 ; 0x0f
3c2: 88 89 ldd r24, Y+16 ; 0x10
3c4: 99 89 ldd r25, Y+17 ; 0x11
3c6: 0e 94 94 09 call 0x1328 ; 0x1328 <__gesf2>
3ca: 18 16 cp r1, r24
3cc: 4c f5 brge .+82 ; 0x420 <__EEPROM_REGION_LENGTH__+0x20>
{
// __ticks = requested delay in 1/10 ms
__ticks = (uint16_t) (__ms * 10.0);
3ce: 20 e0 ldi r18, 0x00 ; 0
3d0: 30 e0 ldi r19, 0x00 ; 0
3d2: 40 e2 ldi r20, 0x20 ; 32
3d4: 51 e4 ldi r21, 0x41 ; 65
3d6: 6a 85 ldd r22, Y+10 ; 0x0a
3d8: 7b 85 ldd r23, Y+11 ; 0x0b
3da: 8c 85 ldd r24, Y+12 ; 0x0c
3dc: 9d 85 ldd r25, Y+13 ; 0x0d
3de: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
3e2: dc 01 movw r26, r24
3e4: cb 01 movw r24, r22
3e6: bc 01 movw r22, r24
3e8: cd 01 movw r24, r26
3ea: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
3ee: dc 01 movw r26, r24
3f0: cb 01 movw r24, r22
3f2: 9b 8b std Y+19, r25 ; 0x13
3f4: 8a 8b std Y+18, r24 ; 0x12
3f6: 0f c0 rjmp .+30 ; 0x416 <__EEPROM_REGION_LENGTH__+0x16>
3f8: 80 e9 ldi r24, 0x90 ; 144
3fa: 91 e0 ldi r25, 0x01 ; 1
3fc: 9d 8b std Y+21, r25 ; 0x15
3fe: 8c 8b std Y+20, r24 ; 0x14
milliseconds can be achieved.
*/
void
_delay_loop_2(uint16_t __count)
{
__asm__ volatile (
400: 8c 89 ldd r24, Y+20 ; 0x14
402: 9d 89 ldd r25, Y+21 ; 0x15
404: 01 97 sbiw r24, 0x01 ; 1
406: f1 f7 brne .-4 ; 0x404 <__EEPROM_REGION_LENGTH__+0x4>
408: 9d 8b std Y+21, r25 ; 0x15
40a: 8c 8b std Y+20, r24 ; 0x14
while(__ticks)
{
// wait 1/10 ms
_delay_loop_2(((F_CPU) / 4e3) / 10);
__ticks --;
40c: 8a 89 ldd r24, Y+18 ; 0x12
40e: 9b 89 ldd r25, Y+19 ; 0x13
410: 01 97 sbiw r24, 0x01 ; 1
412: 9b 8b std Y+19, r25 ; 0x13
414: 8a 8b std Y+18, r24 ; 0x12
__ticks = 1;
else if (__tmp > 65535)
{
// __ticks = requested delay in 1/10 ms
__ticks = (uint16_t) (__ms * 10.0);
while(__ticks)
416: 8a 89 ldd r24, Y+18 ; 0x12
418: 9b 89 ldd r25, Y+19 ; 0x13
41a: 89 2b or r24, r25
41c: 69 f7 brne .-38 ; 0x3f8 <get_button+0xe4>
41e: 14 c0 rjmp .+40 ; 0x448 <__EEPROM_REGION_LENGTH__+0x48>
__ticks --;
}
return;
}
else
__ticks = (uint16_t)__tmp;
420: 6e 85 ldd r22, Y+14 ; 0x0e
422: 7f 85 ldd r23, Y+15 ; 0x0f
424: 88 89 ldd r24, Y+16 ; 0x10
426: 99 89 ldd r25, Y+17 ; 0x11
428: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
42c: dc 01 movw r26, r24
42e: cb 01 movw r24, r22
430: 9b 8b std Y+19, r25 ; 0x13
432: 8a 8b std Y+18, r24 ; 0x12
434: 8a 89 ldd r24, Y+18 ; 0x12
436: 9b 89 ldd r25, Y+19 ; 0x13
438: 9f 8b std Y+23, r25 ; 0x17
43a: 8e 8b std Y+22, r24 ; 0x16
43c: 8e 89 ldd r24, Y+22 ; 0x16
43e: 9f 89 ldd r25, Y+23 ; 0x17
440: 01 97 sbiw r24, 0x01 ; 1
442: f1 f7 brne .-4 ; 0x440 <__EEPROM_REGION_LENGTH__+0x40>
444: 9f 8b std Y+23, r25 ; 0x17
446: 8e 8b std Y+22, r24 ; 0x16
_delay_ms(debounce_wait);
return (1 << 2);
448: 84 e0 ldi r24, 0x04 ; 4
44a: 85 c0 rjmp .+266 ; 0x556 <__EEPROM_REGION_LENGTH__+0x156>
}
uint8_t porta_state = (~PINA) & ~(0b1100);
44c: 80 e2 ldi r24, 0x20 ; 32
44e: 90 e0 ldi r25, 0x00 ; 0
450: fc 01 movw r30, r24
452: 80 81 ld r24, Z
454: 80 95 com r24
456: 83 7f andi r24, 0xF3 ; 243
458: 89 87 std Y+9, r24 ; 0x09
if(porta_state) {
45a: 89 85 ldd r24, Y+9 ; 0x09
45c: 88 23 and r24, r24
45e: 09 f4 brne .+2 ; 0x462 <__EEPROM_REGION_LENGTH__+0x62>
460: 79 c0 rjmp .+242 ; 0x554 <__EEPROM_REGION_LENGTH__+0x154>
while(PINA != 0xff);
462: 00 00 nop
464: 80 e2 ldi r24, 0x20 ; 32
466: 90 e0 ldi r25, 0x00 ; 0
468: fc 01 movw r30, r24
46a: 80 81 ld r24, Z
46c: 8f 3f cpi r24, 0xFF ; 255
46e: d1 f7 brne .-12 ; 0x464 <__EEPROM_REGION_LENGTH__+0x64>
470: 89 81 ldd r24, Y+1 ; 0x01
472: 9a 81 ldd r25, Y+2 ; 0x02
474: ab 81 ldd r26, Y+3 ; 0x03
476: bc 81 ldd r27, Y+4 ; 0x04
478: 8d 83 std Y+5, r24 ; 0x05
47a: 9e 83 std Y+6, r25 ; 0x06
47c: af 83 std Y+7, r26 ; 0x07
47e: b8 87 std Y+8, r27 ; 0x08
__builtin_avr_delay_cycles(__ticks_dc);
#else
uint16_t __ticks;
__tmp = ((F_CPU) / 4e3) * __ms;
480: 20 e0 ldi r18, 0x00 ; 0
482: 30 e0 ldi r19, 0x00 ; 0
484: 4a e7 ldi r20, 0x7A ; 122
486: 55 e4 ldi r21, 0x45 ; 69
488: 6d 81 ldd r22, Y+5 ; 0x05
48a: 7e 81 ldd r23, Y+6 ; 0x06
48c: 8f 81 ldd r24, Y+7 ; 0x07
48e: 98 85 ldd r25, Y+8 ; 0x08
490: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
494: dc 01 movw r26, r24
496: cb 01 movw r24, r22
498: 88 8f std Y+24, r24 ; 0x18
49a: 99 8f std Y+25, r25 ; 0x19
49c: aa 8f std Y+26, r26 ; 0x1a
49e: bb 8f std Y+27, r27 ; 0x1b
if (__tmp < 1.0)
4a0: 20 e0 ldi r18, 0x00 ; 0
4a2: 30 e0 ldi r19, 0x00 ; 0
4a4: 40 e8 ldi r20, 0x80 ; 128
4a6: 5f e3 ldi r21, 0x3F ; 63
4a8: 68 8d ldd r22, Y+24 ; 0x18
4aa: 79 8d ldd r23, Y+25 ; 0x19
4ac: 8a 8d ldd r24, Y+26 ; 0x1a
4ae: 9b 8d ldd r25, Y+27 ; 0x1b
4b0: 0e 94 f4 07 call 0xfe8 ; 0xfe8 <__cmpsf2>
4b4: 88 23 and r24, r24
4b6: 2c f4 brge .+10 ; 0x4c2 <__EEPROM_REGION_LENGTH__+0xc2>
__ticks = 1;
4b8: 81 e0 ldi r24, 0x01 ; 1
4ba: 90 e0 ldi r25, 0x00 ; 0
4bc: 9d 8f std Y+29, r25 ; 0x1d
4be: 8c 8f std Y+28, r24 ; 0x1c
4c0: 3f c0 rjmp .+126 ; 0x540 <__EEPROM_REGION_LENGTH__+0x140>
else if (__tmp > 65535)
4c2: 20 e0 ldi r18, 0x00 ; 0
4c4: 3f ef ldi r19, 0xFF ; 255
4c6: 4f e7 ldi r20, 0x7F ; 127
4c8: 57 e4 ldi r21, 0x47 ; 71
4ca: 68 8d ldd r22, Y+24 ; 0x18
4cc: 79 8d ldd r23, Y+25 ; 0x19
4ce: 8a 8d ldd r24, Y+26 ; 0x1a
4d0: 9b 8d ldd r25, Y+27 ; 0x1b
4d2: 0e 94 94 09 call 0x1328 ; 0x1328 <__gesf2>
4d6: 18 16 cp r1, r24
4d8: 4c f5 brge .+82 ; 0x52c <__EEPROM_REGION_LENGTH__+0x12c>
{
// __ticks = requested delay in 1/10 ms
__ticks = (uint16_t) (__ms * 10.0);
4da: 20 e0 ldi r18, 0x00 ; 0
4dc: 30 e0 ldi r19, 0x00 ; 0
4de: 40 e2 ldi r20, 0x20 ; 32
4e0: 51 e4 ldi r21, 0x41 ; 65
4e2: 6d 81 ldd r22, Y+5 ; 0x05
4e4: 7e 81 ldd r23, Y+6 ; 0x06
4e6: 8f 81 ldd r24, Y+7 ; 0x07
4e8: 98 85 ldd r25, Y+8 ; 0x08
4ea: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
4ee: dc 01 movw r26, r24
4f0: cb 01 movw r24, r22
4f2: bc 01 movw r22, r24
4f4: cd 01 movw r24, r26
4f6: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
4fa: dc 01 movw r26, r24
4fc: cb 01 movw r24, r22
4fe: 9d 8f std Y+29, r25 ; 0x1d
500: 8c 8f std Y+28, r24 ; 0x1c
502: 0f c0 rjmp .+30 ; 0x522 <__EEPROM_REGION_LENGTH__+0x122>
504: 80 e9 ldi r24, 0x90 ; 144
506: 91 e0 ldi r25, 0x01 ; 1
508: 9f 8f std Y+31, r25 ; 0x1f
50a: 8e 8f std Y+30, r24 ; 0x1e
50c: 8e 8d ldd r24, Y+30 ; 0x1e
50e: 9f 8d ldd r25, Y+31 ; 0x1f
510: 01 97 sbiw r24, 0x01 ; 1
512: f1 f7 brne .-4 ; 0x510 <__EEPROM_REGION_LENGTH__+0x110>
514: 9f 8f std Y+31, r25 ; 0x1f
516: 8e 8f std Y+30, r24 ; 0x1e
while(__ticks)
{
// wait 1/10 ms
_delay_loop_2(((F_CPU) / 4e3) / 10);
__ticks --;
518: 8c 8d ldd r24, Y+28 ; 0x1c
51a: 9d 8d ldd r25, Y+29 ; 0x1d
51c: 01 97 sbiw r24, 0x01 ; 1
51e: 9d 8f std Y+29, r25 ; 0x1d
520: 8c 8f std Y+28, r24 ; 0x1c
__ticks = 1;
else if (__tmp > 65535)
{
// __ticks = requested delay in 1/10 ms
__ticks = (uint16_t) (__ms * 10.0);
while(__ticks)
522: 8c 8d ldd r24, Y+28 ; 0x1c
524: 9d 8d ldd r25, Y+29 ; 0x1d
526: 89 2b or r24, r25
528: 69 f7 brne .-38 ; 0x504 <__EEPROM_REGION_LENGTH__+0x104>
52a: 14 c0 rjmp .+40 ; 0x554 <__EEPROM_REGION_LENGTH__+0x154>
__ticks --;
}
return;
}
else
__ticks = (uint16_t)__tmp;
52c: 68 8d ldd r22, Y+24 ; 0x18
52e: 79 8d ldd r23, Y+25 ; 0x19
530: 8a 8d ldd r24, Y+26 ; 0x1a
532: 9b 8d ldd r25, Y+27 ; 0x1b
534: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
538: dc 01 movw r26, r24
53a: cb 01 movw r24, r22
53c: 9d 8f std Y+29, r25 ; 0x1d
53e: 8c 8f std Y+28, r24 ; 0x1c
540: 8c 8d ldd r24, Y+28 ; 0x1c
542: 9d 8d ldd r25, Y+29 ; 0x1d
544: 99 a3 std Y+33, r25 ; 0x21
546: 88 a3 std Y+32, r24 ; 0x20
548: 88 a1 ldd r24, Y+32 ; 0x20
54a: 99 a1 ldd r25, Y+33 ; 0x21
54c: 01 97 sbiw r24, 0x01 ; 1
54e: f1 f7 brne .-4 ; 0x54c <__EEPROM_REGION_LENGTH__+0x14c>
550: 99 a3 std Y+33, r25 ; 0x21
552: 88 a3 std Y+32, r24 ; 0x20
_delay_ms(debounce_wait);
}
return porta_state;
554: 89 85 ldd r24, Y+9 ; 0x09
}
556: a1 96 adiw r28, 0x21 ; 33
558: 0f b6 in r0, 0x3f ; 63
55a: f8 94 cli
55c: de bf out 0x3e, r29 ; 62
55e: 0f be out 0x3f, r0 ; 63
560: cd bf out 0x3d, r28 ; 61
562: df 91 pop r29
564: cf 91 pop r28
566: 08 95 ret
00000568 <display_element>:
//for documentation see above paragraph
void display_element(uint8_t element, unsigned int time) {
568: cf 93 push r28
56a: df 93 push r29
56c: cd b7 in r28, 0x3d ; 61
56e: de b7 in r29, 0x3e ; 62
570: 63 97 sbiw r28, 0x13 ; 19
572: 0f b6 in r0, 0x3f ; 63
574: f8 94 cli
576: de bf out 0x3e, r29 ; 62
578: 0f be out 0x3f, r0 ; 63
57a: cd bf out 0x3d, r28 ; 61
57c: 89 8b std Y+17, r24 ; 0x11
57e: 7b 8b std Y+19, r23 ; 0x13
580: 6a 8b std Y+18, r22 ; 0x12
uint8_t portd_state = 0;
582: 1a 82 std Y+2, r1 ; 0x02
uint8_t porte_state = 0;
584: 19 82 std Y+1, r1 ; 0x01
if(element & (1 << 2)) porte_state = (1<<5);
586: 89 89 ldd r24, Y+17 ; 0x11
588: 88 2f mov r24, r24
58a: 90 e0 ldi r25, 0x00 ; 0
58c: 84 70 andi r24, 0x04 ; 4
58e: 99 27 eor r25, r25
590: 89 2b or r24, r25
592: 11 f0 breq .+4 ; 0x598 <display_element+0x30>
594: 80 e2 ldi r24, 0x20 ; 32
596: 89 83 std Y+1, r24 ; 0x01
portd_state = element & ~(0b1100);
598: 89 89 ldd r24, Y+17 ; 0x11
59a: 83 7f andi r24, 0xF3 ; 243
59c: 8a 83 std Y+2, r24 ; 0x02
PORTD ^= portd_state;
59e: 8b e2 ldi r24, 0x2B ; 43
5a0: 90 e0 ldi r25, 0x00 ; 0
5a2: 2b e2 ldi r18, 0x2B ; 43
5a4: 30 e0 ldi r19, 0x00 ; 0
5a6: f9 01 movw r30, r18
5a8: 30 81 ld r19, Z
5aa: 2a 81 ldd r18, Y+2 ; 0x02
5ac: 23 27 eor r18, r19
5ae: fc 01 movw r30, r24
5b0: 20 83 st Z, r18
PORTE ^= porte_state;
5b2: 8e e2 ldi r24, 0x2E ; 46
5b4: 90 e0 ldi r25, 0x00 ; 0
5b6: 2e e2 ldi r18, 0x2E ; 46
5b8: 30 e0 ldi r19, 0x00 ; 0
5ba: f9 01 movw r30, r18
5bc: 30 81 ld r19, Z
5be: 29 81 ldd r18, Y+1 ; 0x01
5c0: 23 27 eor r18, r19
5c2: fc 01 movw r30, r24
5c4: 20 83 st Z, r18
beep(329.63, .25);
5c6: 20 e0 ldi r18, 0x00 ; 0
5c8: 30 e0 ldi r19, 0x00 ; 0
5ca: 40 e8 ldi r20, 0x80 ; 128
5cc: 5e e3 ldi r21, 0x3E ; 62
5ce: 64 ea ldi r22, 0xA4 ; 164
5d0: 70 ed ldi r23, 0xD0 ; 208
5d2: 84 ea ldi r24, 0xA4 ; 164
5d4: 93 e4 ldi r25, 0x43 ; 67
5d6: 0e 94 86 06 call 0xd0c ; 0xd0c <beep>
_delay_ms(time * 1000);
5da: 4a 89 ldd r20, Y+18 ; 0x12
5dc: 5b 89 ldd r21, Y+19 ; 0x13
5de: 28 ee ldi r18, 0xE8 ; 232
5e0: 33 e0 ldi r19, 0x03 ; 3
5e2: 42 9f mul r20, r18
5e4: c0 01 movw r24, r0
5e6: 43 9f mul r20, r19
5e8: 90 0d add r25, r0
5ea: 52 9f mul r21, r18
5ec: 90 0d add r25, r0
5ee: 11 24 eor r1, r1
5f0: cc 01 movw r24, r24
5f2: a0 e0 ldi r26, 0x00 ; 0
5f4: b0 e0 ldi r27, 0x00 ; 0
5f6: bc 01 movw r22, r24
5f8: cd 01 movw r24, r26
5fa: 0e 94 a1 08 call 0x1142 ; 0x1142 <__floatunsisf>
5fe: dc 01 movw r26, r24
600: cb 01 movw r24, r22
602: 8b 83 std Y+3, r24 ; 0x03
604: 9c 83 std Y+4, r25 ; 0x04
606: ad 83 std Y+5, r26 ; 0x05
608: be 83 std Y+6, r27 ; 0x06
__builtin_avr_delay_cycles(__ticks_dc);
#else
uint16_t __ticks;
__tmp = ((F_CPU) / 4e3) * __ms;
60a: 20 e0 ldi r18, 0x00 ; 0
60c: 30 e0 ldi r19, 0x00 ; 0
60e: 4a e7 ldi r20, 0x7A ; 122
610: 55 e4 ldi r21, 0x45 ; 69
612: 6b 81 ldd r22, Y+3 ; 0x03
614: 7c 81 ldd r23, Y+4 ; 0x04
616: 8d 81 ldd r24, Y+5 ; 0x05
618: 9e 81 ldd r25, Y+6 ; 0x06
61a: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
61e: dc 01 movw r26, r24
620: cb 01 movw r24, r22
622: 8f 83 std Y+7, r24 ; 0x07
624: 98 87 std Y+8, r25 ; 0x08
626: a9 87 std Y+9, r26 ; 0x09
628: ba 87 std Y+10, r27 ; 0x0a
if (__tmp < 1.0)
62a: 20 e0 ldi r18, 0x00 ; 0
62c: 30 e0 ldi r19, 0x00 ; 0
62e: 40 e8 ldi r20, 0x80 ; 128
630: 5f e3 ldi r21, 0x3F ; 63
632: 6f 81 ldd r22, Y+7 ; 0x07
634: 78 85 ldd r23, Y+8 ; 0x08
636: 89 85 ldd r24, Y+9 ; 0x09
638: 9a 85 ldd r25, Y+10 ; 0x0a
63a: 0e 94 f4 07 call 0xfe8 ; 0xfe8 <__cmpsf2>
63e: 88 23 and r24, r24
640: 2c f4 brge .+10 ; 0x64c <display_element+0xe4>
__ticks = 1;
642: 81 e0 ldi r24, 0x01 ; 1
644: 90 e0 ldi r25, 0x00 ; 0
646: 9c 87 std Y+12, r25 ; 0x0c
648: 8b 87 std Y+11, r24 ; 0x0b
64a: 3f c0 rjmp .+126 ; 0x6ca <display_element+0x162>
else if (__tmp > 65535)
64c: 20 e0 ldi r18, 0x00 ; 0
64e: 3f ef ldi r19, 0xFF ; 255
650: 4f e7 ldi r20, 0x7F ; 127
652: 57 e4 ldi r21, 0x47 ; 71
654: 6f 81 ldd r22, Y+7 ; 0x07
656: 78 85 ldd r23, Y+8 ; 0x08
658: 89 85 ldd r24, Y+9 ; 0x09
65a: 9a 85 ldd r25, Y+10 ; 0x0a
65c: 0e 94 94 09 call 0x1328 ; 0x1328 <__gesf2>
660: 18 16 cp r1, r24
662: 4c f5 brge .+82 ; 0x6b6 <display_element+0x14e>
{
// __ticks = requested delay in 1/10 ms
__ticks = (uint16_t) (__ms * 10.0);
664: 20 e0 ldi r18, 0x00 ; 0
666: 30 e0 ldi r19, 0x00 ; 0
668: 40 e2 ldi r20, 0x20 ; 32
66a: 51 e4 ldi r21, 0x41 ; 65
66c: 6b 81 ldd r22, Y+3 ; 0x03
66e: 7c 81 ldd r23, Y+4 ; 0x04
670: 8d 81 ldd r24, Y+5 ; 0x05
672: 9e 81 ldd r25, Y+6 ; 0x06
674: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
678: dc 01 movw r26, r24
67a: cb 01 movw r24, r22
67c: bc 01 movw r22, r24
67e: cd 01 movw r24, r26
680: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
684: dc 01 movw r26, r24
686: cb 01 movw r24, r22
688: 9c 87 std Y+12, r25 ; 0x0c
68a: 8b 87 std Y+11, r24 ; 0x0b
68c: 0f c0 rjmp .+30 ; 0x6ac <display_element+0x144>
68e: 80 e9 ldi r24, 0x90 ; 144
690: 91 e0 ldi r25, 0x01 ; 1
692: 9e 87 std Y+14, r25 ; 0x0e
694: 8d 87 std Y+13, r24 ; 0x0d
696: 8d 85 ldd r24, Y+13 ; 0x0d
698: 9e 85 ldd r25, Y+14 ; 0x0e
69a: 01 97 sbiw r24, 0x01 ; 1
69c: f1 f7 brne .-4 ; 0x69a <display_element+0x132>
69e: 9e 87 std Y+14, r25 ; 0x0e
6a0: 8d 87 std Y+13, r24 ; 0x0d
while(__ticks)
{
// wait 1/10 ms
_delay_loop_2(((F_CPU) / 4e3) / 10);
__ticks --;
6a2: 8b 85 ldd r24, Y+11 ; 0x0b
6a4: 9c 85 ldd r25, Y+12 ; 0x0c
6a6: 01 97 sbiw r24, 0x01 ; 1
6a8: 9c 87 std Y+12, r25 ; 0x0c
6aa: 8b 87 std Y+11, r24 ; 0x0b
__ticks = 1;
else if (__tmp > 65535)
{
// __ticks = requested delay in 1/10 ms
__ticks = (uint16_t) (__ms * 10.0);
while(__ticks)
6ac: 8b 85 ldd r24, Y+11 ; 0x0b
6ae: 9c 85 ldd r25, Y+12 ; 0x0c
6b0: 89 2b or r24, r25
6b2: 69 f7 brne .-38 ; 0x68e <display_element+0x126>
6b4: 14 c0 rjmp .+40 ; 0x6de <display_element+0x176>
__ticks --;
}
return;
}
else
__ticks = (uint16_t)__tmp;
6b6: 6f 81 ldd r22, Y+7 ; 0x07
6b8: 78 85 ldd r23, Y+8 ; 0x08
6ba: 89 85 ldd r24, Y+9 ; 0x09
6bc: 9a 85 ldd r25, Y+10 ; 0x0a
6be: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
6c2: dc 01 movw r26, r24
6c4: cb 01 movw r24, r22
6c6: 9c 87 std Y+12, r25 ; 0x0c
6c8: 8b 87 std Y+11, r24 ; 0x0b
6ca: 8b 85 ldd r24, Y+11 ; 0x0b
6cc: 9c 85 ldd r25, Y+12 ; 0x0c
6ce: 98 8b std Y+16, r25 ; 0x10
6d0: 8f 87 std Y+15, r24 ; 0x0f
6d2: 8f 85 ldd r24, Y+15 ; 0x0f
6d4: 98 89 ldd r25, Y+16 ; 0x10
6d6: 01 97 sbiw r24, 0x01 ; 1
6d8: f1 f7 brne .-4 ; 0x6d6 <display_element+0x16e>
6da: 98 8b std Y+16, r25 ; 0x10
6dc: 8f 87 std Y+15, r24 ; 0x0f
PORTD ^= portd_state;
6de: 8b e2 ldi r24, 0x2B ; 43
6e0: 90 e0 ldi r25, 0x00 ; 0
6e2: 2b e2 ldi r18, 0x2B ; 43
6e4: 30 e0 ldi r19, 0x00 ; 0
6e6: f9 01 movw r30, r18
6e8: 30 81 ld r19, Z
6ea: 2a 81 ldd r18, Y+2 ; 0x02
6ec: 23 27 eor r18, r19
6ee: fc 01 movw r30, r24
6f0: 20 83 st Z, r18
PORTE ^= porte_state;
6f2: 8e e2 ldi r24, 0x2E ; 46
6f4: 90 e0 ldi r25, 0x00 ; 0
6f6: 2e e2 ldi r18, 0x2E ; 46
6f8: 30 e0 ldi r19, 0x00 ; 0
6fa: f9 01 movw r30, r18
6fc: 30 81 ld r19, Z
6fe: 29 81 ldd r18, Y+1 ; 0x01
700: 23 27 eor r18, r19
702: fc 01 movw r30, r24
704: 20 83 st Z, r18
}
706: 00 00 nop
708: 63 96 adiw r28, 0x13 ; 19
70a: 0f b6 in r0, 0x3f ; 63
70c: f8 94 cli
70e: de bf out 0x3e, r29 ; 62
710: 0f be out 0x3f, r0 ; 63
712: cd bf out 0x3d, r28 ; 61
714: df 91 pop r29
716: cf 91 pop r28
718: 08 95 ret
0000071a <init_io>:
void init_io() {
71a: cf 93 push r28
71c: df 93 push r29
71e: cd b7 in r28, 0x3d ; 61
720: de b7 in r29, 0x3e ; 62
//initilize IO registers
//Buttons
DDRA = 0x00;
722: 81 e2 ldi r24, 0x21 ; 33
724: 90 e0 ldi r25, 0x00 ; 0
726: fc 01 movw r30, r24
728: 10 82 st Z, r1
PORTA = 0xff;
72a: 82 e2 ldi r24, 0x22 ; 34
72c: 90 e0 ldi r25, 0x00 ; 0
72e: 2f ef ldi r18, 0xFF ; 255
730: fc 01 movw r30, r24
732: 20 83 st Z, r18
//LEDs
DDRD = 0xff;
734: 8a e2 ldi r24, 0x2A ; 42
736: 90 e0 ldi r25, 0x00 ; 0
738: 2f ef ldi r18, 0xFF ; 255
73a: fc 01 movw r30, r24
73c: 20 83 st Z, r18
PORTD = 0xff;
73e: 8b e2 ldi r24, 0x2B ; 43
740: 90 e0 ldi r25, 0x00 ; 0
742: 2f ef ldi r18, 0xFF ; 255
744: fc 01 movw r30, r24
746: 20 83 st Z, r18
//speaker and middle LED
DDRE = (1 << 4) | (1 << 5);
748: 8d e2 ldi r24, 0x2D ; 45
74a: 90 e0 ldi r25, 0x00 ; 0
74c: 20 e3 ldi r18, 0x30 ; 48
74e: fc 01 movw r30, r24
750: 20 83 st Z, r18
PORTE = 0xff;
752: 8e e2 ldi r24, 0x2E ; 46
754: 90 e0 ldi r25, 0x00 ; 0
756: 2f ef ldi r18, 0xFF ; 255
758: fc 01 movw r30, r24
75a: 20 83 st Z, r18
}
75c: 00 00 nop
75e: df 91 pop r29
760: cf 91 pop r28
762: 08 95 ret
00000764 <main>:
int main(void) {
764: 8f 92 push r8
766: 9f 92 push r9
768: af 92 push r10
76a: bf 92 push r11
76c: cf 92 push r12
76e: df 92 push r13
770: ef 92 push r14
772: ff 92 push r15
774: cf 93 push r28
776: df 93 push r29
778: cd b7 in r28, 0x3d ; 61
77a: de b7 in r29, 0x3e ; 62
77c: a5 97 sbiw r28, 0x25 ; 37
77e: 0f b6 in r0, 0x3f ; 63
780: f8 94 cli
782: de bf out 0x3e, r29 ; 62
784: 0f be out 0x3f, r0 ; 63
786: cd bf out 0x3d, r28 ; 61
cli();
788: f8 94 cli
timer_init_ctc();
78a: 0e 94 85 00 call 0x10a ; 0x10a <timer_init_ctc>
init_io();
78e: 0e 94 8d 03 call 0x71a ; 0x71a <init_io>
usart_init();
792: 0e 94 ff 00 call 0x1fe ; 0x1fe <usart_init>
while(1) {
int level = 0;
796: 1a 82 std Y+2, r1 ; 0x02
798: 19 82 std Y+1, r1 ; 0x01
//get level
usart_txstr(
79a: 84 e0 ldi r24, 0x04 ; 4
79c: 91 e0 ldi r25, 0x01 ; 1
79e: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
"1. Easy\n"
"2. Moderate\n"
"3. Give me pain.");
//ask until valid input
while((level > 3) || (level < 1)) level = (int)(usart_rxt_blocking() - '0');
7a2: 07 c0 rjmp .+14 ; 0x7b2 <main+0x4e>
7a4: 0e 94 4c 01 call 0x298 ; 0x298 <usart_rxt_blocking>
7a8: 88 2f mov r24, r24
7aa: 90 e0 ldi r25, 0x00 ; 0
7ac: c0 97 sbiw r24, 0x30 ; 48
7ae: 9a 83 std Y+2, r25 ; 0x02
7b0: 89 83 std Y+1, r24 ; 0x01
7b2: 89 81 ldd r24, Y+1 ; 0x01
7b4: 9a 81 ldd r25, Y+2 ; 0x02
7b6: 04 97 sbiw r24, 0x04 ; 4
7b8: ac f7 brge .-22 ; 0x7a4 <main+0x40>
7ba: 89 81 ldd r24, Y+1 ; 0x01
7bc: 9a 81 ldd r25, Y+2 ; 0x02
7be: 18 16 cp r1, r24
7c0: 19 06 cpc r1, r25
7c2: 84 f7 brge .-32 ; 0x7a4 <main+0x40>
//main simon game
while(level < 3) {
7c4: a2 c1 rjmp .+836 ; 0xb0a <__stack+0x20b>
int elements_max;
double score;
uint8_t element_list[5]; // TODO
//this is where the level properties are set depending on level
switch(level) {
7c6: 89 81 ldd r24, Y+1 ; 0x01
7c8: 9a 81 ldd r25, Y+2 ; 0x02
7ca: 82 30 cpi r24, 0x02 ; 2
7cc: 91 05 cpc r25, r1
7ce: d9 f0 breq .+54 ; 0x806 <__DATA_REGION_LENGTH__+0x6>
7d0: 83 30 cpi r24, 0x03 ; 3
7d2: 91 05 cpc r25, r1
7d4: 69 f1 breq .+90 ; 0x830 <__DATA_REGION_LENGTH__+0x30>
7d6: 01 97 sbiw r24, 0x01 ; 1
7d8: 09 f0 breq .+2 ; 0x7dc <main+0x78>
7da: 3f c0 rjmp .+126 ; 0x85a <__DATA_REGION_LENGTH__+0x5a>
case 1:
sets = 3;
7dc: 83 e0 ldi r24, 0x03 ; 3
7de: 90 e0 ldi r25, 0x00 ; 0
7e0: 9e 83 std Y+6, r25 ; 0x06
7e2: 8d 83 std Y+5, r24 ; 0x05
display_time = 3;
7e4: 83 e0 ldi r24, 0x03 ; 3
7e6: 90 e0 ldi r25, 0x00 ; 0
7e8: 9c 83 std Y+4, r25 ; 0x04
7ea: 8b 83 std Y+3, r24 ; 0x03
response_time = 5;
7ec: 85 e0 ldi r24, 0x05 ; 5
7ee: 90 e0 ldi r25, 0x00 ; 0
7f0: 98 87 std Y+8, r25 ; 0x08
7f2: 8f 83 std Y+7, r24 ; 0x07
elements_min = 3;
7f4: 83 e0 ldi r24, 0x03 ; 3
7f6: 90 e0 ldi r25, 0x00 ; 0
7f8: 9a 87 std Y+10, r25 ; 0x0a
7fa: 89 87 std Y+9, r24 ; 0x09
elements_max = 5;
7fc: 85 e0 ldi r24, 0x05 ; 5
7fe: 90 e0 ldi r25, 0x00 ; 0
800: 9c 87 std Y+12, r25 ; 0x0c
802: 8b 87 std Y+11, r24 ; 0x0b
break;
804: 2a c0 rjmp .+84 ; 0x85a <__DATA_REGION_LENGTH__+0x5a>
case 2:
sets = 4;
806: 84 e0 ldi r24, 0x04 ; 4
808: 90 e0 ldi r25, 0x00 ; 0
80a: 9e 83 std Y+6, r25 ; 0x06
80c: 8d 83 std Y+5, r24 ; 0x05
display_time = 2;
80e: 82 e0 ldi r24, 0x02 ; 2
810: 90 e0 ldi r25, 0x00 ; 0
812: 9c 83 std Y+4, r25 ; 0x04
814: 8b 83 std Y+3, r24 ; 0x03
response_time = 7;
816: 87 e0 ldi r24, 0x07 ; 7
818: 90 e0 ldi r25, 0x00 ; 0
81a: 98 87 std Y+8, r25 ; 0x08
81c: 8f 83 std Y+7, r24 ; 0x07
elements_min = 3;
81e: 83 e0 ldi r24, 0x03 ; 3
820: 90 e0 ldi r25, 0x00 ; 0
822: 9a 87 std Y+10, r25 ; 0x0a
824: 89 87 std Y+9, r24 ; 0x09
elements_max = 10;
826: 8a e0 ldi r24, 0x0A ; 10
828: 90 e0 ldi r25, 0x00 ; 0
82a: 9c 87 std Y+12, r25 ; 0x0c
82c: 8b 87 std Y+11, r24 ; 0x0b
break;
82e: 15 c0 rjmp .+42 ; 0x85a <__DATA_REGION_LENGTH__+0x5a>
case 3:
sets = 5;
830: 85 e0 ldi r24, 0x05 ; 5
832: 90 e0 ldi r25, 0x00 ; 0
834: 9e 83 std Y+6, r25 ; 0x06
836: 8d 83 std Y+5, r24 ; 0x05
display_time = 1;
838: 81 e0 ldi r24, 0x01 ; 1
83a: 90 e0 ldi r25, 0x00 ; 0
83c: 9c 83 std Y+4, r25 ; 0x04
83e: 8b 83 std Y+3, r24 ; 0x03
response_time = 10;
840: 8a e0 ldi r24, 0x0A ; 10
842: 90 e0 ldi r25, 0x00 ; 0
844: 98 87 std Y+8, r25 ; 0x08
846: 8f 83 std Y+7, r24 ; 0x07
elements_min = 5;
848: 85 e0 ldi r24, 0x05 ; 5
84a: 90 e0 ldi r25, 0x00 ; 0
84c: 9a 87 std Y+10, r25 ; 0x0a
84e: 89 87 std Y+9, r24 ; 0x09
elements_max = 15;
850: 8f e0 ldi r24, 0x0F ; 15
852: 90 e0 ldi r25, 0x00 ; 0
854: 9c 87 std Y+12, r25 ; 0x0c
856: 8b 87 std Y+11, r24 ; 0x0b
break;
858: 00 00 nop
//it's easier to make a variable to count the number of guesses (max_score)
//and increment current_score after each correct guess to calculate total score
//as the number of elements per set scale.
int max_score = 0;
85a: 1e 86 std Y+14, r1 ; 0x0e
85c: 1d 86 std Y+13, r1 ; 0x0d
int current_score = 0;
85e: 18 8a std Y+16, r1 ; 0x10
860: 1f 86 std Y+15, r1 ; 0x0f
for(int set = 0; set < sets; set++) {
862: 1a 8a std Y+18, r1 ; 0x12
864: 19 8a std Y+17, r1 ; 0x11
866: 0b c1 rjmp .+534 ; 0xa7e <__stack+0x17f>
//scale from elements_min (first set) to elements_max (last set)
int elements = elements_min + ceil(((elements_max - elements_min) / (float)(sets - 1)) * set);
868: 89 85 ldd r24, Y+9 ; 0x09
86a: 9a 85 ldd r25, Y+10 ; 0x0a
86c: 09 2e mov r0, r25
86e: 00 0c add r0, r0
870: aa 0b sbc r26, r26
872: bb 0b sbc r27, r27
874: bc 01 movw r22, r24
876: cd 01 movw r24, r26
878: 0e 94 a3 08 call 0x1146 ; 0x1146 <__floatsisf>
87c: 6b 01 movw r12, r22
87e: 7c 01 movw r14, r24
880: 2b 85 ldd r18, Y+11 ; 0x0b
882: 3c 85 ldd r19, Y+12 ; 0x0c
884: 89 85 ldd r24, Y+9 ; 0x09
886: 9a 85 ldd r25, Y+10 ; 0x0a
888: a9 01 movw r20, r18
88a: 48 1b sub r20, r24
88c: 59 0b sbc r21, r25
88e: ca 01 movw r24, r20
890: 09 2e mov r0, r25
892: 00 0c add r0, r0
894: aa 0b sbc r26, r26
896: bb 0b sbc r27, r27
898: bc 01 movw r22, r24
89a: cd 01 movw r24, r26
89c: 0e 94 a3 08 call 0x1146 ; 0x1146 <__floatsisf>
8a0: 4b 01 movw r8, r22
8a2: 5c 01 movw r10, r24
8a4: 8d 81 ldd r24, Y+5 ; 0x05
8a6: 9e 81 ldd r25, Y+6 ; 0x06
8a8: 01 97 sbiw r24, 0x01 ; 1
8aa: 09 2e mov r0, r25
8ac: 00 0c add r0, r0
8ae: aa 0b sbc r26, r26
8b0: bb 0b sbc r27, r27
8b2: bc 01 movw r22, r24
8b4: cd 01 movw r24, r26
8b6: 0e 94 a3 08 call 0x1146 ; 0x1146 <__floatsisf>
8ba: dc 01 movw r26, r24
8bc: cb 01 movw r24, r22
8be: 9c 01 movw r18, r24
8c0: ad 01 movw r20, r26
8c2: c5 01 movw r24, r10
8c4: b4 01 movw r22, r8
8c6: 0e 94 f9 07 call 0xff2 ; 0xff2 <__divsf3>
8ca: dc 01 movw r26, r24
8cc: cb 01 movw r24, r22
8ce: 4c 01 movw r8, r24
8d0: 5d 01 movw r10, r26
8d2: 89 89 ldd r24, Y+17 ; 0x11
8d4: 9a 89 ldd r25, Y+18 ; 0x12
8d6: 09 2e mov r0, r25
8d8: 00 0c add r0, r0
8da: aa 0b sbc r26, r26
8dc: bb 0b sbc r27, r27
8de: bc 01 movw r22, r24
8e0: cd 01 movw r24, r26
8e2: 0e 94 a3 08 call 0x1146 ; 0x1146 <__floatsisf>
8e6: dc 01 movw r26, r24
8e8: cb 01 movw r24, r22
8ea: 9c 01 movw r18, r24
8ec: ad 01 movw r20, r26
8ee: c5 01 movw r24, r10
8f0: b4 01 movw r22, r8
8f2: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
8f6: dc 01 movw r26, r24
8f8: cb 01 movw r24, r22
8fa: bc 01 movw r22, r24
8fc: cd 01 movw r24, r26
8fe: 0e 94 dd 07 call 0xfba ; 0xfba <ceil>
902: dc 01 movw r26, r24
904: cb 01 movw r24, r22
906: 9c 01 movw r18, r24
908: ad 01 movw r20, r26
90a: c7 01 movw r24, r14
90c: b6 01 movw r22, r12
90e: 0e 94 71 07 call 0xee2 ; 0xee2 <__addsf3>
912: dc 01 movw r26, r24
914: cb 01 movw r24, r22
916: bc 01 movw r22, r24
918: cd 01 movw r24, r26
91a: 0e 94 6b 08 call 0x10d6 ; 0x10d6 <__fixsfsi>
91e: dc 01 movw r26, r24
920: cb 01 movw r24, r22
922: 9b 8f std Y+27, r25 ; 0x1b
924: 8a 8f std Y+26, r24 ; 0x1a
//randomly get, display elements
for(int element = 0; element < elements; element++) {
926: 1c 8a std Y+20, r1 ; 0x14
928: 1b 8a std Y+19, r1 ; 0x13
92a: 37 c0 rjmp .+110 ; 0x99a <__stack+0x9b>
uint8_t element_bit = (rand() % ELEMENT_COUNT);
92c: 0e 94 7a 0a call 0x14f4 ; 0x14f4 <rand>
930: 27 e0 ldi r18, 0x07 ; 7
932: 30 e0 ldi r19, 0x00 ; 0
934: b9 01 movw r22, r18
936: 0e 94 06 0a call 0x140c ; 0x140c <__divmodhi4>
93a: 8d 8b std Y+21, r24 ; 0x15
// button 3 should never be pressed, so if 3 is randomly generated,
// we make it the last LED. We only generate 7 potential elements.
if(element_bit == 3) element_bit = 7;
93c: 8d 89 ldd r24, Y+21 ; 0x15
93e: 83 30 cpi r24, 0x03 ; 3
940: 11 f4 brne .+4 ; 0x946 <__stack+0x47>
942: 87 e0 ldi r24, 0x07 ; 7
944: 8d 8b std Y+21, r24 ; 0x15
uint8_t this_element = 1 << element_bit;
946: 8d 89 ldd r24, Y+21 ; 0x15
948: 28 2f mov r18, r24
94a: 30 e0 ldi r19, 0x00 ; 0
94c: 81 e0 ldi r24, 0x01 ; 1
94e: 90 e0 ldi r25, 0x00 ; 0
950: 02 c0 rjmp .+4 ; 0x956 <__stack+0x57>
952: 88 0f add r24, r24
954: 99 1f adc r25, r25
956: 2a 95 dec r18
958: e2 f7 brpl .-8 ; 0x952 <__stack+0x53>
95a: 8c 8f std Y+28, r24 ; 0x1c
usart_txt('\n');
95c: 8a e0 ldi r24, 0x0A ; 10
95e: 0e 94 28 01 call 0x250 ; 0x250 <usart_txt>
usart_txt(element_bit + '0');
962: 8d 89 ldd r24, Y+21 ; 0x15
964: 80 5d subi r24, 0xD0 ; 208
966: 0e 94 28 01 call 0x250 ; 0x250 <usart_txt>
usart_txt('\n');
96a: 8a e0 ldi r24, 0x0A ; 10
96c: 0e 94 28 01 call 0x250 ; 0x250 <usart_txt>
element_list[element] = this_element; //will be compared to guesses later
970: 9e 01 movw r18, r28
972: 2f 5d subi r18, 0xDF ; 223
974: 3f 4f sbci r19, 0xFF ; 255
976: 8b 89 ldd r24, Y+19 ; 0x13
978: 9c 89 ldd r25, Y+20 ; 0x14
97a: 82 0f add r24, r18
97c: 93 1f adc r25, r19
97e: 2c 8d ldd r18, Y+28 ; 0x1c
980: fc 01 movw r30, r24
982: 20 83 st Z, r18
display_element(this_element, display_time);
984: 8b 81 ldd r24, Y+3 ; 0x03
986: 9c 81 ldd r25, Y+4 ; 0x04
988: bc 01 movw r22, r24
98a: 8c 8d ldd r24, Y+28 ; 0x1c
98c: 0e 94 b4 02 call 0x568 ; 0x568 <display_element>
for(int set = 0; set < sets; set++) {
//scale from elements_min (first set) to elements_max (last set)
int elements = elements_min + ceil(((elements_max - elements_min) / (float)(sets - 1)) * set);
//randomly get, display elements
for(int element = 0; element < elements; element++) {
990: 8b 89 ldd r24, Y+19 ; 0x13
992: 9c 89 ldd r25, Y+20 ; 0x14
994: 01 96 adiw r24, 0x01 ; 1
996: 9c 8b std Y+20, r25 ; 0x14
998: 8b 8b std Y+19, r24 ; 0x13
99a: 2b 89 ldd r18, Y+19 ; 0x13
99c: 3c 89 ldd r19, Y+20 ; 0x14
99e: 8a 8d ldd r24, Y+26 ; 0x1a
9a0: 9b 8d ldd r25, Y+27 ; 0x1b
9a2: 28 17 cp r18, r24
9a4: 39 07 cpc r19, r25
9a6: 14 f2 brlt .-124 ; 0x92c <__stack+0x2d>
}
//get elements from buttono presses
//we'll poll the timer to see if a second has passed
//as timer only supports a max of 0xffff * (1024 / 16000000) seconds
seconds_remaining = response_time;
9a8: 8f 81 ldd r24, Y+7 ; 0x07
9aa: 98 85 ldd r25, Y+8 ; 0x08
9ac: 90 93 b3 01 sts 0x01B3, r25 ; 0x8001b3 <__data_end+0x1>
9b0: 80 93 b2 01 sts 0x01B2, r24 ; 0x8001b2 <__data_end>
start_timer();
9b4: 0e 94 9b 00 call 0x136 ; 0x136 <start_timer>
uint16_t guess;
for(int element = 0; element < elements; element++) {
9b8: 19 8e std Y+25, r1 ; 0x19
9ba: 18 8e std Y+24, r1 ; 0x18
9bc: 53 c0 rjmp .+166 ; 0xa64 <__stack+0x165>
guess = 0;
9be: 1f 8a std Y+23, r1 ; 0x17
9c0: 1e 8a std Y+22, r1 ; 0x16
do {
if(timer_done()) { //accounts for seconds passed
9c2: 0e 94 eb 00 call 0x1d6 ; 0x1d6 <timer_done>
9c6: 88 23 and r24, r24
9c8: c1 f0 breq .+48 ; 0x9fa <__stack+0xfb>
seconds_remaining--;
9ca: 80 91 b2 01 lds r24, 0x01B2 ; 0x8001b2 <__data_end>
9ce: 90 91 b3 01 lds r25, 0x01B3 ; 0x8001b3 <__data_end+0x1>
9d2: 01 97 sbiw r24, 0x01 ; 1
9d4: 90 93 b3 01 sts 0x01B3, r25 ; 0x8001b3 <__data_end+0x1>
9d8: 80 93 b2 01 sts 0x01B2, r24 ; 0x8001b2 <__data_end>
stop_timer(); //TODO only need one function
9dc: 0e 94 cb 00 call 0x196 ; 0x196 <stop_timer>
start_timer();
9e0: 0e 94 9b 00 call 0x136 ; 0x136 <start_timer>
beep(261.63, .1);
9e4: 2d ec ldi r18, 0xCD ; 205
9e6: 3c ec ldi r19, 0xCC ; 204
9e8: 4c ec ldi r20, 0xCC ; 204
9ea: 5d e3 ldi r21, 0x3D ; 61
9ec: 64 ea ldi r22, 0xA4 ; 164
9ee: 70 ed ldi r23, 0xD0 ; 208
9f0: 82 e8 ldi r24, 0x82 ; 130
9f2: 93 e4 ldi r25, 0x43 ; 67
9f4: 0e 94 86 06 call 0xd0c ; 0xd0c <beep>
9f8: 06 c0 rjmp .+12 ; 0xa06 <__stack+0x107>
}
else { guess = get_button(); }
9fa: 0e 94 8a 01 call 0x314 ; 0x314 <get_button>
9fe: 88 2f mov r24, r24
a00: 90 e0 ldi r25, 0x00 ; 0
a02: 9f 8b std Y+23, r25 ; 0x17
a04: 8e 8b std Y+22, r24 ; 0x16
} while((!guess) && (seconds_remaining > 0));
a06: 8e 89 ldd r24, Y+22 ; 0x16
a08: 9f 89 ldd r25, Y+23 ; 0x17
a0a: 89 2b or r24, r25
a0c: 39 f4 brne .+14 ; 0xa1c <__stack+0x11d>
a0e: 80 91 b2 01 lds r24, 0x01B2 ; 0x8001b2 <__data_end>
a12: 90 91 b3 01 lds r25, 0x01B3 ; 0x8001b3 <__data_end+0x1>
a16: 18 16 cp r1, r24
a18: 19 06 cpc r1, r25
a1a: 9c f2 brlt .-90 ; 0x9c2 <__stack+0xc3>
max_score++;
a1c: 8d 85 ldd r24, Y+13 ; 0x0d
a1e: 9e 85 ldd r25, Y+14 ; 0x0e
a20: 01 96 adiw r24, 0x01 ; 1
a22: 9e 87 std Y+14, r25 ; 0x0e
a24: 8d 87 std Y+13, r24 ; 0x0d
if(guess == element_list[element]) {
a26: 9e 01 movw r18, r28
a28: 2f 5d subi r18, 0xDF ; 223
a2a: 3f 4f sbci r19, 0xFF ; 255
a2c: 88 8d ldd r24, Y+24 ; 0x18
a2e: 99 8d ldd r25, Y+25 ; 0x19
a30: 82 0f add r24, r18
a32: 93 1f adc r25, r19
a34: fc 01 movw r30, r24
a36: 80 81 ld r24, Z
a38: 28 2f mov r18, r24
a3a: 30 e0 ldi r19, 0x00 ; 0
a3c: 8e 89 ldd r24, Y+22 ; 0x16
a3e: 9f 89 ldd r25, Y+23 ; 0x17
a40: 28 17 cp r18, r24
a42: 39 07 cpc r19, r25
a44: 41 f4 brne .+16 ; 0xa56 <__stack+0x157>
current_score++;
a46: 8f 85 ldd r24, Y+15 ; 0x0f
a48: 98 89 ldd r25, Y+16 ; 0x10
a4a: 01 96 adiw r24, 0x01 ; 1
a4c: 98 8b std Y+16, r25 ; 0x10
a4e: 8f 87 std Y+15, r24 ; 0x0f
correct_beep();
a50: 0e 94 92 05 call 0xb24 ; 0xb24 <correct_beep>
a54: 02 c0 rjmp .+4 ; 0xa5a <__stack+0x15b>
}
else {
incorrect_beep();
a56: 0e 94 a8 05 call 0xb50 ; 0xb50 <incorrect_beep>
//we'll poll the timer to see if a second has passed
//as timer only supports a max of 0xffff * (1024 / 16000000) seconds
seconds_remaining = response_time;
start_timer();
uint16_t guess;
for(int element = 0; element < elements; element++) {
a5a: 88 8d ldd r24, Y+24 ; 0x18
a5c: 99 8d ldd r25, Y+25 ; 0x19
a5e: 01 96 adiw r24, 0x01 ; 1
a60: 99 8f std Y+25, r25 ; 0x19
a62: 88 8f std Y+24, r24 ; 0x18
a64: 28 8d ldd r18, Y+24 ; 0x18
a66: 39 8d ldd r19, Y+25 ; 0x19
a68: 8a 8d ldd r24, Y+26 ; 0x1a
a6a: 9b 8d ldd r25, Y+27 ; 0x1b
a6c: 28 17 cp r18, r24
a6e: 39 07 cpc r19, r25
a70: 0c f4 brge .+2 ; 0xa74 <__stack+0x175>
a72: a5 cf rjmp .-182 ; 0x9be <__stack+0xbf>
//it's easier to make a variable to count the number of guesses (max_score)
//and increment current_score after each correct guess to calculate total score
//as the number of elements per set scale.
int max_score = 0;
int current_score = 0;
for(int set = 0; set < sets; set++) {
a74: 89 89 ldd r24, Y+17 ; 0x11
a76: 9a 89 ldd r25, Y+18 ; 0x12
a78: 01 96 adiw r24, 0x01 ; 1
a7a: 9a 8b std Y+18, r25 ; 0x12
a7c: 89 8b std Y+17, r24 ; 0x11
a7e: 29 89 ldd r18, Y+17 ; 0x11
a80: 3a 89 ldd r19, Y+18 ; 0x12
a82: 8d 81 ldd r24, Y+5 ; 0x05
a84: 9e 81 ldd r25, Y+6 ; 0x06
a86: 28 17 cp r18, r24
a88: 39 07 cpc r19, r25
a8a: 0c f4 brge .+2 ; 0xa8e <__stack+0x18f>
a8c: ed ce rjmp .-550 ; 0x868 <__DATA_REGION_LENGTH__+0x68>
}
}
}
//where we check the score. Score is calculated per level.
//If score under 80, we break back to the menu.
score = (float)current_score / max_score;
a8e: 8f 85 ldd r24, Y+15 ; 0x0f
a90: 98 89 ldd r25, Y+16 ; 0x10
a92: 09 2e mov r0, r25
a94: 00 0c add r0, r0
a96: aa 0b sbc r26, r26
a98: bb 0b sbc r27, r27
a9a: bc 01 movw r22, r24
a9c: cd 01 movw r24, r26
a9e: 0e 94 a3 08 call 0x1146 ; 0x1146 <__floatsisf>
aa2: 6b 01 movw r12, r22
aa4: 7c 01 movw r14, r24
aa6: 8d 85 ldd r24, Y+13 ; 0x0d
aa8: 9e 85 ldd r25, Y+14 ; 0x0e
aaa: 09 2e mov r0, r25
aac: 00 0c add r0, r0
aae: aa 0b sbc r26, r26
ab0: bb 0b sbc r27, r27
ab2: bc 01 movw r22, r24
ab4: cd 01 movw r24, r26
ab6: 0e 94 a3 08 call 0x1146 ; 0x1146 <__floatsisf>
aba: dc 01 movw r26, r24
abc: cb 01 movw r24, r22
abe: 9c 01 movw r18, r24
ac0: ad 01 movw r20, r26
ac2: c7 01 movw r24, r14
ac4: b6 01 movw r22, r12
ac6: 0e 94 f9 07 call 0xff2 ; 0xff2 <__divsf3>
aca: dc 01 movw r26, r24
acc: cb 01 movw r24, r22
ace: 8d 8f std Y+29, r24 ; 0x1d
ad0: 9e 8f std Y+30, r25 ; 0x1e
ad2: af 8f std Y+31, r26 ; 0x1f
ad4: b8 a3 std Y+32, r27 ; 0x20
if(score >= .8) {
ad6: 2d ec ldi r18, 0xCD ; 205
ad8: 3c ec ldi r19, 0xCC ; 204
ada: 4c e4 ldi r20, 0x4C ; 76
adc: 5f e3 ldi r21, 0x3F ; 63
ade: 6d 8d ldd r22, Y+29 ; 0x1d
ae0: 7e 8d ldd r23, Y+30 ; 0x1e
ae2: 8f 8d ldd r24, Y+31 ; 0x1f
ae4: 98 a1 ldd r25, Y+32 ; 0x20
ae6: 0e 94 94 09 call 0x1328 ; 0x1328 <__gesf2>
aea: 88 23 and r24, r24
aec: 54 f0 brlt .+20 ; 0xb02 <__stack+0x203>
level++;
aee: 89 81 ldd r24, Y+1 ; 0x01
af0: 9a 81 ldd r25, Y+2 ; 0x02
af2: 01 96 adiw r24, 0x01 ; 1
af4: 9a 83 std Y+2, r25 ; 0x02
af6: 89 83 std Y+1, r24 ; 0x01
usart_txstr("\nnext level\n");
af8: 8a e5 ldi r24, 0x5A ; 90
afa: 91 e0 ldi r25, 0x01 ; 1
afc: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
b00: 04 c0 rjmp .+8 ; 0xb0a <__stack+0x20b>
}
else {
loose();
b02: 0e 94 66 06 call 0xccc ; 0xccc <loose>
break;
b06: 00 00 nop
b08: 05 c0 rjmp .+10 ; 0xb14 <__stack+0x215>
//ask until valid input
while((level > 3) || (level < 1)) level = (int)(usart_rxt_blocking() - '0');
//main simon game
while(level < 3) {
b0a: 89 81 ldd r24, Y+1 ; 0x01
b0c: 9a 81 ldd r25, Y+2 ; 0x02
b0e: 03 97 sbiw r24, 0x03 ; 3
b10: 0c f4 brge .+2 ; 0xb14 <__stack+0x215>
b12: 59 ce rjmp .-846 ; 0x7c6 <main+0x62>
else {
loose();
break;
}
}
if(level >= 3) win(); //you win if you get past level 3
b14: 89 81 ldd r24, Y+1 ; 0x01
b16: 9a 81 ldd r25, Y+2 ; 0x02
b18: 03 97 sbiw r24, 0x03 ; 3
b1a: 0c f4 brge .+2 ; 0xb1e <__stack+0x21f>
b1c: 3c ce rjmp .-904 ; 0x796 <main+0x32>
b1e: 0e 94 46 06 call 0xc8c ; 0xc8c <win>
}
b22: 39 ce rjmp .-910 ; 0x796 <main+0x32>
00000b24 <correct_beep>:
}
void correct_beep() {
b24: cf 93 push r28
b26: df 93 push r29
b28: cd b7 in r28, 0x3d ; 61
b2a: de b7 in r29, 0x3e ; 62
usart_txstr("\nCorrect!\n");
b2c: 87 e6 ldi r24, 0x67 ; 103
b2e: 91 e0 ldi r25, 0x01 ; 1
b30: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
beep(440.0, .1);
b34: 2d ec ldi r18, 0xCD ; 205
b36: 3c ec ldi r19, 0xCC ; 204
b38: 4c ec ldi r20, 0xCC ; 204
b3a: 5d e3 ldi r21, 0x3D ; 61
b3c: 60 e0 ldi r22, 0x00 ; 0
b3e: 70 e0 ldi r23, 0x00 ; 0
b40: 8c ed ldi r24, 0xDC ; 220
b42: 93 e4 ldi r25, 0x43 ; 67
b44: 0e 94 86 06 call 0xd0c ; 0xd0c <beep>
}
b48: 00 00 nop
b4a: df 91 pop r29
b4c: cf 91 pop r28
b4e: 08 95 ret
00000b50 <incorrect_beep>:
void incorrect_beep() {
b50: cf 93 push r28
b52: df 93 push r29
b54: cd b7 in r28, 0x3d ; 61
b56: de b7 in r29, 0x3e ; 62
b58: 2e 97 sbiw r28, 0x0e ; 14
b5a: 0f b6 in r0, 0x3f ; 63
b5c: f8 94 cli
b5e: de bf out 0x3e, r29 ; 62
b60: 0f be out 0x3f, r0 ; 63
b62: cd bf out 0x3d, r28 ; 61
usart_txstr("\nIncorrect guess.\n");
b64: 82 e7 ldi r24, 0x72 ; 114
b66: 91 e0 ldi r25, 0x01 ; 1
b68: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
beep(261.62, .2);
b6c: 2d ec ldi r18, 0xCD ; 205
b6e: 3c ec ldi r19, 0xCC ; 204
b70: 4c e4 ldi r20, 0x4C ; 76
b72: 5e e3 ldi r21, 0x3E ; 62
b74: 6c e5 ldi r22, 0x5C ; 92
b76: 7f ec ldi r23, 0xCF ; 207
b78: 82 e8 ldi r24, 0x82 ; 130
b7a: 93 e4 ldi r25, 0x43 ; 67
b7c: 0e 94 86 06 call 0xd0c ; 0xd0c <beep>
b80: 80 e0 ldi r24, 0x00 ; 0
b82: 90 e0 ldi r25, 0x00 ; 0
b84: a8 ec ldi r26, 0xC8 ; 200
b86: b1 e4 ldi r27, 0x41 ; 65
b88: 89 83 std Y+1, r24 ; 0x01
b8a: 9a 83 std Y+2, r25 ; 0x02
b8c: ab 83 std Y+3, r26 ; 0x03
b8e: bc 83 std Y+4, r27 ; 0x04
__builtin_avr_delay_cycles(__ticks_dc);
#else
uint16_t __ticks;
__tmp = ((F_CPU) / 4e3) * __ms;
b90: 20 e0 ldi r18, 0x00 ; 0
b92: 30 e0 ldi r19, 0x00 ; 0
b94: 4a e7 ldi r20, 0x7A ; 122
b96: 55 e4 ldi r21, 0x45 ; 69
b98: 69 81 ldd r22, Y+1 ; 0x01
b9a: 7a 81 ldd r23, Y+2 ; 0x02
b9c: 8b 81 ldd r24, Y+3 ; 0x03
b9e: 9c 81 ldd r25, Y+4 ; 0x04
ba0: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
ba4: dc 01 movw r26, r24
ba6: cb 01 movw r24, r22
ba8: 8d 83 std Y+5, r24 ; 0x05
baa: 9e 83 std Y+6, r25 ; 0x06
bac: af 83 std Y+7, r26 ; 0x07
bae: b8 87 std Y+8, r27 ; 0x08
if (__tmp < 1.0)
bb0: 20 e0 ldi r18, 0x00 ; 0
bb2: 30 e0 ldi r19, 0x00 ; 0
bb4: 40 e8 ldi r20, 0x80 ; 128
bb6: 5f e3 ldi r21, 0x3F ; 63
bb8: 6d 81 ldd r22, Y+5 ; 0x05
bba: 7e 81 ldd r23, Y+6 ; 0x06
bbc: 8f 81 ldd r24, Y+7 ; 0x07
bbe: 98 85 ldd r25, Y+8 ; 0x08
bc0: 0e 94 f4 07 call 0xfe8 ; 0xfe8 <__cmpsf2>
bc4: 88 23 and r24, r24
bc6: 2c f4 brge .+10 ; 0xbd2 <incorrect_beep+0x82>
__ticks = 1;
bc8: 81 e0 ldi r24, 0x01 ; 1
bca: 90 e0 ldi r25, 0x00 ; 0
bcc: 9a 87 std Y+10, r25 ; 0x0a
bce: 89 87 std Y+9, r24 ; 0x09
bd0: 3f c0 rjmp .+126 ; 0xc50 <incorrect_beep+0x100>
else if (__tmp > 65535)
bd2: 20 e0 ldi r18, 0x00 ; 0
bd4: 3f ef ldi r19, 0xFF ; 255
bd6: 4f e7 ldi r20, 0x7F ; 127
bd8: 57 e4 ldi r21, 0x47 ; 71
bda: 6d 81 ldd r22, Y+5 ; 0x05
bdc: 7e 81 ldd r23, Y+6 ; 0x06
bde: 8f 81 ldd r24, Y+7 ; 0x07
be0: 98 85 ldd r25, Y+8 ; 0x08
be2: 0e 94 94 09 call 0x1328 ; 0x1328 <__gesf2>
be6: 18 16 cp r1, r24
be8: 4c f5 brge .+82 ; 0xc3c <incorrect_beep+0xec>
{
// __ticks = requested delay in 1/10 ms
__ticks = (uint16_t) (__ms * 10.0);
bea: 20 e0 ldi r18, 0x00 ; 0
bec: 30 e0 ldi r19, 0x00 ; 0
bee: 40 e2 ldi r20, 0x20 ; 32
bf0: 51 e4 ldi r21, 0x41 ; 65
bf2: 69 81 ldd r22, Y+1 ; 0x01
bf4: 7a 81 ldd r23, Y+2 ; 0x02
bf6: 8b 81 ldd r24, Y+3 ; 0x03
bf8: 9c 81 ldd r25, Y+4 ; 0x04
bfa: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
bfe: dc 01 movw r26, r24
c00: cb 01 movw r24, r22
c02: bc 01 movw r22, r24
c04: cd 01 movw r24, r26
c06: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
c0a: dc 01 movw r26, r24
c0c: cb 01 movw r24, r22
c0e: 9a 87 std Y+10, r25 ; 0x0a
c10: 89 87 std Y+9, r24 ; 0x09
c12: 0f c0 rjmp .+30 ; 0xc32 <incorrect_beep+0xe2>
c14: 80 e9 ldi r24, 0x90 ; 144
c16: 91 e0 ldi r25, 0x01 ; 1
c18: 9c 87 std Y+12, r25 ; 0x0c
c1a: 8b 87 std Y+11, r24 ; 0x0b
c1c: 8b 85 ldd r24, Y+11 ; 0x0b
c1e: 9c 85 ldd r25, Y+12 ; 0x0c
c20: 01 97 sbiw r24, 0x01 ; 1
c22: f1 f7 brne .-4 ; 0xc20 <incorrect_beep+0xd0>
c24: 9c 87 std Y+12, r25 ; 0x0c
c26: 8b 87 std Y+11, r24 ; 0x0b
while(__ticks)
{
// wait 1/10 ms
_delay_loop_2(((F_CPU) / 4e3) / 10);
__ticks --;
c28: 89 85 ldd r24, Y+9 ; 0x09
c2a: 9a 85 ldd r25, Y+10 ; 0x0a
c2c: 01 97 sbiw r24, 0x01 ; 1
c2e: 9a 87 std Y+10, r25 ; 0x0a
c30: 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)
c32: 89 85 ldd r24, Y+9 ; 0x09
c34: 9a 85 ldd r25, Y+10 ; 0x0a
c36: 89 2b or r24, r25
c38: 69 f7 brne .-38 ; 0xc14 <incorrect_beep+0xc4>
c3a: 14 c0 rjmp .+40 ; 0xc64 <incorrect_beep+0x114>
__ticks --;
}
return;
}
else
__ticks = (uint16_t)__tmp;
c3c: 6d 81 ldd r22, Y+5 ; 0x05
c3e: 7e 81 ldd r23, Y+6 ; 0x06
c40: 8f 81 ldd r24, Y+7 ; 0x07
c42: 98 85 ldd r25, Y+8 ; 0x08
c44: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
c48: dc 01 movw r26, r24
c4a: cb 01 movw r24, r22
c4c: 9a 87 std Y+10, r25 ; 0x0a
c4e: 89 87 std Y+9, r24 ; 0x09
c50: 89 85 ldd r24, Y+9 ; 0x09
c52: 9a 85 ldd r25, Y+10 ; 0x0a
c54: 9e 87 std Y+14, r25 ; 0x0e
c56: 8d 87 std Y+13, r24 ; 0x0d
c58: 8d 85 ldd r24, Y+13 ; 0x0d
c5a: 9e 85 ldd r25, Y+14 ; 0x0e
c5c: 01 97 sbiw r24, 0x01 ; 1
c5e: f1 f7 brne .-4 ; 0xc5c <incorrect_beep+0x10c>
c60: 9e 87 std Y+14, r25 ; 0x0e
c62: 8d 87 std Y+13, r24 ; 0x0d
_delay_ms(25);
beep(261.62, .2);
c64: 2d ec ldi r18, 0xCD ; 205
c66: 3c ec ldi r19, 0xCC ; 204
c68: 4c e4 ldi r20, 0x4C ; 76
c6a: 5e e3 ldi r21, 0x3E ; 62
c6c: 6c e5 ldi r22, 0x5C ; 92
c6e: 7f ec ldi r23, 0xCF ; 207
c70: 82 e8 ldi r24, 0x82 ; 130
c72: 93 e4 ldi r25, 0x43 ; 67
c74: 0e 94 86 06 call 0xd0c ; 0xd0c <beep>
}
c78: 00 00 nop
c7a: 2e 96 adiw r28, 0x0e ; 14
c7c: 0f b6 in r0, 0x3f ; 63
c7e: f8 94 cli
c80: de bf out 0x3e, r29 ; 62
c82: 0f be out 0x3f, r0 ; 63
c84: cd bf out 0x3d, r28 ; 61
c86: df 91 pop r29
c88: cf 91 pop r28
c8a: 08 95 ret
00000c8c <win>:
void win() {
c8c: cf 93 push r28
c8e: df 93 push r29
c90: cd b7 in r28, 0x3d ; 61
c92: de b7 in r29, 0x3e ; 62
usart_txstr("\nYou beat the game!\n");
c94: 85 e8 ldi r24, 0x85 ; 133
c96: 91 e0 ldi r25, 0x01 ; 1
c98: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
beep(262., .5);
c9c: 20 e0 ldi r18, 0x00 ; 0
c9e: 30 e0 ldi r19, 0x00 ; 0
ca0: 40 e0 ldi r20, 0x00 ; 0
ca2: 5f e3 ldi r21, 0x3F ; 63
ca4: 60 e0 ldi r22, 0x00 ; 0
ca6: 70 e0 ldi r23, 0x00 ; 0
ca8: 83 e8 ldi r24, 0x83 ; 131
caa: 93 e4 ldi r25, 0x43 ; 67
cac: 0e 94 86 06 call 0xd0c ; 0xd0c <beep>
beep(392., .5);
cb0: 20 e0 ldi r18, 0x00 ; 0
cb2: 30 e0 ldi r19, 0x00 ; 0
cb4: 40 e0 ldi r20, 0x00 ; 0
cb6: 5f e3 ldi r21, 0x3F ; 63
cb8: 60 e0 ldi r22, 0x00 ; 0
cba: 70 e0 ldi r23, 0x00 ; 0
cbc: 84 ec ldi r24, 0xC4 ; 196
cbe: 93 e4 ldi r25, 0x43 ; 67
cc0: 0e 94 86 06 call 0xd0c ; 0xd0c <beep>
}
cc4: 00 00 nop
cc6: df 91 pop r29
cc8: cf 91 pop r28
cca: 08 95 ret
00000ccc <loose>:
void loose() {
ccc: cf 93 push r28
cce: df 93 push r29
cd0: cd b7 in r28, 0x3d ; 61
cd2: de b7 in r29, 0x3e ; 62
usart_txstr("\nYou loose, try again?\n");
cd4: 8a e9 ldi r24, 0x9A ; 154
cd6: 91 e0 ldi r25, 0x01 ; 1
cd8: 0e 94 5e 01 call 0x2bc ; 0x2bc <usart_txstr>
beep(330., .5);
cdc: 20 e0 ldi r18, 0x00 ; 0
cde: 30 e0 ldi r19, 0x00 ; 0
ce0: 40 e0 ldi r20, 0x00 ; 0
ce2: 5f e3 ldi r21, 0x3F ; 63
ce4: 60 e0 ldi r22, 0x00 ; 0
ce6: 70 e0 ldi r23, 0x00 ; 0
ce8: 85 ea ldi r24, 0xA5 ; 165
cea: 93 e4 ldi r25, 0x43 ; 67
cec: 0e 94 86 06 call 0xd0c ; 0xd0c <beep>
beep(294., .5);
cf0: 20 e0 ldi r18, 0x00 ; 0
cf2: 30 e0 ldi r19, 0x00 ; 0
cf4: 40 e0 ldi r20, 0x00 ; 0
cf6: 5f e3 ldi r21, 0x3F ; 63
cf8: 60 e0 ldi r22, 0x00 ; 0
cfa: 70 e0 ldi r23, 0x00 ; 0
cfc: 83 e9 ldi r24, 0x93 ; 147
cfe: 93 e4 ldi r25, 0x43 ; 67
d00: 0e 94 86 06 call 0xd0c ; 0xd0c <beep>
}
d04: 00 00 nop
d06: df 91 pop r29
d08: cf 91 pop r28
d0a: 08 95 ret
00000d0c <beep>:
* then multiplies it by 1000 to convert to ms for _delay_ms.
* We control how long its played by making it loop,
* loop count is durientation of note / period.
* loop_count will be off by a max of 1 period.
**/
void beep(double frequency, double durientation) {
d0c: cf 93 push r28
d0e: df 93 push r29
d10: cd b7 in r28, 0x3d ; 61
d12: de b7 in r29, 0x3e ; 62
d14: 6e 97 sbiw r28, 0x1e ; 30
d16: 0f b6 in r0, 0x3f ; 63
d18: f8 94 cli
d1a: de bf out 0x3e, r29 ; 62
d1c: 0f be out 0x3f, r0 ; 63
d1e: cd bf out 0x3d, r28 ; 61
d20: 6f 8b std Y+23, r22 ; 0x17
d22: 78 8f std Y+24, r23 ; 0x18
d24: 89 8f std Y+25, r24 ; 0x19
d26: 9a 8f std Y+26, r25 ; 0x1a
d28: 2b 8f std Y+27, r18 ; 0x1b
d2a: 3c 8f std Y+28, r19 ; 0x1c
d2c: 4d 8f std Y+29, r20 ; 0x1d
d2e: 5e 8f std Y+30, r21 ; 0x1e
double speaker_ms = ((1.0 / frequency) / 2.0) * 1000.0; //TODO clean up
d30: 2f 89 ldd r18, Y+23 ; 0x17
d32: 38 8d ldd r19, Y+24 ; 0x18
d34: 49 8d ldd r20, Y+25 ; 0x19
d36: 5a 8d ldd r21, Y+26 ; 0x1a
d38: 60 e0 ldi r22, 0x00 ; 0
d3a: 70 e0 ldi r23, 0x00 ; 0
d3c: 80 e8 ldi r24, 0x80 ; 128
d3e: 9f e3 ldi r25, 0x3F ; 63
d40: 0e 94 f9 07 call 0xff2 ; 0xff2 <__divsf3>
d44: dc 01 movw r26, r24
d46: cb 01 movw r24, r22
d48: 20 e0 ldi r18, 0x00 ; 0
d4a: 30 e0 ldi r19, 0x00 ; 0
d4c: 40 e0 ldi r20, 0x00 ; 0
d4e: 50 e4 ldi r21, 0x40 ; 64
d50: bc 01 movw r22, r24
d52: cd 01 movw r24, r26
d54: 0e 94 f9 07 call 0xff2 ; 0xff2 <__divsf3>
d58: dc 01 movw r26, r24
d5a: cb 01 movw r24, r22
d5c: 20 e0 ldi r18, 0x00 ; 0
d5e: 30 e0 ldi r19, 0x00 ; 0
d60: 4a e7 ldi r20, 0x7A ; 122
d62: 54 e4 ldi r21, 0x44 ; 68
d64: bc 01 movw r22, r24
d66: cd 01 movw r24, r26
d68: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
d6c: dc 01 movw r26, r24
d6e: cb 01 movw r24, r22
d70: 8b 83 std Y+3, r24 ; 0x03
d72: 9c 83 std Y+4, r25 ; 0x04
d74: ad 83 std Y+5, r26 ; 0x05
d76: be 83 std Y+6, r27 ; 0x06
int loop_count = durientation / (1.0 / frequency);
d78: 2f 89 ldd r18, Y+23 ; 0x17
d7a: 38 8d ldd r19, Y+24 ; 0x18
d7c: 49 8d ldd r20, Y+25 ; 0x19
d7e: 5a 8d ldd r21, Y+26 ; 0x1a
d80: 60 e0 ldi r22, 0x00 ; 0
d82: 70 e0 ldi r23, 0x00 ; 0
d84: 80 e8 ldi r24, 0x80 ; 128
d86: 9f e3 ldi r25, 0x3F ; 63
d88: 0e 94 f9 07 call 0xff2 ; 0xff2 <__divsf3>
d8c: dc 01 movw r26, r24
d8e: cb 01 movw r24, r22
d90: 9c 01 movw r18, r24
d92: ad 01 movw r20, r26
d94: 6b 8d ldd r22, Y+27 ; 0x1b
d96: 7c 8d ldd r23, Y+28 ; 0x1c
d98: 8d 8d ldd r24, Y+29 ; 0x1d
d9a: 9e 8d ldd r25, Y+30 ; 0x1e
d9c: 0e 94 f9 07 call 0xff2 ; 0xff2 <__divsf3>
da0: dc 01 movw r26, r24
da2: cb 01 movw r24, r22
da4: bc 01 movw r22, r24
da6: cd 01 movw r24, r26
da8: 0e 94 6b 08 call 0x10d6 ; 0x10d6 <__fixsfsi>
dac: dc 01 movw r26, r24
dae: cb 01 movw r24, r22
db0: 98 87 std Y+8, r25 ; 0x08
db2: 8f 83 std Y+7, r24 ; 0x07
for(unsigned int i = 0; i < loop_count; i++) {
db4: 1a 82 std Y+2, r1 ; 0x02
db6: 19 82 std Y+1, r1 ; 0x01
db8: 81 c0 rjmp .+258 ; 0xebc <beep+0x1b0>
dba: 8b 81 ldd r24, Y+3 ; 0x03
dbc: 9c 81 ldd r25, Y+4 ; 0x04
dbe: ad 81 ldd r26, Y+5 ; 0x05
dc0: be 81 ldd r27, Y+6 ; 0x06
dc2: 89 87 std Y+9, r24 ; 0x09
dc4: 9a 87 std Y+10, r25 ; 0x0a
dc6: ab 87 std Y+11, r26 ; 0x0b
dc8: bc 87 std Y+12, r27 ; 0x0c
__builtin_avr_delay_cycles(__ticks_dc);
#else
uint16_t __ticks;
__tmp = ((F_CPU) / 4e3) * __ms;
dca: 20 e0 ldi r18, 0x00 ; 0
dcc: 30 e0 ldi r19, 0x00 ; 0
dce: 4a e7 ldi r20, 0x7A ; 122
dd0: 55 e4 ldi r21, 0x45 ; 69
dd2: 69 85 ldd r22, Y+9 ; 0x09
dd4: 7a 85 ldd r23, Y+10 ; 0x0a
dd6: 8b 85 ldd r24, Y+11 ; 0x0b
dd8: 9c 85 ldd r25, Y+12 ; 0x0c
dda: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
dde: dc 01 movw r26, r24
de0: cb 01 movw r24, r22
de2: 8d 87 std Y+13, r24 ; 0x0d
de4: 9e 87 std Y+14, r25 ; 0x0e
de6: af 87 std Y+15, r26 ; 0x0f
de8: b8 8b std Y+16, r27 ; 0x10
if (__tmp < 1.0)
dea: 20 e0 ldi r18, 0x00 ; 0
dec: 30 e0 ldi r19, 0x00 ; 0
dee: 40 e8 ldi r20, 0x80 ; 128
df0: 5f e3 ldi r21, 0x3F ; 63
df2: 6d 85 ldd r22, Y+13 ; 0x0d
df4: 7e 85 ldd r23, Y+14 ; 0x0e
df6: 8f 85 ldd r24, Y+15 ; 0x0f
df8: 98 89 ldd r25, Y+16 ; 0x10
dfa: 0e 94 f4 07 call 0xfe8 ; 0xfe8 <__cmpsf2>
dfe: 88 23 and r24, r24
e00: 2c f4 brge .+10 ; 0xe0c <beep+0x100>
__ticks = 1;
e02: 81 e0 ldi r24, 0x01 ; 1
e04: 90 e0 ldi r25, 0x00 ; 0
e06: 9a 8b std Y+18, r25 ; 0x12
e08: 89 8b std Y+17, r24 ; 0x11
e0a: 3f c0 rjmp .+126 ; 0xe8a <beep+0x17e>
else if (__tmp > 65535)
e0c: 20 e0 ldi r18, 0x00 ; 0
e0e: 3f ef ldi r19, 0xFF ; 255
e10: 4f e7 ldi r20, 0x7F ; 127
e12: 57 e4 ldi r21, 0x47 ; 71
e14: 6d 85 ldd r22, Y+13 ; 0x0d
e16: 7e 85 ldd r23, Y+14 ; 0x0e
e18: 8f 85 ldd r24, Y+15 ; 0x0f
e1a: 98 89 ldd r25, Y+16 ; 0x10
e1c: 0e 94 94 09 call 0x1328 ; 0x1328 <__gesf2>
e20: 18 16 cp r1, r24
e22: 4c f5 brge .+82 ; 0xe76 <beep+0x16a>
{
// __ticks = requested delay in 1/10 ms
__ticks = (uint16_t) (__ms * 10.0);
e24: 20 e0 ldi r18, 0x00 ; 0
e26: 30 e0 ldi r19, 0x00 ; 0
e28: 40 e2 ldi r20, 0x20 ; 32
e2a: 51 e4 ldi r21, 0x41 ; 65
e2c: 69 85 ldd r22, Y+9 ; 0x09
e2e: 7a 85 ldd r23, Y+10 ; 0x0a
e30: 8b 85 ldd r24, Y+11 ; 0x0b
e32: 9c 85 ldd r25, Y+12 ; 0x0c
e34: 0e 94 99 09 call 0x1332 ; 0x1332 <__mulsf3>
e38: dc 01 movw r26, r24
e3a: cb 01 movw r24, r22
e3c: bc 01 movw r22, r24
e3e: cd 01 movw r24, r26
e40: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
e44: dc 01 movw r26, r24
e46: cb 01 movw r24, r22
e48: 9a 8b std Y+18, r25 ; 0x12
e4a: 89 8b std Y+17, r24 ; 0x11
e4c: 0f c0 rjmp .+30 ; 0xe6c <beep+0x160>
e4e: 80 e9 ldi r24, 0x90 ; 144
e50: 91 e0 ldi r25, 0x01 ; 1
e52: 9c 8b std Y+20, r25 ; 0x14
e54: 8b 8b std Y+19, r24 ; 0x13
e56: 8b 89 ldd r24, Y+19 ; 0x13
e58: 9c 89 ldd r25, Y+20 ; 0x14
e5a: 01 97 sbiw r24, 0x01 ; 1
e5c: f1 f7 brne .-4 ; 0xe5a <beep+0x14e>
e5e: 9c 8b std Y+20, r25 ; 0x14
e60: 8b 8b std Y+19, r24 ; 0x13
while(__ticks)
{
// wait 1/10 ms
_delay_loop_2(((F_CPU) / 4e3) / 10);
__ticks --;
e62: 89 89 ldd r24, Y+17 ; 0x11
e64: 9a 89 ldd r25, Y+18 ; 0x12
e66: 01 97 sbiw r24, 0x01 ; 1
e68: 9a 8b std Y+18, r25 ; 0x12
e6a: 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)
e6c: 89 89 ldd r24, Y+17 ; 0x11
e6e: 9a 89 ldd r25, Y+18 ; 0x12
e70: 89 2b or r24, r25
e72: 69 f7 brne .-38 ; 0xe4e <beep+0x142>
e74: 14 c0 rjmp .+40 ; 0xe9e <beep+0x192>
__ticks --;
}
return;
}
else
__ticks = (uint16_t)__tmp;
e76: 6d 85 ldd r22, Y+13 ; 0x0d
e78: 7e 85 ldd r23, Y+14 ; 0x0e
e7a: 8f 85 ldd r24, Y+15 ; 0x0f
e7c: 98 89 ldd r25, Y+16 ; 0x10
e7e: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
e82: dc 01 movw r26, r24
e84: cb 01 movw r24, r22
e86: 9a 8b std Y+18, r25 ; 0x12
e88: 89 8b std Y+17, r24 ; 0x11
e8a: 89 89 ldd r24, Y+17 ; 0x11
e8c: 9a 89 ldd r25, Y+18 ; 0x12
e8e: 9e 8b std Y+22, r25 ; 0x16
e90: 8d 8b std Y+21, r24 ; 0x15
e92: 8d 89 ldd r24, Y+21 ; 0x15
e94: 9e 89 ldd r25, Y+22 ; 0x16
e96: 01 97 sbiw r24, 0x01 ; 1
e98: f1 f7 brne .-4 ; 0xe96 <beep+0x18a>
e9a: 9e 8b std Y+22, r25 ; 0x16
e9c: 8d 8b std Y+21, r24 ; 0x15
_delay_ms(speaker_ms);
SPEAKER_PORT ^= (1 << SPEAKER_PIN);
e9e: 8e e2 ldi r24, 0x2E ; 46
ea0: 90 e0 ldi r25, 0x00 ; 0
ea2: 2e e2 ldi r18, 0x2E ; 46
ea4: 30 e0 ldi r19, 0x00 ; 0
ea6: f9 01 movw r30, r18
ea8: 30 81 ld r19, Z
eaa: 20 e1 ldi r18, 0x10 ; 16
eac: 23 27 eor r18, r19
eae: fc 01 movw r30, r24
eb0: 20 83 st Z, r18
* loop_count will be off by a max of 1 period.
**/
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++) {
eb2: 89 81 ldd r24, Y+1 ; 0x01
eb4: 9a 81 ldd r25, Y+2 ; 0x02
eb6: 01 96 adiw r24, 0x01 ; 1
eb8: 9a 83 std Y+2, r25 ; 0x02
eba: 89 83 std Y+1, r24 ; 0x01
ebc: 8f 81 ldd r24, Y+7 ; 0x07
ebe: 98 85 ldd r25, Y+8 ; 0x08
ec0: 29 81 ldd r18, Y+1 ; 0x01
ec2: 3a 81 ldd r19, Y+2 ; 0x02
ec4: 28 17 cp r18, r24
ec6: 39 07 cpc r19, r25
ec8: 08 f4 brcc .+2 ; 0xecc <beep+0x1c0>
eca: 77 cf rjmp .-274 ; 0xdba <beep+0xae>
_delay_ms(speaker_ms);
SPEAKER_PORT ^= (1 << SPEAKER_PIN);
}
ecc: 00 00 nop
ece: 6e 96 adiw r28, 0x1e ; 30
ed0: 0f b6 in r0, 0x3f ; 63
ed2: f8 94 cli
ed4: de bf out 0x3e, r29 ; 62
ed6: 0f be out 0x3f, r0 ; 63
ed8: cd bf out 0x3d, r28 ; 61
eda: df 91 pop r29
edc: cf 91 pop r28
ede: 08 95 ret
00000ee0 <__subsf3>:
ee0: 50 58 subi r21, 0x80 ; 128
00000ee2 <__addsf3>:
ee2: bb 27 eor r27, r27
ee4: aa 27 eor r26, r26
ee6: 0e 94 88 07 call 0xf10 ; 0xf10 <__addsf3x>
eea: 0c 94 42 09 jmp 0x1284 ; 0x1284 <__fp_round>
eee: 0e 94 34 09 call 0x1268 ; 0x1268 <__fp_pscA>
ef2: 38 f0 brcs .+14 ; 0xf02 <__addsf3+0x20>
ef4: 0e 94 3b 09 call 0x1276 ; 0x1276 <__fp_pscB>
ef8: 20 f0 brcs .+8 ; 0xf02 <__addsf3+0x20>
efa: 39 f4 brne .+14 ; 0xf0a <__addsf3+0x28>
efc: 9f 3f cpi r25, 0xFF ; 255
efe: 19 f4 brne .+6 ; 0xf06 <__addsf3+0x24>
f00: 26 f4 brtc .+8 ; 0xf0a <__addsf3+0x28>
f02: 0c 94 31 09 jmp 0x1262 ; 0x1262 <__fp_nan>
f06: 0e f4 brtc .+2 ; 0xf0a <__addsf3+0x28>
f08: e0 95 com r30
f0a: e7 fb bst r30, 7
f0c: 0c 94 02 09 jmp 0x1204 ; 0x1204 <__fp_inf>
00000f10 <__addsf3x>:
f10: e9 2f mov r30, r25
f12: 0e 94 53 09 call 0x12a6 ; 0x12a6 <__fp_split3>
f16: 58 f3 brcs .-42 ; 0xeee <__addsf3+0xc>
f18: ba 17 cp r27, r26
f1a: 62 07 cpc r22, r18
f1c: 73 07 cpc r23, r19
f1e: 84 07 cpc r24, r20
f20: 95 07 cpc r25, r21
f22: 20 f0 brcs .+8 ; 0xf2c <__addsf3x+0x1c>
f24: 79 f4 brne .+30 ; 0xf44 <__addsf3x+0x34>
f26: a6 f5 brtc .+104 ; 0xf90 <__addsf3x+0x80>
f28: 0c 94 8d 09 jmp 0x131a ; 0x131a <__fp_zero>
f2c: 0e f4 brtc .+2 ; 0xf30 <__addsf3x+0x20>
f2e: e0 95 com r30
f30: 0b 2e mov r0, r27
f32: ba 2f mov r27, r26
f34: a0 2d mov r26, r0
f36: 0b 01 movw r0, r22
f38: b9 01 movw r22, r18
f3a: 90 01 movw r18, r0
f3c: 0c 01 movw r0, r24
f3e: ca 01 movw r24, r20
f40: a0 01 movw r20, r0
f42: 11 24 eor r1, r1
f44: ff 27 eor r31, r31
f46: 59 1b sub r21, r25
f48: 99 f0 breq .+38 ; 0xf70 <__addsf3x+0x60>
f4a: 59 3f cpi r21, 0xF9 ; 249
f4c: 50 f4 brcc .+20 ; 0xf62 <__addsf3x+0x52>
f4e: 50 3e cpi r21, 0xE0 ; 224
f50: 68 f1 brcs .+90 ; 0xfac <__addsf3x+0x9c>
f52: 1a 16 cp r1, r26
f54: f0 40 sbci r31, 0x00 ; 0
f56: a2 2f mov r26, r18
f58: 23 2f mov r18, r19
f5a: 34 2f mov r19, r20
f5c: 44 27 eor r20, r20
f5e: 58 5f subi r21, 0xF8 ; 248
f60: f3 cf rjmp .-26 ; 0xf48 <__addsf3x+0x38>
f62: 46 95 lsr r20
f64: 37 95 ror r19
f66: 27 95 ror r18
f68: a7 95 ror r26
f6a: f0 40 sbci r31, 0x00 ; 0
f6c: 53 95 inc r21
f6e: c9 f7 brne .-14 ; 0xf62 <__addsf3x+0x52>
f70: 7e f4 brtc .+30 ; 0xf90 <__addsf3x+0x80>
f72: 1f 16 cp r1, r31
f74: ba 0b sbc r27, r26
f76: 62 0b sbc r22, r18
f78: 73 0b sbc r23, r19
f7a: 84 0b sbc r24, r20
f7c: ba f0 brmi .+46 ; 0xfac <__addsf3x+0x9c>
f7e: 91 50 subi r25, 0x01 ; 1
f80: a1 f0 breq .+40 ; 0xfaa <__addsf3x+0x9a>
f82: ff 0f add r31, r31
f84: bb 1f adc r27, r27
f86: 66 1f adc r22, r22
f88: 77 1f adc r23, r23
f8a: 88 1f adc r24, r24
f8c: c2 f7 brpl .-16 ; 0xf7e <__addsf3x+0x6e>
f8e: 0e c0 rjmp .+28 ; 0xfac <__addsf3x+0x9c>
f90: ba 0f add r27, r26
f92: 62 1f adc r22, r18
f94: 73 1f adc r23, r19
f96: 84 1f adc r24, r20
f98: 48 f4 brcc .+18 ; 0xfac <__addsf3x+0x9c>
f9a: 87 95 ror r24
f9c: 77 95 ror r23
f9e: 67 95 ror r22
fa0: b7 95 ror r27
fa2: f7 95 ror r31
fa4: 9e 3f cpi r25, 0xFE ; 254
fa6: 08 f0 brcs .+2 ; 0xfaa <__addsf3x+0x9a>
fa8: b0 cf rjmp .-160 ; 0xf0a <__addsf3+0x28>
faa: 93 95 inc r25
fac: 88 0f add r24, r24
fae: 08 f0 brcs .+2 ; 0xfb2 <__addsf3x+0xa2>
fb0: 99 27 eor r25, r25
fb2: ee 0f add r30, r30
fb4: 97 95 ror r25
fb6: 87 95 ror r24
fb8: 08 95 ret
00000fba <ceil>:
fba: 0e 94 75 09 call 0x12ea ; 0x12ea <__fp_trunc>
fbe: 90 f0 brcs .+36 ; 0xfe4 <ceil+0x2a>
fc0: 9f 37 cpi r25, 0x7F ; 127
fc2: 48 f4 brcc .+18 ; 0xfd6 <ceil+0x1c>
fc4: 91 11 cpse r25, r1
fc6: 16 f4 brtc .+4 ; 0xfcc <ceil+0x12>
fc8: 0c 94 8e 09 jmp 0x131c ; 0x131c <__fp_szero>
fcc: 60 e0 ldi r22, 0x00 ; 0
fce: 70 e0 ldi r23, 0x00 ; 0
fd0: 80 e8 ldi r24, 0x80 ; 128
fd2: 9f e3 ldi r25, 0x3F ; 63
fd4: 08 95 ret
fd6: 26 f0 brts .+8 ; 0xfe0 <ceil+0x26>
fd8: 1b 16 cp r1, r27
fda: 61 1d adc r22, r1
fdc: 71 1d adc r23, r1
fde: 81 1d adc r24, r1
fe0: 0c 94 08 09 jmp 0x1210 ; 0x1210 <__fp_mintl>
fe4: 0c 94 23 09 jmp 0x1246 ; 0x1246 <__fp_mpack>
00000fe8 <__cmpsf2>:
fe8: 0e 94 de 08 call 0x11bc ; 0x11bc <__fp_cmp>
fec: 08 f4 brcc .+2 ; 0xff0 <__cmpsf2+0x8>
fee: 81 e0 ldi r24, 0x01 ; 1
ff0: 08 95 ret
00000ff2 <__divsf3>:
ff2: 0e 94 0d 08 call 0x101a ; 0x101a <__divsf3x>
ff6: 0c 94 42 09 jmp 0x1284 ; 0x1284 <__fp_round>
ffa: 0e 94 3b 09 call 0x1276 ; 0x1276 <__fp_pscB>
ffe: 58 f0 brcs .+22 ; 0x1016 <__divsf3+0x24>
1000: 0e 94 34 09 call 0x1268 ; 0x1268 <__fp_pscA>
1004: 40 f0 brcs .+16 ; 0x1016 <__divsf3+0x24>
1006: 29 f4 brne .+10 ; 0x1012 <__divsf3+0x20>
1008: 5f 3f cpi r21, 0xFF ; 255
100a: 29 f0 breq .+10 ; 0x1016 <__divsf3+0x24>
100c: 0c 94 02 09 jmp 0x1204 ; 0x1204 <__fp_inf>
1010: 51 11 cpse r21, r1
1012: 0c 94 8e 09 jmp 0x131c ; 0x131c <__fp_szero>
1016: 0c 94 31 09 jmp 0x1262 ; 0x1262 <__fp_nan>
0000101a <__divsf3x>:
101a: 0e 94 53 09 call 0x12a6 ; 0x12a6 <__fp_split3>
101e: 68 f3 brcs .-38 ; 0xffa <__divsf3+0x8>
00001020 <__divsf3_pse>:
1020: 99 23 and r25, r25
1022: b1 f3 breq .-20 ; 0x1010 <__divsf3+0x1e>
1024: 55 23 and r21, r21
1026: 91 f3 breq .-28 ; 0x100c <__divsf3+0x1a>
1028: 95 1b sub r25, r21
102a: 55 0b sbc r21, r21
102c: bb 27 eor r27, r27
102e: aa 27 eor r26, r26
1030: 62 17 cp r22, r18
1032: 73 07 cpc r23, r19
1034: 84 07 cpc r24, r20
1036: 38 f0 brcs .+14 ; 0x1046 <__divsf3_pse+0x26>
1038: 9f 5f subi r25, 0xFF ; 255
103a: 5f 4f sbci r21, 0xFF ; 255
103c: 22 0f add r18, r18
103e: 33 1f adc r19, r19
1040: 44 1f adc r20, r20
1042: aa 1f adc r26, r26
1044: a9 f3 breq .-22 ; 0x1030 <__divsf3_pse+0x10>
1046: 35 d0 rcall .+106 ; 0x10b2 <__divsf3_pse+0x92>
1048: 0e 2e mov r0, r30
104a: 3a f0 brmi .+14 ; 0x105a <__divsf3_pse+0x3a>
104c: e0 e8 ldi r30, 0x80 ; 128
104e: 32 d0 rcall .+100 ; 0x10b4 <__divsf3_pse+0x94>
1050: 91 50 subi r25, 0x01 ; 1
1052: 50 40 sbci r21, 0x00 ; 0
1054: e6 95 lsr r30
1056: 00 1c adc r0, r0
1058: ca f7 brpl .-14 ; 0x104c <__divsf3_pse+0x2c>
105a: 2b d0 rcall .+86 ; 0x10b2 <__divsf3_pse+0x92>
105c: fe 2f mov r31, r30
105e: 29 d0 rcall .+82 ; 0x10b2 <__divsf3_pse+0x92>
1060: 66 0f add r22, r22
1062: 77 1f adc r23, r23
1064: 88 1f adc r24, r24
1066: bb 1f adc r27, r27
1068: 26 17 cp r18, r22
106a: 37 07 cpc r19, r23
106c: 48 07 cpc r20, r24
106e: ab 07 cpc r26, r27
1070: b0 e8 ldi r27, 0x80 ; 128
1072: 09 f0 breq .+2 ; 0x1076 <__divsf3_pse+0x56>
1074: bb 0b sbc r27, r27
1076: 80 2d mov r24, r0
1078: bf 01 movw r22, r30
107a: ff 27 eor r31, r31
107c: 93 58 subi r25, 0x83 ; 131
107e: 5f 4f sbci r21, 0xFF ; 255
1080: 3a f0 brmi .+14 ; 0x1090 <__divsf3_pse+0x70>
1082: 9e 3f cpi r25, 0xFE ; 254
1084: 51 05 cpc r21, r1
1086: 78 f0 brcs .+30 ; 0x10a6 <__divsf3_pse+0x86>
1088: 0c 94 02 09 jmp 0x1204 ; 0x1204 <__fp_inf>
108c: 0c 94 8e 09 jmp 0x131c ; 0x131c <__fp_szero>
1090: 5f 3f cpi r21, 0xFF ; 255
1092: e4 f3 brlt .-8 ; 0x108c <__divsf3_pse+0x6c>
1094: 98 3e cpi r25, 0xE8 ; 232
1096: d4 f3 brlt .-12 ; 0x108c <__divsf3_pse+0x6c>
1098: 86 95 lsr r24
109a: 77 95 ror r23
109c: 67 95 ror r22
109e: b7 95 ror r27
10a0: f7 95 ror r31
10a2: 9f 5f subi r25, 0xFF ; 255
10a4: c9 f7 brne .-14 ; 0x1098 <__divsf3_pse+0x78>
10a6: 88 0f add r24, r24
10a8: 91 1d adc r25, r1
10aa: 96 95 lsr r25
10ac: 87 95 ror r24
10ae: 97 f9 bld r25, 7
10b0: 08 95 ret
10b2: e1 e0 ldi r30, 0x01 ; 1
10b4: 66 0f add r22, r22
10b6: 77 1f adc r23, r23
10b8: 88 1f adc r24, r24
10ba: bb 1f adc r27, r27
10bc: 62 17 cp r22, r18
10be: 73 07 cpc r23, r19
10c0: 84 07 cpc r24, r20
10c2: ba 07 cpc r27, r26
10c4: 20 f0 brcs .+8 ; 0x10ce <__divsf3_pse+0xae>
10c6: 62 1b sub r22, r18
10c8: 73 0b sbc r23, r19
10ca: 84 0b sbc r24, r20
10cc: ba 0b sbc r27, r26
10ce: ee 1f adc r30, r30
10d0: 88 f7 brcc .-30 ; 0x10b4 <__divsf3_pse+0x94>
10d2: e0 95 com r30
10d4: 08 95 ret
000010d6 <__fixsfsi>:
10d6: 0e 94 72 08 call 0x10e4 ; 0x10e4 <__fixunssfsi>
10da: 68 94 set
10dc: b1 11 cpse r27, r1
10de: 0c 94 8e 09 jmp 0x131c ; 0x131c <__fp_szero>
10e2: 08 95 ret
000010e4 <__fixunssfsi>:
10e4: 0e 94 5b 09 call 0x12b6 ; 0x12b6 <__fp_splitA>
10e8: 88 f0 brcs .+34 ; 0x110c <__fixunssfsi+0x28>
10ea: 9f 57 subi r25, 0x7F ; 127
10ec: 98 f0 brcs .+38 ; 0x1114 <__fixunssfsi+0x30>
10ee: b9 2f mov r27, r25
10f0: 99 27 eor r25, r25
10f2: b7 51 subi r27, 0x17 ; 23
10f4: b0 f0 brcs .+44 ; 0x1122 <__fixunssfsi+0x3e>
10f6: e1 f0 breq .+56 ; 0x1130 <__fixunssfsi+0x4c>
10f8: 66 0f add r22, r22
10fa: 77 1f adc r23, r23
10fc: 88 1f adc r24, r24
10fe: 99 1f adc r25, r25
1100: 1a f0 brmi .+6 ; 0x1108 <__fixunssfsi+0x24>
1102: ba 95 dec r27
1104: c9 f7 brne .-14 ; 0x10f8 <__fixunssfsi+0x14>
1106: 14 c0 rjmp .+40 ; 0x1130 <__fixunssfsi+0x4c>
1108: b1 30 cpi r27, 0x01 ; 1
110a: 91 f0 breq .+36 ; 0x1130 <__fixunssfsi+0x4c>
110c: 0e 94 8d 09 call 0x131a ; 0x131a <__fp_zero>
1110: b1 e0 ldi r27, 0x01 ; 1
1112: 08 95 ret
1114: 0c 94 8d 09 jmp 0x131a ; 0x131a <__fp_zero>
1118: 67 2f mov r22, r23
111a: 78 2f mov r23, r24
111c: 88 27 eor r24, r24
111e: b8 5f subi r27, 0xF8 ; 248
1120: 39 f0 breq .+14 ; 0x1130 <__fixunssfsi+0x4c>
1122: b9 3f cpi r27, 0xF9 ; 249
1124: cc f3 brlt .-14 ; 0x1118 <__fixunssfsi+0x34>
1126: 86 95 lsr r24
1128: 77 95 ror r23
112a: 67 95 ror r22
112c: b3 95 inc r27
112e: d9 f7 brne .-10 ; 0x1126 <__fixunssfsi+0x42>
1130: 3e f4 brtc .+14 ; 0x1140 <__fixunssfsi+0x5c>
1132: 90 95 com r25
1134: 80 95 com r24
1136: 70 95 com r23
1138: 61 95 neg r22
113a: 7f 4f sbci r23, 0xFF ; 255
113c: 8f 4f sbci r24, 0xFF ; 255
113e: 9f 4f sbci r25, 0xFF ; 255
1140: 08 95 ret
00001142 <__floatunsisf>:
1142: e8 94 clt
1144: 09 c0 rjmp .+18 ; 0x1158 <__floatsisf+0x12>
00001146 <__floatsisf>:
1146: 97 fb bst r25, 7
1148: 3e f4 brtc .+14 ; 0x1158 <__floatsisf+0x12>
114a: 90 95 com r25
114c: 80 95 com r24
114e: 70 95 com r23
1150: 61 95 neg r22
1152: 7f 4f sbci r23, 0xFF ; 255
1154: 8f 4f sbci r24, 0xFF ; 255
1156: 9f 4f sbci r25, 0xFF ; 255
1158: 99 23 and r25, r25
115a: a9 f0 breq .+42 ; 0x1186 <__floatsisf+0x40>
115c: f9 2f mov r31, r25
115e: 96 e9 ldi r25, 0x96 ; 150
1160: bb 27 eor r27, r27
1162: 93 95 inc r25
1164: f6 95 lsr r31
1166: 87 95 ror r24
1168: 77 95 ror r23
116a: 67 95 ror r22
116c: b7 95 ror r27
116e: f1 11 cpse r31, r1
1170: f8 cf rjmp .-16 ; 0x1162 <__floatsisf+0x1c>
1172: fa f4 brpl .+62 ; 0x11b2 <__floatsisf+0x6c>
1174: bb 0f add r27, r27
1176: 11 f4 brne .+4 ; 0x117c <__floatsisf+0x36>
1178: 60 ff sbrs r22, 0
117a: 1b c0 rjmp .+54 ; 0x11b2 <__floatsisf+0x6c>
117c: 6f 5f subi r22, 0xFF ; 255
117e: 7f 4f sbci r23, 0xFF ; 255
1180: 8f 4f sbci r24, 0xFF ; 255
1182: 9f 4f sbci r25, 0xFF ; 255
1184: 16 c0 rjmp .+44 ; 0x11b2 <__floatsisf+0x6c>
1186: 88 23 and r24, r24
1188: 11 f0 breq .+4 ; 0x118e <__floatsisf+0x48>
118a: 96 e9 ldi r25, 0x96 ; 150
118c: 11 c0 rjmp .+34 ; 0x11b0 <__floatsisf+0x6a>
118e: 77 23 and r23, r23
1190: 21 f0 breq .+8 ; 0x119a <__floatsisf+0x54>
1192: 9e e8 ldi r25, 0x8E ; 142
1194: 87 2f mov r24, r23
1196: 76 2f mov r23, r22
1198: 05 c0 rjmp .+10 ; 0x11a4 <__floatsisf+0x5e>
119a: 66 23 and r22, r22
119c: 71 f0 breq .+28 ; 0x11ba <__floatsisf+0x74>
119e: 96 e8 ldi r25, 0x86 ; 134
11a0: 86 2f mov r24, r22
11a2: 70 e0 ldi r23, 0x00 ; 0
11a4: 60 e0 ldi r22, 0x00 ; 0
11a6: 2a f0 brmi .+10 ; 0x11b2 <__floatsisf+0x6c>
11a8: 9a 95 dec r25
11aa: 66 0f add r22, r22
11ac: 77 1f adc r23, r23
11ae: 88 1f adc r24, r24
11b0: da f7 brpl .-10 ; 0x11a8 <__floatsisf+0x62>
11b2: 88 0f add r24, r24
11b4: 96 95 lsr r25
11b6: 87 95 ror r24
11b8: 97 f9 bld r25, 7
11ba: 08 95 ret
000011bc <__fp_cmp>:
11bc: 99 0f add r25, r25
11be: 00 08 sbc r0, r0
11c0: 55 0f add r21, r21
11c2: aa 0b sbc r26, r26
11c4: e0 e8 ldi r30, 0x80 ; 128
11c6: fe ef ldi r31, 0xFE ; 254
11c8: 16 16 cp r1, r22
11ca: 17 06 cpc r1, r23
11cc: e8 07 cpc r30, r24
11ce: f9 07 cpc r31, r25
11d0: c0 f0 brcs .+48 ; 0x1202 <__fp_cmp+0x46>
11d2: 12 16 cp r1, r18
11d4: 13 06 cpc r1, r19
11d6: e4 07 cpc r30, r20
11d8: f5 07 cpc r31, r21
11da: 98 f0 brcs .+38 ; 0x1202 <__fp_cmp+0x46>
11dc: 62 1b sub r22, r18
11de: 73 0b sbc r23, r19
11e0: 84 0b sbc r24, r20
11e2: 95 0b sbc r25, r21
11e4: 39 f4 brne .+14 ; 0x11f4 <__fp_cmp+0x38>
11e6: 0a 26 eor r0, r26
11e8: 61 f0 breq .+24 ; 0x1202 <__fp_cmp+0x46>
11ea: 23 2b or r18, r19
11ec: 24 2b or r18, r20
11ee: 25 2b or r18, r21
11f0: 21 f4 brne .+8 ; 0x11fa <__fp_cmp+0x3e>
11f2: 08 95 ret
11f4: 0a 26 eor r0, r26
11f6: 09 f4 brne .+2 ; 0x11fa <__fp_cmp+0x3e>
11f8: a1 40 sbci r26, 0x01 ; 1
11fa: a6 95 lsr r26
11fc: 8f ef ldi r24, 0xFF ; 255
11fe: 81 1d adc r24, r1
1200: 81 1d adc r24, r1
1202: 08 95 ret
00001204 <__fp_inf>:
1204: 97 f9 bld r25, 7
1206: 9f 67 ori r25, 0x7F ; 127
1208: 80 e8 ldi r24, 0x80 ; 128
120a: 70 e0 ldi r23, 0x00 ; 0
120c: 60 e0 ldi r22, 0x00 ; 0
120e: 08 95 ret
00001210 <__fp_mintl>:
1210: 88 23 and r24, r24
1212: 71 f4 brne .+28 ; 0x1230 <__fp_mintl+0x20>
1214: 77 23 and r23, r23
1216: 21 f0 breq .+8 ; 0x1220 <__fp_mintl+0x10>
1218: 98 50 subi r25, 0x08 ; 8
121a: 87 2b or r24, r23
121c: 76 2f mov r23, r22
121e: 07 c0 rjmp .+14 ; 0x122e <__fp_mintl+0x1e>
1220: 66 23 and r22, r22
1222: 11 f4 brne .+4 ; 0x1228 <__fp_mintl+0x18>
1224: 99 27 eor r25, r25
1226: 0d c0 rjmp .+26 ; 0x1242 <__fp_mintl+0x32>
1228: 90 51 subi r25, 0x10 ; 16
122a: 86 2b or r24, r22
122c: 70 e0 ldi r23, 0x00 ; 0
122e: 60 e0 ldi r22, 0x00 ; 0
1230: 2a f0 brmi .+10 ; 0x123c <__fp_mintl+0x2c>
1232: 9a 95 dec r25
1234: 66 0f add r22, r22
1236: 77 1f adc r23, r23
1238: 88 1f adc r24, r24
123a: da f7 brpl .-10 ; 0x1232 <__fp_mintl+0x22>
123c: 88 0f add r24, r24
123e: 96 95 lsr r25
1240: 87 95 ror r24
1242: 97 f9 bld r25, 7
1244: 08 95 ret
00001246 <__fp_mpack>:
1246: 9f 3f cpi r25, 0xFF ; 255
1248: 31 f0 breq .+12 ; 0x1256 <__fp_mpack_finite+0xc>
0000124a <__fp_mpack_finite>:
124a: 91 50 subi r25, 0x01 ; 1
124c: 20 f4 brcc .+8 ; 0x1256 <__fp_mpack_finite+0xc>
124e: 87 95 ror r24
1250: 77 95 ror r23
1252: 67 95 ror r22
1254: b7 95 ror r27
1256: 88 0f add r24, r24
1258: 91 1d adc r25, r1
125a: 96 95 lsr r25
125c: 87 95 ror r24
125e: 97 f9 bld r25, 7
1260: 08 95 ret
00001262 <__fp_nan>:
1262: 9f ef ldi r25, 0xFF ; 255
1264: 80 ec ldi r24, 0xC0 ; 192
1266: 08 95 ret
00001268 <__fp_pscA>:
1268: 00 24 eor r0, r0
126a: 0a 94 dec r0
126c: 16 16 cp r1, r22
126e: 17 06 cpc r1, r23
1270: 18 06 cpc r1, r24
1272: 09 06 cpc r0, r25
1274: 08 95 ret
00001276 <__fp_pscB>:
1276: 00 24 eor r0, r0
1278: 0a 94 dec r0
127a: 12 16 cp r1, r18
127c: 13 06 cpc r1, r19
127e: 14 06 cpc r1, r20
1280: 05 06 cpc r0, r21
1282: 08 95 ret
00001284 <__fp_round>:
1284: 09 2e mov r0, r25
1286: 03 94 inc r0
1288: 00 0c add r0, r0
128a: 11 f4 brne .+4 ; 0x1290 <__fp_round+0xc>
128c: 88 23 and r24, r24
128e: 52 f0 brmi .+20 ; 0x12a4 <__fp_round+0x20>
1290: bb 0f add r27, r27
1292: 40 f4 brcc .+16 ; 0x12a4 <__fp_round+0x20>
1294: bf 2b or r27, r31
1296: 11 f4 brne .+4 ; 0x129c <__fp_round+0x18>
1298: 60 ff sbrs r22, 0
129a: 04 c0 rjmp .+8 ; 0x12a4 <__fp_round+0x20>
129c: 6f 5f subi r22, 0xFF ; 255
129e: 7f 4f sbci r23, 0xFF ; 255
12a0: 8f 4f sbci r24, 0xFF ; 255
12a2: 9f 4f sbci r25, 0xFF ; 255
12a4: 08 95 ret
000012a6 <__fp_split3>:
12a6: 57 fd sbrc r21, 7
12a8: 90 58 subi r25, 0x80 ; 128
12aa: 44 0f add r20, r20
12ac: 55 1f adc r21, r21
12ae: 59 f0 breq .+22 ; 0x12c6 <__fp_splitA+0x10>
12b0: 5f 3f cpi r21, 0xFF ; 255
12b2: 71 f0 breq .+28 ; 0x12d0 <__fp_splitA+0x1a>
12b4: 47 95 ror r20
000012b6 <__fp_splitA>:
12b6: 88 0f add r24, r24
12b8: 97 fb bst r25, 7
12ba: 99 1f adc r25, r25
12bc: 61 f0 breq .+24 ; 0x12d6 <__fp_splitA+0x20>
12be: 9f 3f cpi r25, 0xFF ; 255
12c0: 79 f0 breq .+30 ; 0x12e0 <__fp_splitA+0x2a>
12c2: 87 95 ror r24
12c4: 08 95 ret
12c6: 12 16 cp r1, r18
12c8: 13 06 cpc r1, r19
12ca: 14 06 cpc r1, r20
12cc: 55 1f adc r21, r21
12ce: f2 cf rjmp .-28 ; 0x12b4 <__fp_split3+0xe>
12d0: 46 95 lsr r20
12d2: f1 df rcall .-30 ; 0x12b6 <__fp_splitA>
12d4: 08 c0 rjmp .+16 ; 0x12e6 <__fp_splitA+0x30>
12d6: 16 16 cp r1, r22
12d8: 17 06 cpc r1, r23
12da: 18 06 cpc r1, r24
12dc: 99 1f adc r25, r25
12de: f1 cf rjmp .-30 ; 0x12c2 <__fp_splitA+0xc>
12e0: 86 95 lsr r24
12e2: 71 05 cpc r23, r1
12e4: 61 05 cpc r22, r1
12e6: 08 94 sec
12e8: 08 95 ret
000012ea <__fp_trunc>:
12ea: 0e 94 5b 09 call 0x12b6 ; 0x12b6 <__fp_splitA>
12ee: a0 f0 brcs .+40 ; 0x1318 <__fp_trunc+0x2e>
12f0: be e7 ldi r27, 0x7E ; 126
12f2: b9 17 cp r27, r25
12f4: 88 f4 brcc .+34 ; 0x1318 <__fp_trunc+0x2e>
12f6: bb 27 eor r27, r27
12f8: 9f 38 cpi r25, 0x8F ; 143
12fa: 60 f4 brcc .+24 ; 0x1314 <__fp_trunc+0x2a>
12fc: 16 16 cp r1, r22
12fe: b1 1d adc r27, r1
1300: 67 2f mov r22, r23
1302: 78 2f mov r23, r24
1304: 88 27 eor r24, r24
1306: 98 5f subi r25, 0xF8 ; 248
1308: f7 cf rjmp .-18 ; 0x12f8 <__fp_trunc+0xe>
130a: 86 95 lsr r24
130c: 77 95 ror r23
130e: 67 95 ror r22
1310: b1 1d adc r27, r1
1312: 93 95 inc r25
1314: 96 39 cpi r25, 0x96 ; 150
1316: c8 f3 brcs .-14 ; 0x130a <__fp_trunc+0x20>
1318: 08 95 ret
0000131a <__fp_zero>:
131a: e8 94 clt
0000131c <__fp_szero>:
131c: bb 27 eor r27, r27
131e: 66 27 eor r22, r22
1320: 77 27 eor r23, r23
1322: cb 01 movw r24, r22
1324: 97 f9 bld r25, 7
1326: 08 95 ret
00001328 <__gesf2>:
1328: 0e 94 de 08 call 0x11bc ; 0x11bc <__fp_cmp>
132c: 08 f4 brcc .+2 ; 0x1330 <__gesf2+0x8>
132e: 8f ef ldi r24, 0xFF ; 255
1330: 08 95 ret
00001332 <__mulsf3>:
1332: 0e 94 ac 09 call 0x1358 ; 0x1358 <__mulsf3x>
1336: 0c 94 42 09 jmp 0x1284 ; 0x1284 <__fp_round>
133a: 0e 94 34 09 call 0x1268 ; 0x1268 <__fp_pscA>
133e: 38 f0 brcs .+14 ; 0x134e <__mulsf3+0x1c>
1340: 0e 94 3b 09 call 0x1276 ; 0x1276 <__fp_pscB>
1344: 20 f0 brcs .+8 ; 0x134e <__mulsf3+0x1c>
1346: 95 23 and r25, r21
1348: 11 f0 breq .+4 ; 0x134e <__mulsf3+0x1c>
134a: 0c 94 02 09 jmp 0x1204 ; 0x1204 <__fp_inf>
134e: 0c 94 31 09 jmp 0x1262 ; 0x1262 <__fp_nan>
1352: 11 24 eor r1, r1
1354: 0c 94 8e 09 jmp 0x131c ; 0x131c <__fp_szero>
00001358 <__mulsf3x>:
1358: 0e 94 53 09 call 0x12a6 ; 0x12a6 <__fp_split3>
135c: 70 f3 brcs .-36 ; 0x133a <__mulsf3+0x8>
0000135e <__mulsf3_pse>:
135e: 95 9f mul r25, r21
1360: c1 f3 breq .-16 ; 0x1352 <__mulsf3+0x20>
1362: 95 0f add r25, r21
1364: 50 e0 ldi r21, 0x00 ; 0
1366: 55 1f adc r21, r21
1368: 62 9f mul r22, r18
136a: f0 01 movw r30, r0
136c: 72 9f mul r23, r18
136e: bb 27 eor r27, r27
1370: f0 0d add r31, r0
1372: b1 1d adc r27, r1
1374: 63 9f mul r22, r19
1376: aa 27 eor r26, r26
1378: f0 0d add r31, r0
137a: b1 1d adc r27, r1
137c: aa 1f adc r26, r26
137e: 64 9f mul r22, r20
1380: 66 27 eor r22, r22
1382: b0 0d add r27, r0
1384: a1 1d adc r26, r1
1386: 66 1f adc r22, r22
1388: 82 9f mul r24, r18
138a: 22 27 eor r18, r18
138c: b0 0d add r27, r0
138e: a1 1d adc r26, r1
1390: 62 1f adc r22, r18
1392: 73 9f mul r23, r19
1394: b0 0d add r27, r0
1396: a1 1d adc r26, r1
1398: 62 1f adc r22, r18
139a: 83 9f mul r24, r19
139c: a0 0d add r26, r0
139e: 61 1d adc r22, r1
13a0: 22 1f adc r18, r18
13a2: 74 9f mul r23, r20
13a4: 33 27 eor r19, r19
13a6: a0 0d add r26, r0
13a8: 61 1d adc r22, r1
13aa: 23 1f adc r18, r19
13ac: 84 9f mul r24, r20
13ae: 60 0d add r22, r0
13b0: 21 1d adc r18, r1
13b2: 82 2f mov r24, r18
13b4: 76 2f mov r23, r22
13b6: 6a 2f mov r22, r26
13b8: 11 24 eor r1, r1
13ba: 9f 57 subi r25, 0x7F ; 127
13bc: 50 40 sbci r21, 0x00 ; 0
13be: 9a f0 brmi .+38 ; 0x13e6 <__mulsf3_pse+0x88>
13c0: f1 f0 breq .+60 ; 0x13fe <__mulsf3_pse+0xa0>
13c2: 88 23 and r24, r24
13c4: 4a f0 brmi .+18 ; 0x13d8 <__mulsf3_pse+0x7a>
13c6: ee 0f add r30, r30
13c8: ff 1f adc r31, r31
13ca: bb 1f adc r27, r27
13cc: 66 1f adc r22, r22
13ce: 77 1f adc r23, r23
13d0: 88 1f adc r24, r24
13d2: 91 50 subi r25, 0x01 ; 1
13d4: 50 40 sbci r21, 0x00 ; 0
13d6: a9 f7 brne .-22 ; 0x13c2 <__mulsf3_pse+0x64>
13d8: 9e 3f cpi r25, 0xFE ; 254
13da: 51 05 cpc r21, r1
13dc: 80 f0 brcs .+32 ; 0x13fe <__mulsf3_pse+0xa0>
13de: 0c 94 02 09 jmp 0x1204 ; 0x1204 <__fp_inf>
13e2: 0c 94 8e 09 jmp 0x131c ; 0x131c <__fp_szero>
13e6: 5f 3f cpi r21, 0xFF ; 255
13e8: e4 f3 brlt .-8 ; 0x13e2 <__mulsf3_pse+0x84>
13ea: 98 3e cpi r25, 0xE8 ; 232
13ec: d4 f3 brlt .-12 ; 0x13e2 <__mulsf3_pse+0x84>
13ee: 86 95 lsr r24
13f0: 77 95 ror r23
13f2: 67 95 ror r22
13f4: b7 95 ror r27
13f6: f7 95 ror r31
13f8: e7 95 ror r30
13fa: 9f 5f subi r25, 0xFF ; 255
13fc: c1 f7 brne .-16 ; 0x13ee <__mulsf3_pse+0x90>
13fe: fe 2b or r31, r30
1400: 88 0f add r24, r24
1402: 91 1d adc r25, r1
1404: 96 95 lsr r25
1406: 87 95 ror r24
1408: 97 f9 bld r25, 7
140a: 08 95 ret
0000140c <__divmodhi4>:
140c: 97 fb bst r25, 7
140e: 07 2e mov r0, r23
1410: 16 f4 brtc .+4 ; 0x1416 <__divmodhi4+0xa>
1412: 00 94 com r0
1414: 07 d0 rcall .+14 ; 0x1424 <__divmodhi4_neg1>
1416: 77 fd sbrc r23, 7
1418: 09 d0 rcall .+18 ; 0x142c <__divmodhi4_neg2>
141a: 0e 94 1a 0a call 0x1434 ; 0x1434 <__udivmodhi4>
141e: 07 fc sbrc r0, 7
1420: 05 d0 rcall .+10 ; 0x142c <__divmodhi4_neg2>
1422: 3e f4 brtc .+14 ; 0x1432 <__divmodhi4_exit>
00001424 <__divmodhi4_neg1>:
1424: 90 95 com r25
1426: 81 95 neg r24
1428: 9f 4f sbci r25, 0xFF ; 255
142a: 08 95 ret
0000142c <__divmodhi4_neg2>:
142c: 70 95 com r23
142e: 61 95 neg r22
1430: 7f 4f sbci r23, 0xFF ; 255
00001432 <__divmodhi4_exit>:
1432: 08 95 ret
00001434 <__udivmodhi4>:
1434: aa 1b sub r26, r26
1436: bb 1b sub r27, r27
1438: 51 e1 ldi r21, 0x11 ; 17
143a: 07 c0 rjmp .+14 ; 0x144a <__udivmodhi4_ep>
0000143c <__udivmodhi4_loop>:
143c: aa 1f adc r26, r26
143e: bb 1f adc r27, r27
1440: a6 17 cp r26, r22
1442: b7 07 cpc r27, r23
1444: 10 f0 brcs .+4 ; 0x144a <__udivmodhi4_ep>
1446: a6 1b sub r26, r22
1448: b7 0b sbc r27, r23
0000144a <__udivmodhi4_ep>:
144a: 88 1f adc r24, r24
144c: 99 1f adc r25, r25
144e: 5a 95 dec r21
1450: a9 f7 brne .-22 ; 0x143c <__udivmodhi4_loop>
1452: 80 95 com r24
1454: 90 95 com r25
1456: bc 01 movw r22, r24
1458: cd 01 movw r24, r26
145a: 08 95 ret
0000145c <do_rand>:
145c: 8f 92 push r8
145e: 9f 92 push r9
1460: af 92 push r10
1462: bf 92 push r11
1464: cf 92 push r12
1466: df 92 push r13
1468: ef 92 push r14
146a: ff 92 push r15
146c: cf 93 push r28
146e: df 93 push r29
1470: ec 01 movw r28, r24
1472: 68 81 ld r22, Y
1474: 79 81 ldd r23, Y+1 ; 0x01
1476: 8a 81 ldd r24, Y+2 ; 0x02
1478: 9b 81 ldd r25, Y+3 ; 0x03
147a: 61 15 cp r22, r1
147c: 71 05 cpc r23, r1
147e: 81 05 cpc r24, r1
1480: 91 05 cpc r25, r1
1482: 21 f4 brne .+8 ; 0x148c <do_rand+0x30>
1484: 64 e2 ldi r22, 0x24 ; 36
1486: 79 ed ldi r23, 0xD9 ; 217
1488: 8b e5 ldi r24, 0x5B ; 91
148a: 97 e0 ldi r25, 0x07 ; 7
148c: 2d e1 ldi r18, 0x1D ; 29
148e: 33 ef ldi r19, 0xF3 ; 243
1490: 41 e0 ldi r20, 0x01 ; 1
1492: 50 e0 ldi r21, 0x00 ; 0
1494: 0e 94 8a 0a call 0x1514 ; 0x1514 <__divmodsi4>
1498: 49 01 movw r8, r18
149a: 5a 01 movw r10, r20
149c: 9b 01 movw r18, r22
149e: ac 01 movw r20, r24
14a0: a7 ea ldi r26, 0xA7 ; 167
14a2: b1 e4 ldi r27, 0x41 ; 65
14a4: 0e 94 a9 0a call 0x1552 ; 0x1552 <__muluhisi3>
14a8: 6b 01 movw r12, r22
14aa: 7c 01 movw r14, r24
14ac: ac ee ldi r26, 0xEC ; 236
14ae: b4 ef ldi r27, 0xF4 ; 244
14b0: a5 01 movw r20, r10
14b2: 94 01 movw r18, r8
14b4: 0e 94 b7 0a call 0x156e ; 0x156e <__mulohisi3>
14b8: dc 01 movw r26, r24
14ba: cb 01 movw r24, r22
14bc: 8c 0d add r24, r12
14be: 9d 1d adc r25, r13
14c0: ae 1d adc r26, r14
14c2: bf 1d adc r27, r15
14c4: b7 ff sbrs r27, 7
14c6: 03 c0 rjmp .+6 ; 0x14ce <do_rand+0x72>
14c8: 01 97 sbiw r24, 0x01 ; 1
14ca: a1 09 sbc r26, r1
14cc: b0 48 sbci r27, 0x80 ; 128
14ce: 88 83 st Y, r24
14d0: 99 83 std Y+1, r25 ; 0x01
14d2: aa 83 std Y+2, r26 ; 0x02
14d4: bb 83 std Y+3, r27 ; 0x03
14d6: 9f 77 andi r25, 0x7F ; 127
14d8: df 91 pop r29
14da: cf 91 pop r28
14dc: ff 90 pop r15
14de: ef 90 pop r14
14e0: df 90 pop r13
14e2: cf 90 pop r12
14e4: bf 90 pop r11
14e6: af 90 pop r10
14e8: 9f 90 pop r9
14ea: 8f 90 pop r8
14ec: 08 95 ret
000014ee <rand_r>:
14ee: 0e 94 2e 0a call 0x145c ; 0x145c <do_rand>
14f2: 08 95 ret
000014f4 <rand>:
14f4: 80 e0 ldi r24, 0x00 ; 0
14f6: 91 e0 ldi r25, 0x01 ; 1
14f8: 0e 94 2e 0a call 0x145c ; 0x145c <do_rand>
14fc: 08 95 ret
000014fe <srand>:
14fe: a0 e0 ldi r26, 0x00 ; 0
1500: b0 e0 ldi r27, 0x00 ; 0
1502: 80 93 00 01 sts 0x0100, r24 ; 0x800100 <__DATA_REGION_ORIGIN__>
1506: 90 93 01 01 sts 0x0101, r25 ; 0x800101 <__DATA_REGION_ORIGIN__+0x1>
150a: a0 93 02 01 sts 0x0102, r26 ; 0x800102 <__DATA_REGION_ORIGIN__+0x2>
150e: b0 93 03 01 sts 0x0103, r27 ; 0x800103 <__DATA_REGION_ORIGIN__+0x3>
1512: 08 95 ret
00001514 <__divmodsi4>:
1514: 05 2e mov r0, r21
1516: 97 fb bst r25, 7
1518: 1e f4 brtc .+6 ; 0x1520 <__divmodsi4+0xc>
151a: 00 94 com r0
151c: 0e 94 a1 0a call 0x1542 ; 0x1542 <__negsi2>
1520: 57 fd sbrc r21, 7
1522: 07 d0 rcall .+14 ; 0x1532 <__divmodsi4_neg2>
1524: 0e 94 bc 0a call 0x1578 ; 0x1578 <__udivmodsi4>
1528: 07 fc sbrc r0, 7
152a: 03 d0 rcall .+6 ; 0x1532 <__divmodsi4_neg2>
152c: 4e f4 brtc .+18 ; 0x1540 <__divmodsi4_exit>
152e: 0c 94 a1 0a jmp 0x1542 ; 0x1542 <__negsi2>
00001532 <__divmodsi4_neg2>:
1532: 50 95 com r21
1534: 40 95 com r20
1536: 30 95 com r19
1538: 21 95 neg r18
153a: 3f 4f sbci r19, 0xFF ; 255
153c: 4f 4f sbci r20, 0xFF ; 255
153e: 5f 4f sbci r21, 0xFF ; 255
00001540 <__divmodsi4_exit>:
1540: 08 95 ret
00001542 <__negsi2>:
1542: 90 95 com r25
1544: 80 95 com r24
1546: 70 95 com r23
1548: 61 95 neg r22
154a: 7f 4f sbci r23, 0xFF ; 255
154c: 8f 4f sbci r24, 0xFF ; 255
154e: 9f 4f sbci r25, 0xFF ; 255
1550: 08 95 ret
00001552 <__muluhisi3>:
1552: 0e 94 de 0a call 0x15bc ; 0x15bc <__umulhisi3>
1556: a5 9f mul r26, r21
1558: 90 0d add r25, r0
155a: b4 9f mul r27, r20
155c: 90 0d add r25, r0
155e: a4 9f mul r26, r20
1560: 80 0d add r24, r0
1562: 91 1d adc r25, r1
1564: 11 24 eor r1, r1
1566: 08 95 ret
00001568 <__mulshisi3>:
1568: b7 ff sbrs r27, 7
156a: 0c 94 a9 0a jmp 0x1552 ; 0x1552 <__muluhisi3>
0000156e <__mulohisi3>:
156e: 0e 94 a9 0a call 0x1552 ; 0x1552 <__muluhisi3>
1572: 82 1b sub r24, r18
1574: 93 0b sbc r25, r19
1576: 08 95 ret
00001578 <__udivmodsi4>:
1578: a1 e2 ldi r26, 0x21 ; 33
157a: 1a 2e mov r1, r26
157c: aa 1b sub r26, r26
157e: bb 1b sub r27, r27
1580: fd 01 movw r30, r26
1582: 0d c0 rjmp .+26 ; 0x159e <__udivmodsi4_ep>
00001584 <__udivmodsi4_loop>:
1584: aa 1f adc r26, r26
1586: bb 1f adc r27, r27
1588: ee 1f adc r30, r30
158a: ff 1f adc r31, r31
158c: a2 17 cp r26, r18
158e: b3 07 cpc r27, r19
1590: e4 07 cpc r30, r20
1592: f5 07 cpc r31, r21
1594: 20 f0 brcs .+8 ; 0x159e <__udivmodsi4_ep>
1596: a2 1b sub r26, r18
1598: b3 0b sbc r27, r19
159a: e4 0b sbc r30, r20
159c: f5 0b sbc r31, r21
0000159e <__udivmodsi4_ep>:
159e: 66 1f adc r22, r22
15a0: 77 1f adc r23, r23
15a2: 88 1f adc r24, r24
15a4: 99 1f adc r25, r25
15a6: 1a 94 dec r1
15a8: 69 f7 brne .-38 ; 0x1584 <__udivmodsi4_loop>
15aa: 60 95 com r22
15ac: 70 95 com r23
15ae: 80 95 com r24
15b0: 90 95 com r25
15b2: 9b 01 movw r18, r22
15b4: ac 01 movw r20, r24
15b6: bd 01 movw r22, r26
15b8: cf 01 movw r24, r30
15ba: 08 95 ret
000015bc <__umulhisi3>:
15bc: a2 9f mul r26, r18
15be: b0 01 movw r22, r0
15c0: b3 9f mul r27, r19
15c2: c0 01 movw r24, r0
15c4: a3 9f mul r26, r19
15c6: 70 0d add r23, r0
15c8: 81 1d adc r24, r1
15ca: 11 24 eor r1, r1
15cc: 91 1d adc r25, r1
15ce: b2 9f mul r27, r18
15d0: 70 0d add r23, r0
15d2: 81 1d adc r24, r1
15d4: 11 24 eor r1, r1
15d6: 91 1d adc r25, r1
15d8: 08 95 ret
000015da <_exit>:
15da: f8 94 cli
000015dc <__stop_program>:
15dc: ff cf rjmp .-2 ; 0x15dc <__stop_program>