mca-pendel/sketches/pendulum/pendulum.asm

1961 lines
66 KiB
NASM
Raw Permalink Normal View History

pendulum.elf: Dateiformat elf32-avr
Sektionen:
Idx Name Größe VMA LMA Datei-Off Ausr.
0 .data 0000000e 00800100 00000d3e 00000dd2 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 00000d3e 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .bss 0000000c 0080010e 0080010e 00000de0 2**0
ALLOC
3 .stab 0000111c 00000000 00000000 00000de0 2**2
CONTENTS, READONLY, DEBUGGING
4 .stabstr 00000f67 00000000 00000000 00001efc 2**0
CONTENTS, READONLY, DEBUGGING
5 .comment 00000011 00000000 00000000 00002e63 2**0
CONTENTS, READONLY
6 .note.gnu.avr.deviceinfo 00000040 00000000 00000000 00002e74 2**2
CONTENTS, READONLY
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 3b 00 jmp 0x76 ; 0x76 <__ctors_end>
4: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
8: 0c 94 5a 00 jmp 0xb4 ; 0xb4 <__vector_2>
c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
10: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
14: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
18: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
1c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
20: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
24: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
28: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
2c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
30: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
34: 0c 94 a7 00 jmp 0x14e ; 0x14e <__vector_13>
38: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
3c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
40: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
44: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
48: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
4c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
50: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
54: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
58: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
5c: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
60: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
64: 0c 94 58 00 jmp 0xb0 ; 0xb0 <__bad_interrupt>
68: 9a 02 muls r25, r26
6a: 9e 02 muls r25, r30
6c: a2 02 muls r26, r18
6e: a5 02 muls r26, r21
70: a9 02 muls r26, r25
72: ad 02 muls r26, r29
74: 9a 02 muls r25, r26
00000076 <__ctors_end>:
76: 11 24 eor r1, r1
78: 1f be out 0x3f, r1 ; 63
7a: cf ef ldi r28, 0xFF ; 255
7c: d8 e0 ldi r29, 0x08 ; 8
7e: de bf out 0x3e, r29 ; 62
80: cd bf out 0x3d, r28 ; 61
00000082 <__do_copy_data>:
82: 11 e0 ldi r17, 0x01 ; 1
84: a0 e0 ldi r26, 0x00 ; 0
86: b1 e0 ldi r27, 0x01 ; 1
88: ee e3 ldi r30, 0x3E ; 62
8a: fd e0 ldi r31, 0x0D ; 13
8c: 02 c0 rjmp .+4 ; 0x92 <__do_copy_data+0x10>
8e: 05 90 lpm r0, Z+
90: 0d 92 st X+, r0
92: ae 30 cpi r26, 0x0E ; 14
94: b1 07 cpc r27, r17
96: d9 f7 brne .-10 ; 0x8e <__do_copy_data+0xc>
00000098 <__do_clear_bss>:
98: 21 e0 ldi r18, 0x01 ; 1
9a: ae e0 ldi r26, 0x0E ; 14
9c: b1 e0 ldi r27, 0x01 ; 1
9e: 01 c0 rjmp .+2 ; 0xa2 <.do_clear_bss_start>
000000a0 <.do_clear_bss_loop>:
a0: 1d 92 st X+, r1
000000a2 <.do_clear_bss_start>:
a2: aa 31 cpi r26, 0x1A ; 26
a4: b2 07 cpc r27, r18
a6: e1 f7 brne .-8 ; 0xa0 <.do_clear_bss_loop>
a8: 0e 94 f8 02 call 0x5f0 ; 0x5f0 <main>
ac: 0c 94 9d 06 jmp 0xd3a ; 0xd3a <_exit>
000000b0 <__bad_interrupt>:
b0: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
000000b4 <__vector_2>:
uint32_t volatile oldTime = 0;
uint32_t volatile cooldown = 14000000;
//~ uint32_t volatile delay = 0;
// On External Interrupt:
ISR(INT1_vect) {
b4: 1f 92 push r1
b6: 0f 92 push r0
b8: 0f b6 in r0, 0x3f ; 63
ba: 0f 92 push r0
bc: 11 24 eor r1, r1
be: 2f 93 push r18
c0: 3f 93 push r19
c2: 8f 93 push r24
c4: 9f 93 push r25
c6: af 93 push r26
c8: bf 93 push r27
ca: ef 93 push r30
cc: ff 93 push r31
EIMSK &= 0xfd; // Disable INT1
ce: e9 98 cbi 0x1d, 1 ; 29
PORTC &= 0xef; // Turn LED off while INT1 disabled
d0: 44 98 cbi 0x08, 4 ; 8
//~ uint64_t time2 = TCNT2;
//~ uint64_t time1 = TCNT1;
//~ uint64_t time0 = TCNT0;
//~ T_half = time2 | (time1 << 9) | (time0 << 26);
T_half = time + TCNT1;
d2: 80 91 16 01 lds r24, 0x0116
d6: 90 91 17 01 lds r25, 0x0117
da: a0 91 18 01 lds r26, 0x0118
de: b0 91 19 01 lds r27, 0x0119
e2: e4 e8 ldi r30, 0x84 ; 132
e4: f0 e0 ldi r31, 0x00 ; 0
e6: 20 81 ld r18, Z
e8: 31 81 ldd r19, Z+1 ; 0x01
ea: 82 0f add r24, r18
ec: 93 1f adc r25, r19
ee: a1 1d adc r26, r1
f0: b1 1d adc r27, r1
f2: 80 93 12 01 sts 0x0112, r24
f6: 90 93 13 01 sts 0x0113, r25
fa: a0 93 14 01 sts 0x0114, r26
fe: b0 93 15 01 sts 0x0115, r27
//~ delay = T_half / 16; //Delay for the next possible external interrupt
//~ cooldown = T_half / 2;
TCNT2 = 0; // Reset Timer/Counter2
102: 10 92 b2 00 sts 0x00B2, r1
TCNT1 = 0; // Reset Timer/Counter1
106: 11 82 std Z+1, r1 ; 0x01
108: 10 82 st Z, r1
TCNT0 = 0; // Reset Timer/Counter0
10a: 16 bc out 0x26, r1 ; 38
time = 0;
10c: 10 92 16 01 sts 0x0116, r1
110: 10 92 17 01 sts 0x0117, r1
114: 10 92 18 01 sts 0x0118, r1
118: 10 92 19 01 sts 0x0119, r1
oldTime = 0;
11c: 10 92 0e 01 sts 0x010E, r1
120: 10 92 0f 01 sts 0x010F, r1
124: 10 92 10 01 sts 0x0110, r1
128: 10 92 11 01 sts 0x0111, r1
PORTC ^= 0x02;
12c: 98 b1 in r25, 0x08 ; 8
12e: 82 e0 ldi r24, 0x02 ; 2
130: 89 27 eor r24, r25
132: 88 b9 out 0x08, r24 ; 8
//~ min = HUE_MID;
//~ max = HUE_MID;
//~ status = (status == 1 ? -1 : 1);
}
134: ff 91 pop r31
136: ef 91 pop r30
138: bf 91 pop r27
13a: af 91 pop r26
13c: 9f 91 pop r25
13e: 8f 91 pop r24
140: 3f 91 pop r19
142: 2f 91 pop r18
144: 0f 90 pop r0
146: 0f be out 0x3f, r0 ; 63
148: 0f 90 pop r0
14a: 1f 90 pop r1
14c: 18 95 reti
0000014e <__vector_13>:
//~ // On Timer Overflow Interrupt:
ISR(TIMER1_OVF_vect) {
14e: 1f 92 push r1
150: 0f 92 push r0
152: 0f b6 in r0, 0x3f ; 63
154: 0f 92 push r0
156: 11 24 eor r1, r1
158: 8f 93 push r24
15a: 9f 93 push r25
15c: af 93 push r26
15e: bf 93 push r27
time += 0x00010000;
160: 80 91 16 01 lds r24, 0x0116
164: 90 91 17 01 lds r25, 0x0117
168: a0 91 18 01 lds r26, 0x0118
16c: b0 91 19 01 lds r27, 0x0119
170: 11 96 adiw r26, 0x01 ; 1
172: 80 93 16 01 sts 0x0116, r24
176: 90 93 17 01 sts 0x0117, r25
17a: a0 93 18 01 sts 0x0118, r26
17e: b0 93 19 01 sts 0x0119, r27
}
182: bf 91 pop r27
184: af 91 pop r26
186: 9f 91 pop r25
188: 8f 91 pop r24
18a: 0f 90 pop r0
18c: 0f be out 0x3f, r0 ; 63
18e: 0f 90 pop r0
190: 1f 90 pop r1
192: 18 95 reti
00000194 <writeZero>:
#define wait14 wait8; wait6
#define wait15 wait14; w_nop1
// WS2812B protocol
inline void writeZero() {
PORTC |= 0x01; // PORTC0 = 1, PORTC[5:1] = invariant
194: 40 9a sbi 0x08, 0 ; 8
wait6;
196: 00 c0 rjmp .+0 ; 0x198 <writeZero+0x4>
198: 00 c0 rjmp .+0 ; 0x19a <writeZero+0x6>
19a: 00 c0 rjmp .+0 ; 0x19c <writeZero+0x8>
PORTC &= 0xfe; // PORTC0 = 0, PORTC[5:1] = invariant
19c: 40 98 cbi 0x08, 0 ; 8
wait15;
19e: 00 c0 rjmp .+0 ; 0x1a0 <writeZero+0xc>
1a0: 00 c0 rjmp .+0 ; 0x1a2 <writeZero+0xe>
1a2: 00 c0 rjmp .+0 ; 0x1a4 <writeZero+0x10>
1a4: 00 c0 rjmp .+0 ; 0x1a6 <writeZero+0x12>
1a6: 00 c0 rjmp .+0 ; 0x1a8 <writeZero+0x14>
1a8: 00 c0 rjmp .+0 ; 0x1aa <writeZero+0x16>
1aa: 00 c0 rjmp .+0 ; 0x1ac <writeZero+0x18>
1ac: 00 00 nop
1ae: 08 95 ret
000001b0 <writeOne>:
}
// WS2812B protocol
inline void writeOne() {
PORTC |= 0x01; // PORTC0 = 1, PORTC[5:1] = invariant
1b0: 40 9a sbi 0x08, 0 ; 8
wait14;
1b2: 00 c0 rjmp .+0 ; 0x1b4 <writeOne+0x4>
1b4: 00 c0 rjmp .+0 ; 0x1b6 <writeOne+0x6>
1b6: 00 c0 rjmp .+0 ; 0x1b8 <writeOne+0x8>
1b8: 00 c0 rjmp .+0 ; 0x1ba <writeOne+0xa>
1ba: 00 c0 rjmp .+0 ; 0x1bc <writeOne+0xc>
1bc: 00 c0 rjmp .+0 ; 0x1be <writeOne+0xe>
1be: 00 c0 rjmp .+0 ; 0x1c0 <writeOne+0x10>
PORTC &= 0xfe; // PORTC0 = 0, PORTC[5:1] = invariant
1c0: 40 98 cbi 0x08, 0 ; 8
wait8;
1c2: 00 c0 rjmp .+0 ; 0x1c4 <writeOne+0x14>
1c4: 00 c0 rjmp .+0 ; 0x1c6 <writeOne+0x16>
1c6: 00 c0 rjmp .+0 ; 0x1c8 <writeOne+0x18>
1c8: 00 c0 rjmp .+0 ; 0x1ca <writeOne+0x1a>
1ca: 08 95 ret
000001cc <writeRGB>:
}
inline void writeRGB(uint8_t red, uint8_t green, uint8_t blue) {
1cc: af 92 push r10
1ce: bf 92 push r11
1d0: cf 92 push r12
1d2: df 92 push r13
1d4: ef 92 push r14
1d6: ff 92 push r15
1d8: 0f 93 push r16
1da: 1f 93 push r17
1dc: cf 93 push r28
1de: df 93 push r29
1e0: c8 2e mov r12, r24
1e2: e4 2e mov r14, r20
1e4: c8 e0 ldi r28, 0x08 ; 8
1e6: d0 e0 ldi r29, 0x00 ; 0
int i;
for( i = 128; i > 0; i >>= 1 ) {
1e8: 00 e8 ldi r16, 0x80 ; 128
1ea: 10 e0 ldi r17, 0x00 ; 0
if( green & i ){
1ec: a6 2e mov r10, r22
1ee: b1 2c mov r11, r1
1f0: c8 01 movw r24, r16
1f2: 8a 21 and r24, r10
1f4: 9b 21 and r25, r11
1f6: 89 2b or r24, r25
1f8: 19 f0 breq .+6 ; 0x200 <writeRGB+0x34>
writeOne();
1fa: 0e 94 d8 00 call 0x1b0 ; 0x1b0 <writeOne>
1fe: 02 c0 rjmp .+4 ; 0x204 <writeRGB+0x38>
} else {
writeZero();
200: 0e 94 ca 00 call 0x194 ; 0x194 <writeZero>
}
inline void writeRGB(uint8_t red, uint8_t green, uint8_t blue) {
int i;
for( i = 128; i > 0; i >>= 1 ) {
204: 15 95 asr r17
206: 07 95 ror r16
208: 21 97 sbiw r28, 0x01 ; 1
20a: 91 f7 brne .-28 ; 0x1f0 <writeRGB+0x24>
20c: c8 e0 ldi r28, 0x08 ; 8
20e: d0 e0 ldi r29, 0x00 ; 0
210: 00 e8 ldi r16, 0x80 ; 128
212: 10 e0 ldi r17, 0x00 ; 0
writeZero();
}
}
for( i = 128; i > 0; i >>= 1 ) {
if( red & i ){
214: d1 2c mov r13, r1
216: c8 01 movw r24, r16
218: 8c 21 and r24, r12
21a: 9d 21 and r25, r13
21c: 89 2b or r24, r25
21e: 19 f0 breq .+6 ; 0x226 <writeRGB+0x5a>
writeOne();
220: 0e 94 d8 00 call 0x1b0 ; 0x1b0 <writeOne>
224: 02 c0 rjmp .+4 ; 0x22a <writeRGB+0x5e>
} else {
writeZero();
226: 0e 94 ca 00 call 0x194 ; 0x194 <writeZero>
} else {
writeZero();
}
}
for( i = 128; i > 0; i >>= 1 ) {
22a: 15 95 asr r17
22c: 07 95 ror r16
22e: 21 97 sbiw r28, 0x01 ; 1
230: 91 f7 brne .-28 ; 0x216 <writeRGB+0x4a>
232: c8 e0 ldi r28, 0x08 ; 8
234: d0 e0 ldi r29, 0x00 ; 0
236: 00 e8 ldi r16, 0x80 ; 128
238: 10 e0 ldi r17, 0x00 ; 0
writeZero();
}
}
for( i = 128; i > 0; i >>= 1 ) {
if( blue & i ){
23a: f1 2c mov r15, r1
23c: c8 01 movw r24, r16
23e: 8e 21 and r24, r14
240: 9f 21 and r25, r15
242: 89 2b or r24, r25
244: 19 f0 breq .+6 ; 0x24c <writeRGB+0x80>
writeOne();
246: 0e 94 d8 00 call 0x1b0 ; 0x1b0 <writeOne>
24a: 02 c0 rjmp .+4 ; 0x250 <writeRGB+0x84>
} else {
writeZero();
24c: 0e 94 ca 00 call 0x194 ; 0x194 <writeZero>
} else {
writeZero();
}
}
for( i = 128; i > 0; i >>= 1 ) {
250: 15 95 asr r17
252: 07 95 ror r16
254: 21 97 sbiw r28, 0x01 ; 1
256: 91 f7 brne .-28 ; 0x23c <writeRGB+0x70>
writeOne();
} else {
writeZero();
}
}
}
258: df 91 pop r29
25a: cf 91 pop r28
25c: 1f 91 pop r17
25e: 0f 91 pop r16
260: ff 90 pop r15
262: ef 90 pop r14
264: df 90 pop r13
266: cf 90 pop r12
268: bf 90 pop r11
26a: af 90 pop r10
26c: 08 95 ret
0000026e <interpolate>:
#include "color_hsv.h"
void interpolate(hsv_t start, hsv_t end, size_t steps, hsv_t *colors) {
26e: 2f 92 push r2
270: 3f 92 push r3
272: 4f 92 push r4
274: 5f 92 push r5
276: 6f 92 push r6
278: 7f 92 push r7
27a: 8f 92 push r8
27c: 9f 92 push r9
27e: af 92 push r10
280: bf 92 push r11
282: cf 92 push r12
284: df 92 push r13
286: ef 92 push r14
288: ff 92 push r15
28a: 0f 93 push r16
28c: 1f 93 push r17
28e: cf 93 push r28
290: df 93 push r29
292: cd b7 in r28, 0x3d ; 61
294: de b7 in r29, 0x3e ; 62
296: 2a 97 sbiw r28, 0x0a ; 10
298: 0f b6 in r0, 0x3f ; 63
29a: f8 94 cli
29c: de bf out 0x3e, r29 ; 62
29e: 0f be out 0x3f, r0 ; 63
2a0: cd bf out 0x3d, r28 ; 61
2a2: d8 2e mov r13, r24
2a4: c9 2e mov r12, r25
2a6: f7 01 movw r30, r14
if( steps == 1 ) {
2a8: 01 30 cpi r16, 0x01 ; 1
2aa: 11 05 cpc r17, r1
2ac: 01 f1 breq .+64 ; 0x2ee <interpolate+0x80>
return;
}
for( size_t i = 0; i < steps; i++ ) {
hsv_t tmp;
tmp.hue = (uint16_t)((int16_t)start.hue + ((int16_t)end.hue - (int16_t)start.hue) * (int16_t)i / ((int16_t)steps-1));
2ae: 3b 01 movw r6, r22
2b0: 29 01 movw r4, r18
2b2: 46 1a sub r4, r22
2b4: 57 0a sbc r5, r23
2b6: 84 2f mov r24, r20
2b8: 90 e0 ldi r25, 0x00 ; 0
tmp.sat = (uint8_t)((int16_t)start.sat + ((int16_t)end.sat - (int16_t)start.sat) * (int16_t)i / ((int16_t)steps-1));
2ba: bc 01 movw r22, r24
2bc: 6d 19 sub r22, r13
2be: 71 09 sbc r23, r1
2c0: 7e 83 std Y+6, r23 ; 0x06
2c2: 6d 83 std Y+5, r22 ; 0x05
2c4: 85 2f mov r24, r21
2c6: 90 e0 ldi r25, 0x00 ; 0
tmp.val = (uint8_t)((int16_t)start.val + ((int16_t)end.val - (int16_t)start.val) * (int16_t)i / ((int16_t)steps-1));
2c8: 9c 01 movw r18, r24
2ca: 2c 19 sub r18, r12
2cc: 31 09 sbc r19, r1
2ce: 38 87 std Y+8, r19 ; 0x08
2d0: 2f 83 std Y+7, r18 ; 0x07
2d2: 33 96 adiw r30, 0x03 ; 3
2d4: 1a 86 std Y+10, r1 ; 0x0a
2d6: 19 86 std Y+9, r1 ; 0x09
2d8: e1 2c mov r14, r1
2da: f1 2c mov r15, r1
2dc: 80 e0 ldi r24, 0x00 ; 0
2de: 90 e0 ldi r25, 0x00 ; 0
2e0: 20 e0 ldi r18, 0x00 ; 0
2e2: 30 e0 ldi r19, 0x00 ; 0
return;
}
for( size_t i = 0; i < steps; i++ ) {
hsv_t tmp;
tmp.hue = (uint16_t)((int16_t)start.hue + ((int16_t)end.hue - (int16_t)start.hue) * (int16_t)i / ((int16_t)steps-1));
2e4: 58 01 movw r10, r16
2e6: 41 e0 ldi r20, 0x01 ; 1
2e8: a4 1a sub r10, r20
2ea: b1 08 sbc r11, r1
2ec: 05 c0 rjmp .+10 ; 0x2f8 <interpolate+0x8a>
#include "color_hsv.h"
void interpolate(hsv_t start, hsv_t end, size_t steps, hsv_t *colors) {
if( steps == 1 ) {
colors[0] = start;
2ee: 60 83 st Z, r22
2f0: 71 83 std Z+1, r23 ; 0x01
2f2: 82 83 std Z+2, r24 ; 0x02
2f4: 93 83 std Z+3, r25 ; 0x03
return;
2f6: 3d c0 rjmp .+122 ; 0x372 <interpolate+0x104>
2f8: 1c 01 movw r2, r24
2fa: 24 0c add r2, r4
2fc: 35 1c adc r3, r5
2fe: 4d 81 ldd r20, Y+5 ; 0x05
300: 5e 81 ldd r21, Y+6 ; 0x06
302: 4e 0d add r20, r14
304: 5f 1d adc r21, r15
306: 5a 83 std Y+2, r21 ; 0x02
308: 49 83 std Y+1, r20 ; 0x01
30a: 4f 81 ldd r20, Y+7 ; 0x07
30c: 58 85 ldd r21, Y+8 ; 0x08
30e: 69 85 ldd r22, Y+9 ; 0x09
310: 7a 85 ldd r23, Y+10 ; 0x0a
312: 46 0f add r20, r22
314: 57 1f adc r21, r23
316: 5c 83 std Y+4, r21 ; 0x04
318: 4b 83 std Y+3, r20 ; 0x03
}
for( size_t i = 0; i < steps; i++ ) {
31a: 20 17 cp r18, r16
31c: 31 07 cpc r19, r17
31e: 49 f1 breq .+82 ; 0x372 <interpolate+0x104>
320: 4f 01 movw r8, r30
322: 53 e0 ldi r21, 0x03 ; 3
324: 85 1a sub r8, r21
326: 91 08 sbc r9, r1
hsv_t tmp;
tmp.hue = (uint16_t)((int16_t)start.hue + ((int16_t)end.hue - (int16_t)start.hue) * (int16_t)i / ((int16_t)steps-1));
328: b5 01 movw r22, r10
32a: 0e 94 6f 06 call 0xcde ; 0xcde <__divmodhi4>
32e: 66 0d add r22, r6
330: 77 1d adc r23, r7
tmp.sat = (uint8_t)((int16_t)start.sat + ((int16_t)end.sat - (int16_t)start.sat) * (int16_t)i / ((int16_t)steps-1));
tmp.val = (uint8_t)((int16_t)start.val + ((int16_t)end.val - (int16_t)start.val) * (int16_t)i / ((int16_t)steps-1));
colors[i] = tmp;
332: d4 01 movw r26, r8
334: 6d 93 st X+, r22
336: 7c 93 st X, r23
338: 4f 01 movw r8, r30
33a: b1 e0 ldi r27, 0x01 ; 1
33c: 8b 1a sub r8, r27
33e: 91 08 sbc r9, r1
}
for( size_t i = 0; i < steps; i++ ) {
hsv_t tmp;
tmp.hue = (uint16_t)((int16_t)start.hue + ((int16_t)end.hue - (int16_t)start.hue) * (int16_t)i / ((int16_t)steps-1));
tmp.sat = (uint8_t)((int16_t)start.sat + ((int16_t)end.sat - (int16_t)start.sat) * (int16_t)i / ((int16_t)steps-1));
340: c7 01 movw r24, r14
342: b5 01 movw r22, r10
344: 0e 94 6f 06 call 0xcde ; 0xcde <__divmodhi4>
348: 6d 0d add r22, r13
tmp.val = (uint8_t)((int16_t)start.val + ((int16_t)end.val - (int16_t)start.val) * (int16_t)i / ((int16_t)steps-1));
colors[i] = tmp;
34a: d4 01 movw r26, r8
34c: 6c 93 st X, r22
for( size_t i = 0; i < steps; i++ ) {
hsv_t tmp;
tmp.hue = (uint16_t)((int16_t)start.hue + ((int16_t)end.hue - (int16_t)start.hue) * (int16_t)i / ((int16_t)steps-1));
tmp.sat = (uint8_t)((int16_t)start.sat + ((int16_t)end.sat - (int16_t)start.sat) * (int16_t)i / ((int16_t)steps-1));
tmp.val = (uint8_t)((int16_t)start.val + ((int16_t)end.val - (int16_t)start.val) * (int16_t)i / ((int16_t)steps-1));
34e: 89 85 ldd r24, Y+9 ; 0x09
350: 9a 85 ldd r25, Y+10 ; 0x0a
352: b5 01 movw r22, r10
354: 0e 94 6f 06 call 0xcde ; 0xcde <__divmodhi4>
358: 6c 0d add r22, r12
colors[i] = tmp;
35a: 60 83 st Z, r22
if( steps == 1 ) {
colors[0] = start;
return;
}
for( size_t i = 0; i < steps; i++ ) {
35c: 2f 5f subi r18, 0xFF ; 255
35e: 3f 4f sbci r19, 0xFF ; 255
360: 34 96 adiw r30, 0x04 ; 4
362: 4b 81 ldd r20, Y+3 ; 0x03
364: 5c 81 ldd r21, Y+4 ; 0x04
366: 5a 87 std Y+10, r21 ; 0x0a
368: 49 87 std Y+9, r20 ; 0x09
36a: e9 80 ldd r14, Y+1 ; 0x01
36c: fa 80 ldd r15, Y+2 ; 0x02
36e: c1 01 movw r24, r2
370: c3 cf rjmp .-122 ; 0x2f8 <interpolate+0x8a>
tmp.hue = (uint16_t)((int16_t)start.hue + ((int16_t)end.hue - (int16_t)start.hue) * (int16_t)i / ((int16_t)steps-1));
tmp.sat = (uint8_t)((int16_t)start.sat + ((int16_t)end.sat - (int16_t)start.sat) * (int16_t)i / ((int16_t)steps-1));
tmp.val = (uint8_t)((int16_t)start.val + ((int16_t)end.val - (int16_t)start.val) * (int16_t)i / ((int16_t)steps-1));
colors[i] = tmp;
}
}
372: 2a 96 adiw r28, 0x0a ; 10
374: 0f b6 in r0, 0x3f ; 63
376: f8 94 cli
378: de bf out 0x3e, r29 ; 62
37a: 0f be out 0x3f, r0 ; 63
37c: cd bf out 0x3d, r28 ; 61
37e: df 91 pop r29
380: cf 91 pop r28
382: 1f 91 pop r17
384: 0f 91 pop r16
386: ff 90 pop r15
388: ef 90 pop r14
38a: df 90 pop r13
38c: cf 90 pop r12
38e: bf 90 pop r11
390: af 90 pop r10
392: 9f 90 pop r9
394: 8f 90 pop r8
396: 7f 90 pop r7
398: 6f 90 pop r6
39a: 5f 90 pop r5
39c: 4f 90 pop r4
39e: 3f 90 pop r3
3a0: 2f 90 pop r2
3a2: 08 95 ret
000003a4 <hsv2rgb>:
for(size_t i = 0; i < count; ++i) {
rgbList[i] = hsv2rgb(&hsvList[i]);
}
}
rgb_t hsv2rgb(hsv_t* hsv) {
3a4: 2f 92 push r2
3a6: 3f 92 push r3
3a8: 4f 92 push r4
3aa: 5f 92 push r5
3ac: 6f 92 push r6
3ae: 7f 92 push r7
3b0: 8f 92 push r8
3b2: 9f 92 push r9
3b4: af 92 push r10
3b6: bf 92 push r11
3b8: cf 92 push r12
3ba: df 92 push r13
3bc: ef 92 push r14
3be: ff 92 push r15
3c0: 0f 93 push r16
3c2: 1f 93 push r17
3c4: cf 93 push r28
3c6: df 93 push r29
3c8: 00 d0 rcall .+0 ; 0x3ca <hsv2rgb+0x26>
3ca: 00 d0 rcall .+0 ; 0x3cc <hsv2rgb+0x28>
3cc: cd b7 in r28, 0x3d ; 61
3ce: de b7 in r29, 0x3e ; 62
rgb_t res;
if(hsv->sat == 0) {
3d0: fc 01 movw r30, r24
3d2: b2 80 ldd r11, Z+2 ; 0x02
3d4: 33 80 ldd r3, Z+3 ; 0x03
3d6: b1 10 cpse r11, r1
3d8: 04 c0 rjmp .+8 ; 0x3e2 <hsv2rgb+0x3e>
res.r = res.g = res.b = hsv->val;
3da: 23 2c mov r2, r3
3dc: 3b 82 std Y+3, r3 ; 0x03
3de: 3c 82 std Y+4, r3 ; 0x04
3e0: c2 c0 rjmp .+388 ; 0x566 <hsv2rgb+0x1c2>
3e2: fc 01 movw r30, r24
} else {
float hue = (float) (hsv->hue<360?hsv->hue:hsv->hue-360);
3e4: 00 81 ld r16, Z
3e6: 11 81 ldd r17, Z+1 ; 0x01
3e8: b8 01 movw r22, r16
3ea: 08 36 cpi r16, 0x68 ; 104
3ec: f1 e0 ldi r31, 0x01 ; 1
3ee: 1f 07 cpc r17, r31
3f0: 10 f0 brcs .+4 ; 0x3f6 <hsv2rgb+0x52>
3f2: 68 56 subi r22, 0x68 ; 104
3f4: 71 40 sbci r23, 0x01 ; 1
3f6: 80 e0 ldi r24, 0x00 ; 0
3f8: 90 e0 ldi r25, 0x00 ; 0
3fa: 0e 94 74 05 call 0xae8 ; 0xae8 <__floatunsisf>
3fe: 2b 01 movw r4, r22
400: 3c 01 movw r6, r24
float val = ((float) hsv->val ) / 100.0;
402: 63 2d mov r22, r3
404: 70 e0 ldi r23, 0x00 ; 0
406: 80 e0 ldi r24, 0x00 ; 0
408: 90 e0 ldi r25, 0x00 ; 0
40a: 0e 94 74 05 call 0xae8 ; 0xae8 <__floatunsisf>
40e: 20 e0 ldi r18, 0x00 ; 0
410: 30 e0 ldi r19, 0x00 ; 0
412: 48 ec ldi r20, 0xC8 ; 200
414: 52 e4 ldi r21, 0x42 ; 66
416: 0e 94 d3 04 call 0x9a6 ; 0x9a6 <__divsf3>
41a: 6b 01 movw r12, r22
41c: 7c 01 movw r14, r24
float sat = ((float) hsv->sat ) / 100.0;
41e: 6b 2d mov r22, r11
420: 70 e0 ldi r23, 0x00 ; 0
422: 80 e0 ldi r24, 0x00 ; 0
424: 90 e0 ldi r25, 0x00 ; 0
426: 0e 94 74 05 call 0xae8 ; 0xae8 <__floatunsisf>
42a: 20 e0 ldi r18, 0x00 ; 0
42c: 30 e0 ldi r19, 0x00 ; 0
42e: 48 ec ldi r20, 0xC8 ; 200
430: 52 e4 ldi r21, 0x42 ; 66
432: 0e 94 d3 04 call 0x9a6 ; 0x9a6 <__divsf3>
436: 4b 01 movw r8, r22
438: 5c 01 movw r10, r24
uint8_t h = hue / 60;
43a: 20 e0 ldi r18, 0x00 ; 0
43c: 30 e0 ldi r19, 0x00 ; 0
43e: 40 e7 ldi r20, 0x70 ; 112
440: 52 e4 ldi r21, 0x42 ; 66
442: c3 01 movw r24, r6
444: b2 01 movw r22, r4
446: 0e 94 d3 04 call 0x9a6 ; 0x9a6 <__divsf3>
44a: 2b 01 movw r4, r22
44c: 3c 01 movw r6, r24
44e: 0e 94 45 05 call 0xa8a ; 0xa8a <__fixunssfsi>
452: 6a 83 std Y+2, r22 ; 0x02
float f = ( hue / 60 ) - h;
454: 70 e0 ldi r23, 0x00 ; 0
456: 80 e0 ldi r24, 0x00 ; 0
458: 90 e0 ldi r25, 0x00 ; 0
45a: 0e 94 76 05 call 0xaec ; 0xaec <__floatsisf>
45e: 9b 01 movw r18, r22
460: ac 01 movw r20, r24
462: c3 01 movw r24, r6
464: b2 01 movw r22, r4
466: 0e 94 66 04 call 0x8cc ; 0x8cc <__subsf3>
46a: 2b 01 movw r4, r22
46c: 3c 01 movw r6, r24
uint8_t p = RGB_MAX * ( val * ( 1 - sat ));
46e: a5 01 movw r20, r10
470: 94 01 movw r18, r8
472: 60 e0 ldi r22, 0x00 ; 0
474: 70 e0 ldi r23, 0x00 ; 0
476: 80 e8 ldi r24, 0x80 ; 128
478: 9f e3 ldi r25, 0x3F ; 63
47a: 0e 94 66 04 call 0x8cc ; 0x8cc <__subsf3>
47e: 9b 01 movw r18, r22
480: ac 01 movw r20, r24
482: c7 01 movw r24, r14
484: b6 01 movw r22, r12
486: 0e 94 02 06 call 0xc04 ; 0xc04 <__mulsf3>
48a: 20 e0 ldi r18, 0x00 ; 0
48c: 30 e0 ldi r19, 0x00 ; 0
48e: 40 e0 ldi r20, 0x00 ; 0
490: 53 e4 ldi r21, 0x43 ; 67
492: 0e 94 02 06 call 0xc04 ; 0xc04 <__mulsf3>
496: 0e 94 45 05 call 0xa8a ; 0xa8a <__fixunssfsi>
49a: 26 2e mov r2, r22
uint8_t q = RGB_MAX * ( val * ( 1 - sat * f ));
49c: a3 01 movw r20, r6
49e: 92 01 movw r18, r4
4a0: c5 01 movw r24, r10
4a2: b4 01 movw r22, r8
4a4: 0e 94 02 06 call 0xc04 ; 0xc04 <__mulsf3>
4a8: 9b 01 movw r18, r22
4aa: ac 01 movw r20, r24
4ac: 60 e0 ldi r22, 0x00 ; 0
4ae: 70 e0 ldi r23, 0x00 ; 0
4b0: 80 e8 ldi r24, 0x80 ; 128
4b2: 9f e3 ldi r25, 0x3F ; 63
4b4: 0e 94 66 04 call 0x8cc ; 0x8cc <__subsf3>
4b8: 9b 01 movw r18, r22
4ba: ac 01 movw r20, r24
4bc: c7 01 movw r24, r14
4be: b6 01 movw r22, r12
4c0: 0e 94 02 06 call 0xc04 ; 0xc04 <__mulsf3>
4c4: 20 e0 ldi r18, 0x00 ; 0
4c6: 30 e0 ldi r19, 0x00 ; 0
4c8: 40 e0 ldi r20, 0x00 ; 0
4ca: 53 e4 ldi r21, 0x43 ; 67
4cc: 0e 94 02 06 call 0xc04 ; 0xc04 <__mulsf3>
4d0: 0e 94 45 05 call 0xa8a ; 0xa8a <__fixunssfsi>
4d4: 69 83 std Y+1, r22 ; 0x01
uint8_t t = RGB_MAX * ( val * ( 1 - sat * ( 1 - f )));
4d6: a3 01 movw r20, r6
4d8: 92 01 movw r18, r4
4da: 60 e0 ldi r22, 0x00 ; 0
4dc: 70 e0 ldi r23, 0x00 ; 0
4de: 80 e8 ldi r24, 0x80 ; 128
4e0: 9f e3 ldi r25, 0x3F ; 63
4e2: 0e 94 66 04 call 0x8cc ; 0x8cc <__subsf3>
4e6: 9b 01 movw r18, r22
4e8: ac 01 movw r20, r24
4ea: c5 01 movw r24, r10
4ec: b4 01 movw r22, r8
4ee: 0e 94 02 06 call 0xc04 ; 0xc04 <__mulsf3>
4f2: 9b 01 movw r18, r22
4f4: ac 01 movw r20, r24
4f6: 60 e0 ldi r22, 0x00 ; 0
4f8: 70 e0 ldi r23, 0x00 ; 0
4fa: 80 e8 ldi r24, 0x80 ; 128
4fc: 9f e3 ldi r25, 0x3F ; 63
4fe: 0e 94 66 04 call 0x8cc ; 0x8cc <__subsf3>
502: 9b 01 movw r18, r22
504: ac 01 movw r20, r24
506: c7 01 movw r24, r14
508: b6 01 movw r22, r12
50a: 0e 94 02 06 call 0xc04 ; 0xc04 <__mulsf3>
50e: 20 e0 ldi r18, 0x00 ; 0
510: 30 e0 ldi r19, 0x00 ; 0
512: 40 e0 ldi r20, 0x00 ; 0
514: 53 e4 ldi r21, 0x43 ; 67
516: 0e 94 02 06 call 0xc04 ; 0xc04 <__mulsf3>
51a: 0e 94 45 05 call 0xa8a ; 0xa8a <__fixunssfsi>
switch(h) {
51e: 2a 81 ldd r18, Y+2 ; 0x02
520: 82 2f mov r24, r18
522: 90 e0 ldi r25, 0x00 ; 0
524: 87 30 cpi r24, 0x07 ; 7
526: 91 05 cpc r25, r1
528: e8 f4 brcc .+58 ; 0x564 <hsv2rgb+0x1c0>
52a: fc 01 movw r30, r24
52c: ec 5c subi r30, 0xCC ; 204
52e: ff 4f sbci r31, 0xFF ; 255
530: 0c 94 83 06 jmp 0xd06 ; 0xd06 <__tablejump2__>
case 0:
case 6: res.r = hsv->val; res.g = t; res.b = p; break;
534: 2b 82 std Y+3, r2 ; 0x03
536: 6c 83 std Y+4, r22 ; 0x04
538: 23 2c mov r2, r3
53a: 15 c0 rjmp .+42 ; 0x566 <hsv2rgb+0x1c2>
case 1: res.r = q; res.g = hsv->val; res.b = p; break;
53c: 2b 82 std Y+3, r2 ; 0x03
53e: 3c 82 std Y+4, r3 ; 0x04
540: 29 80 ldd r2, Y+1 ; 0x01
542: 11 c0 rjmp .+34 ; 0x566 <hsv2rgb+0x1c2>
case 2: res.r = p; res.g = hsv->val; res.b = t; break;
544: 6b 83 std Y+3, r22 ; 0x03
546: 3c 82 std Y+4, r3 ; 0x04
548: 0e c0 rjmp .+28 ; 0x566 <hsv2rgb+0x1c2>
case 3: res.r = p; res.g = q; res.b = hsv->val; break;
54a: 3b 82 std Y+3, r3 ; 0x03
54c: 89 81 ldd r24, Y+1 ; 0x01
54e: 8c 83 std Y+4, r24 ; 0x04
550: 0a c0 rjmp .+20 ; 0x566 <hsv2rgb+0x1c2>
case 4: res.r = t; res.g = p; res.b = hsv->val; break;
552: 3b 82 std Y+3, r3 ; 0x03
554: 2c 82 std Y+4, r2 ; 0x04
556: 26 2e mov r2, r22
558: 06 c0 rjmp .+12 ; 0x566 <hsv2rgb+0x1c2>
case 5: res.r = hsv->hue; res.g = p; res.b = q; break;
55a: e9 81 ldd r30, Y+1 ; 0x01
55c: eb 83 std Y+3, r30 ; 0x03
55e: 2c 82 std Y+4, r2 ; 0x04
560: 20 2e mov r2, r16
562: 01 c0 rjmp .+2 ; 0x566 <hsv2rgb+0x1c2>
uint8_t p = RGB_MAX * ( val * ( 1 - sat ));
uint8_t q = RGB_MAX * ( val * ( 1 - sat * f ));
uint8_t t = RGB_MAX * ( val * ( 1 - sat * ( 1 - f )));
switch(h) {
564: 21 2c mov r2, r1
case 5: res.r = hsv->hue; res.g = p; res.b = q; break;
}
}
return res;
}
566: 62 2d mov r22, r2
568: 7c 81 ldd r23, Y+4 ; 0x04
56a: 8b 81 ldd r24, Y+3 ; 0x03
56c: 0f 90 pop r0
56e: 0f 90 pop r0
570: 0f 90 pop r0
572: 0f 90 pop r0
574: df 91 pop r29
576: cf 91 pop r28
578: 1f 91 pop r17
57a: 0f 91 pop r16
57c: ff 90 pop r15
57e: ef 90 pop r14
580: df 90 pop r13
582: cf 90 pop r12
584: bf 90 pop r11
586: af 90 pop r10
588: 9f 90 pop r9
58a: 8f 90 pop r8
58c: 7f 90 pop r7
58e: 6f 90 pop r6
590: 5f 90 pop r5
592: 4f 90 pop r4
594: 3f 90 pop r3
596: 2f 90 pop r2
598: 08 95 ret
0000059a <hsv2rgbList>:
tmp.val = (uint8_t)((int16_t)start.val + ((int16_t)end.val - (int16_t)start.val) * (int16_t)i / ((int16_t)steps-1));
colors[i] = tmp;
}
}
void hsv2rgbList(hsv_t* hsvList, rgb_t* rgbList, size_t count) {
59a: cf 92 push r12
59c: df 92 push r13
59e: ef 92 push r14
5a0: ff 92 push r15
5a2: 0f 93 push r16
5a4: 1f 93 push r17
5a6: cf 93 push r28
5a8: df 93 push r29
5aa: 6a 01 movw r12, r20
5ac: eb 01 movw r28, r22
5ae: 7c 01 movw r14, r24
for(size_t i = 0; i < count; ++i) {
5b0: 00 e0 ldi r16, 0x00 ; 0
5b2: 10 e0 ldi r17, 0x00 ; 0
5b4: 0c 15 cp r16, r12
5b6: 1d 05 cpc r17, r13
5b8: 61 f0 breq .+24 ; 0x5d2 <hsv2rgbList+0x38>
rgbList[i] = hsv2rgb(&hsvList[i]);
5ba: c7 01 movw r24, r14
5bc: 0e 94 d2 01 call 0x3a4 ; 0x3a4 <hsv2rgb>
5c0: 69 93 st Y+, r22
5c2: 79 93 st Y+, r23
5c4: 89 93 st Y+, r24
colors[i] = tmp;
}
}
void hsv2rgbList(hsv_t* hsvList, rgb_t* rgbList, size_t count) {
for(size_t i = 0; i < count; ++i) {
5c6: 0f 5f subi r16, 0xFF ; 255
5c8: 1f 4f sbci r17, 0xFF ; 255
5ca: 84 e0 ldi r24, 0x04 ; 4
5cc: e8 0e add r14, r24
5ce: f1 1c adc r15, r1
5d0: f1 cf rjmp .-30 ; 0x5b4 <hsv2rgbList+0x1a>
rgbList[i] = hsv2rgb(&hsvList[i]);
}
}
5d2: df 91 pop r29
5d4: cf 91 pop r28
5d6: 1f 91 pop r17
5d8: 0f 91 pop r16
5da: ff 90 pop r15
5dc: ef 90 pop r14
5de: df 90 pop r13
5e0: cf 90 pop r12
5e2: 08 95 ret
000005e4 <init_hsv_t>:
5e4: 28 2f mov r18, r24
5e6: 86 2f mov r24, r22
5e8: 62 2f mov r22, r18
5ea: 79 2f mov r23, r25
5ec: 94 2f mov r25, r20
5ee: 08 95 ret
000005f0 <main>:
//~ // On Timer Overflow Interrupt:
ISR(TIMER1_OVF_vect) {
time += 0x00010000;
}
int main(void) {
5f0: cf 93 push r28
5f2: df 93 push r29
5f4: cd b7 in r28, 0x3d ; 61
5f6: de b7 in r29, 0x3e ; 62
5f8: c2 5d subi r28, 0xD2 ; 210
5fa: d1 09 sbc r29, r1
5fc: 0f b6 in r0, 0x3f ; 63
5fe: f8 94 cli
600: de bf out 0x3e, r29 ; 62
602: 0f be out 0x3f, r0 ; 63
604: cd bf out 0x3d, r28 ; 61
EIMSK |= 0x02; // External Interrupt Mask Register
606: e9 9a sbi 0x1d, 1 ; 29
// Enable INT1 (PIN5) for interrupt
EICRA |= 0x0c; // External Interrupt Control Register
608: 80 91 69 00 lds r24, 0x0069
60c: 8c 60 ori r24, 0x0C ; 12
60e: 80 93 69 00 sts 0x0069, r24
// INT1 on rising edge
TIMSK1 |= 0x01; // Timer/Counter1 Interrupt Mask Register
612: 80 91 6f 00 lds r24, 0x006F
616: 81 60 ori r24, 0x01 ; 1
618: 80 93 6f 00 sts 0x006F, r24
// Enable overflow interrupt
TCCR1B |= 0x01; // Timer/Counter1 Control Register B
61c: 80 91 81 00 lds r24, 0x0081
620: 81 60 ori r24, 0x01 ; 1
622: 80 93 81 00 sts 0x0081, r24
// Prescale Factor 1
SREG |= 0x80; // Status Register
626: 8f b7 in r24, 0x3f ; 63
628: 80 68 ori r24, 0x80 ; 128
62a: 8f bf out 0x3f, r24 ; 63
// Enable global interrupts
DDRC = 0x3f; // Digital Direction PORTC[5:0] = output
62c: 8f e3 ldi r24, 0x3F ; 63
62e: 87 b9 out 0x07, r24 ; 7
PORTC = 0x00;
630: 18 b8 out 0x08, r1 ; 8
//~ // External clock source on T0 (PIN6, PD4) on rising edge
// Init color
hsv_t colorsHSV[LEDS];
rgb_t colorsRGB[LEDS];
interpolate(
632: 80 91 04 01 lds r24, 0x0104
636: 90 91 05 01 lds r25, 0x0105
63a: 44 e1 ldi r20, 0x14 ; 20
63c: 64 e6 ldi r22, 0x64 ; 100
63e: 0e 94 f2 02 call 0x5e4 ; 0x5e4 <init_hsv_t>
642: 4b 01 movw r8, r22
644: 5c 01 movw r10, r24
646: 80 91 06 01 lds r24, 0x0106
64a: 90 91 07 01 lds r25, 0x0107
64e: 44 e1 ldi r20, 0x14 ; 20
650: 64 e6 ldi r22, 0x64 ; 100
652: 0e 94 f2 02 call 0x5e4 ; 0x5e4 <init_hsv_t>
656: 9e 01 movw r18, r28
658: 2f 5f subi r18, 0xFF ; 255
65a: 3f 4f sbci r19, 0xFF ; 255
65c: 79 01 movw r14, r18
65e: 0e e1 ldi r16, 0x1E ; 30
660: 10 e0 ldi r17, 0x00 ; 0
662: a5 01 movw r20, r10
664: 94 01 movw r18, r8
666: 0e 94 37 01 call 0x26e ; 0x26e <interpolate>
init_hsv_t(min, HUE_SAT, HUE_VAL), // from color
init_hsv_t(max, HUE_SAT, HUE_VAL), // to color
LEDS,
colorsHSV
);
hsv2rgbList(colorsHSV, colorsRGB, LEDS);
66a: 4e e1 ldi r20, 0x1E ; 30
66c: 50 e0 ldi r21, 0x00 ; 0
66e: be 01 movw r22, r28
670: 67 58 subi r22, 0x87 ; 135
672: 7f 4f sbci r23, 0xFF ; 255
674: c7 01 movw r24, r14
676: 0e 94 cd 02 call 0x59a ; 0x59a <hsv2rgbList>
67a: 49 e7 ldi r20, 0x79 ; 121
67c: a4 2e mov r10, r20
67e: b1 2c mov r11, r1
680: ac 0e add r10, r28
682: bd 1e adc r11, r29
684: 32 e0 ldi r19, 0x02 ; 2
686: a3 0e add r10, r19
688: b1 1c adc r11, r1
68a: 4e 01 movw r8, r28
68c: 85 ed ldi r24, 0xD5 ; 213
68e: 88 0e add r8, r24
690: 91 1c adc r9, r1
692: 85 01 movw r16, r10
694: d8 01 movw r26, r16
696: 11 97 sbiw r26, 0x01 ; 1
698: c8 01 movw r24, r16
69a: 02 97 sbiw r24, 0x02 ; 2
// Assign color
for(int i = 0; i < LEDS; i++) {
writeRGB( colorsRGB[i].r, colorsRGB[i].g, colorsRGB[i].b);
69c: f8 01 movw r30, r16
69e: 40 81 ld r20, Z
6a0: 6c 91 ld r22, X
6a2: fc 01 movw r30, r24
6a4: 80 81 ld r24, Z
6a6: 0e 94 e6 00 call 0x1cc ; 0x1cc <writeRGB>
6aa: 0d 5f subi r16, 0xFD ; 253
6ac: 1f 4f sbci r17, 0xFF ; 255
LEDS,
colorsHSV
);
hsv2rgbList(colorsHSV, colorsRGB, LEDS);
// Assign color
for(int i = 0; i < LEDS; i++) {
6ae: 08 15 cp r16, r8
6b0: 19 05 cpc r17, r9
6b2: 81 f7 brne .-32 ; 0x694 <main+0xa4>
writeRGB( colorsRGB[i].r, colorsRGB[i].g, colorsRGB[i].b);
}
// Next color
int8_t sign = 1;
min += sign * HUE_STEP;
6b4: 80 91 06 01 lds r24, 0x0106
6b8: 90 91 07 01 lds r25, 0x0107
6bc: 08 96 adiw r24, 0x08 ; 8
6be: 90 93 07 01 sts 0x0107, r25
6c2: 80 93 06 01 sts 0x0106, r24
max -= sign * HUE_STEP;
6c6: 80 91 04 01 lds r24, 0x0104
6ca: 90 91 05 01 lds r25, 0x0105
6ce: 08 97 sbiw r24, 0x08 ; 8
6d0: 90 93 05 01 sts 0x0105, r25
6d4: 80 93 04 01 sts 0x0104, r24
interpolate(
6d8: 80 91 04 01 lds r24, 0x0104
6dc: 90 91 05 01 lds r25, 0x0105
6e0: 44 e1 ldi r20, 0x14 ; 20
6e2: 64 e6 ldi r22, 0x64 ; 100
6e4: 0e 94 f2 02 call 0x5e4 ; 0x5e4 <init_hsv_t>
6e8: 2b 01 movw r4, r22
6ea: 3c 01 movw r6, r24
6ec: 80 91 06 01 lds r24, 0x0106
6f0: 90 91 07 01 lds r25, 0x0107
6f4: 44 e1 ldi r20, 0x14 ; 20
6f6: 64 e6 ldi r22, 0x64 ; 100
6f8: 0e 94 f2 02 call 0x5e4 ; 0x5e4 <init_hsv_t>
6fc: 9e 01 movw r18, r28
6fe: 2f 5f subi r18, 0xFF ; 255
700: 3f 4f sbci r19, 0xFF ; 255
702: 79 01 movw r14, r18
704: 0e e1 ldi r16, 0x1E ; 30
706: 10 e0 ldi r17, 0x00 ; 0
708: a3 01 movw r20, r6
70a: 92 01 movw r18, r4
70c: 0e 94 37 01 call 0x26e ; 0x26e <interpolate>
init_hsv_t(min, HUE_SAT, HUE_VAL), // from color
init_hsv_t(max, HUE_SAT, HUE_VAL), // to color
LEDS,
colorsHSV
);
hsv2rgbList(colorsHSV, colorsRGB, LEDS);
710: 4e e1 ldi r20, 0x1E ; 30
712: 50 e0 ldi r21, 0x00 ; 0
714: be 01 movw r22, r28
716: 67 58 subi r22, 0x87 ; 135
718: 7f 4f sbci r23, 0xFF ; 255
71a: c7 01 movw r24, r14
71c: 0e 94 cd 02 call 0x59a ; 0x59a <hsv2rgbList>
for(int i = 0; i < LEDS; i++) {
writeRGB( colorsRGB[i].r, colorsRGB[i].g, colorsRGB[i].b);
}
// Next color
int8_t sign = 1;
720: dd 24 eor r13, r13
722: d3 94 inc r13
uint32_t T_step = T_half / colorSteps;
// Check if it is time for next color
if(now > oldTime + T_step) {
oldTime += T_step;
PORTC ^= 0x04;
724: 34 e0 ldi r19, 0x04 ; 4
726: c3 2e mov r12, r19
while(1) {
//~ uint64_t time2 = TCNT2;
//~ uint64_t time1 = TCNT1;
//~ uint64_t time0 = TCNT0;
//~ uint64_t now = time2 | (time1 << 9) | (time0 << 26);
uint32_t now = time + TCNT1;
728: 40 91 16 01 lds r20, 0x0116
72c: 50 91 17 01 lds r21, 0x0117
730: 60 91 18 01 lds r22, 0x0118
734: 70 91 19 01 lds r23, 0x0119
738: 80 91 84 00 lds r24, 0x0084
73c: 90 91 85 00 lds r25, 0x0085
740: 48 0f add r20, r24
742: 59 1f adc r21, r25
744: 61 1d adc r22, r1
746: 71 1d adc r23, r1
//~ }
//~ if(now > delay * 2) {
//~ PORTC &= 0xf7; // PORTC3 = LOW
//~ }
if(now > cooldown) {
748: 80 91 00 01 lds r24, 0x0100
74c: 90 91 01 01 lds r25, 0x0101
750: a0 91 02 01 lds r26, 0x0102
754: b0 91 03 01 lds r27, 0x0103
758: 84 17 cp r24, r20
75a: 95 07 cpc r25, r21
75c: a6 07 cpc r26, r22
75e: b7 07 cpc r27, r23
760: 10 f4 brcc .+4 ; 0x766 <main+0x176>
EIMSK |= 0x02; // Enable INT1
762: e9 9a sbi 0x1d, 1 ; 29
PORTC |= 0x10; // Turn on LED while INT1 enabled
764: 44 9a sbi 0x08, 4 ; 8
}
uint32_t T_step = T_half / colorSteps;
766: 80 91 12 01 lds r24, 0x0112
76a: 90 91 13 01 lds r25, 0x0113
76e: a0 91 14 01 lds r26, 0x0114
772: b0 91 15 01 lds r27, 0x0115
776: 25 e0 ldi r18, 0x05 ; 5
778: b6 95 lsr r27
77a: a7 95 ror r26
77c: 97 95 ror r25
77e: 87 95 ror r24
780: 2a 95 dec r18
782: d1 f7 brne .-12 ; 0x778 <main+0x188>
// Check if it is time for next color
if(now > oldTime + T_step) {
784: 00 91 0e 01 lds r16, 0x010E
788: 10 91 0f 01 lds r17, 0x010F
78c: 20 91 10 01 lds r18, 0x0110
790: 30 91 11 01 lds r19, 0x0111
794: 08 0f add r16, r24
796: 19 1f adc r17, r25
798: 2a 1f adc r18, r26
79a: 3b 1f adc r19, r27
79c: 04 17 cp r16, r20
79e: 15 07 cpc r17, r21
7a0: 26 07 cpc r18, r22
7a2: 37 07 cpc r19, r23
7a4: 08 f6 brcc .-126 ; 0x728 <main+0x138>
oldTime += T_step;
7a6: 40 91 0e 01 lds r20, 0x010E
7aa: 50 91 0f 01 lds r21, 0x010F
7ae: 60 91 10 01 lds r22, 0x0110
7b2: 70 91 11 01 lds r23, 0x0111
7b6: 84 0f add r24, r20
7b8: 95 1f adc r25, r21
7ba: a6 1f adc r26, r22
7bc: b7 1f adc r27, r23
7be: 80 93 0e 01 sts 0x010E, r24
7c2: 90 93 0f 01 sts 0x010F, r25
7c6: a0 93 10 01 sts 0x0110, r26
7ca: b0 93 11 01 sts 0x0111, r27
PORTC ^= 0x04;
7ce: 88 b1 in r24, 0x08 ; 8
7d0: 8c 25 eor r24, r12
7d2: 88 b9 out 0x08, r24 ; 8
7d4: 85 01 movw r16, r10
7d6: d8 01 movw r26, r16
7d8: 11 97 sbiw r26, 0x01 ; 1
7da: c8 01 movw r24, r16
7dc: 02 97 sbiw r24, 0x02 ; 2
// Assign color
//~ EIMSK &= 0xfd; //~ cli();
for(int i = 0; i < LEDS; i++) {
writeRGB( colorsRGB[i].r, colorsRGB[i].g, colorsRGB[i].b);
7de: f8 01 movw r30, r16
7e0: 40 81 ld r20, Z
7e2: 6c 91 ld r22, X
7e4: fc 01 movw r30, r24
7e6: 80 81 ld r24, Z
7e8: 0e 94 e6 00 call 0x1cc ; 0x1cc <writeRGB>
7ec: 0d 5f subi r16, 0xFD ; 253
7ee: 1f 4f sbci r17, 0xFF ; 255
if(now > oldTime + T_step) {
oldTime += T_step;
PORTC ^= 0x04;
// Assign color
//~ EIMSK &= 0xfd; //~ cli();
for(int i = 0; i < LEDS; i++) {
7f0: 08 15 cp r16, r8
7f2: 19 05 cpc r17, r9
7f4: 81 f7 brne .-32 ; 0x7d6 <main+0x1e6>
}
//~ EIMSK |= 0x02; //~ sei();
//~ _delay_us(51);
// Next color
min += sign * HUE_STEP;
7f6: 80 91 06 01 lds r24, 0x0106
7fa: 90 91 07 01 lds r25, 0x0107
7fe: fd 2d mov r31, r13
800: 28 e0 ldi r18, 0x08 ; 8
802: f2 02 muls r31, r18
804: 80 0d add r24, r0
806: 91 1d adc r25, r1
808: 11 24 eor r1, r1
80a: 90 93 07 01 sts 0x0107, r25
80e: 80 93 06 01 sts 0x0106, r24
max -= sign * HUE_STEP;
812: 80 91 04 01 lds r24, 0x0104
816: 90 91 05 01 lds r25, 0x0105
81a: 38 e0 ldi r19, 0x08 ; 8
81c: f3 02 muls r31, r19
81e: 80 19 sub r24, r0
820: 91 09 sbc r25, r1
822: 11 24 eor r1, r1
824: 90 93 05 01 sts 0x0105, r25
828: 80 93 04 01 sts 0x0104, r24
interpolate(
82c: 80 91 04 01 lds r24, 0x0104
830: 90 91 05 01 lds r25, 0x0105
834: 44 e1 ldi r20, 0x14 ; 20
836: 64 e6 ldi r22, 0x64 ; 100
838: 0e 94 f2 02 call 0x5e4 ; 0x5e4 <init_hsv_t>
83c: 2b 01 movw r4, r22
83e: 3c 01 movw r6, r24
840: 80 91 06 01 lds r24, 0x0106
844: 90 91 07 01 lds r25, 0x0107
848: 44 e1 ldi r20, 0x14 ; 20
84a: 64 e6 ldi r22, 0x64 ; 100
84c: 0e 94 f2 02 call 0x5e4 ; 0x5e4 <init_hsv_t>
850: fe 01 movw r30, r28
852: 31 96 adiw r30, 0x01 ; 1
854: 7f 01 movw r14, r30
856: 0e e1 ldi r16, 0x1E ; 30
858: 10 e0 ldi r17, 0x00 ; 0
85a: a3 01 movw r20, r6
85c: 92 01 movw r18, r4
85e: 0e 94 37 01 call 0x26e ; 0x26e <interpolate>
init_hsv_t(min, HUE_SAT, HUE_VAL), // from color
init_hsv_t(max, HUE_SAT, HUE_VAL), // to color
LEDS,
colorsHSV
);
hsv2rgbList(colorsHSV, colorsRGB, LEDS);
862: 4e e1 ldi r20, 0x1E ; 30
864: 50 e0 ldi r21, 0x00 ; 0
866: be 01 movw r22, r28
868: 67 58 subi r22, 0x87 ; 135
86a: 7f 4f sbci r23, 0xFF ; 255
86c: c7 01 movw r24, r14
86e: 0e 94 cd 02 call 0x59a ; 0x59a <hsv2rgbList>
// Check if reached amplitude
if(sign == 1 && (min >= HUE_MAX || max <= HUE_MIN)) {
872: f1 e0 ldi r31, 0x01 ; 1
874: df 12 cpse r13, r31
876: 12 c0 rjmp .+36 ; 0x89c <main+0x2ac>
878: 80 91 06 01 lds r24, 0x0106
87c: 90 91 07 01 lds r25, 0x0107
880: 82 36 cpi r24, 0x62 ; 98
882: 92 40 sbci r25, 0x02 ; 2
884: 18 f0 brcs .+6 ; 0x88c <main+0x29c>
sign = -1;
886: dd 24 eor r13, r13
888: da 94 dec r13
88a: 4e cf rjmp .-356 ; 0x728 <main+0x138>
LEDS,
colorsHSV
);
hsv2rgbList(colorsHSV, colorsRGB, LEDS);
// Check if reached amplitude
if(sign == 1 && (min >= HUE_MAX || max <= HUE_MIN)) {
88c: 80 91 04 01 lds r24, 0x0104
890: 90 91 05 01 lds r25, 0x0105
894: 8f 35 cpi r24, 0x5F ; 95
896: 91 40 sbci r25, 0x01 ; 1
898: b0 f3 brcs .-20 ; 0x886 <main+0x296>
89a: 46 cf rjmp .-372 ; 0x728 <main+0x138>
sign = -1;
} else if(sign == -1 && (min <= HUE_MIN || max >= HUE_MAX)) {
89c: 8f ef ldi r24, 0xFF ; 255
89e: d8 16 cp r13, r24
8a0: 11 f0 breq .+4 ; 0x8a6 <main+0x2b6>
8a2: d1 2c mov r13, r1
8a4: 41 cf rjmp .-382 ; 0x728 <main+0x138>
8a6: 80 91 06 01 lds r24, 0x0106
8aa: 90 91 07 01 lds r25, 0x0107
8ae: 8f 35 cpi r24, 0x5F ; 95
8b0: 91 40 sbci r25, 0x01 ; 1
8b2: 18 f4 brcc .+6 ; 0x8ba <main+0x2ca>
sign = 1;
8b4: dd 24 eor r13, r13
8b6: d3 94 inc r13
8b8: 37 cf rjmp .-402 ; 0x728 <main+0x138>
);
hsv2rgbList(colorsHSV, colorsRGB, LEDS);
// Check if reached amplitude
if(sign == 1 && (min >= HUE_MAX || max <= HUE_MIN)) {
sign = -1;
} else if(sign == -1 && (min <= HUE_MIN || max >= HUE_MAX)) {
8ba: 80 91 04 01 lds r24, 0x0104
8be: 90 91 05 01 lds r25, 0x0105
8c2: 82 36 cpi r24, 0x62 ; 98
8c4: 92 40 sbci r25, 0x02 ; 2
8c6: 08 f4 brcc .+2 ; 0x8ca <main+0x2da>
8c8: 2f cf rjmp .-418 ; 0x728 <main+0x138>
8ca: f4 cf rjmp .-24 ; 0x8b4 <main+0x2c4>
000008cc <__subsf3>:
8cc: 50 58 subi r21, 0x80 ; 128
000008ce <__addsf3>:
8ce: bb 27 eor r27, r27
8d0: aa 27 eor r26, r26
8d2: 0e 94 7e 04 call 0x8fc ; 0x8fc <__addsf3x>
8d6: 0c 94 c8 05 jmp 0xb90 ; 0xb90 <__fp_round>
8da: 0e 94 ba 05 call 0xb74 ; 0xb74 <__fp_pscA>
8de: 38 f0 brcs .+14 ; 0x8ee <__addsf3+0x20>
8e0: 0e 94 c1 05 call 0xb82 ; 0xb82 <__fp_pscB>
8e4: 20 f0 brcs .+8 ; 0x8ee <__addsf3+0x20>
8e6: 39 f4 brne .+14 ; 0x8f6 <__addsf3+0x28>
8e8: 9f 3f cpi r25, 0xFF ; 255
8ea: 19 f4 brne .+6 ; 0x8f2 <__addsf3+0x24>
8ec: 26 f4 brtc .+8 ; 0x8f6 <__addsf3+0x28>
8ee: 0c 94 b7 05 jmp 0xb6e ; 0xb6e <__fp_nan>
8f2: 0e f4 brtc .+2 ; 0x8f6 <__addsf3+0x28>
8f4: e0 95 com r30
8f6: e7 fb bst r30, 7
8f8: 0c 94 b1 05 jmp 0xb62 ; 0xb62 <__fp_inf>
000008fc <__addsf3x>:
8fc: e9 2f mov r30, r25
8fe: 0e 94 d9 05 call 0xbb2 ; 0xbb2 <__fp_split3>
902: 58 f3 brcs .-42 ; 0x8da <__addsf3+0xc>
904: ba 17 cp r27, r26
906: 62 07 cpc r22, r18
908: 73 07 cpc r23, r19
90a: 84 07 cpc r24, r20
90c: 95 07 cpc r25, r21
90e: 20 f0 brcs .+8 ; 0x918 <__stack+0x19>
910: 79 f4 brne .+30 ; 0x930 <__stack+0x31>
912: a6 f5 brtc .+104 ; 0x97c <__stack+0x7d>
914: 0c 94 fb 05 jmp 0xbf6 ; 0xbf6 <__fp_zero>
918: 0e f4 brtc .+2 ; 0x91c <__stack+0x1d>
91a: e0 95 com r30
91c: 0b 2e mov r0, r27
91e: ba 2f mov r27, r26
920: a0 2d mov r26, r0
922: 0b 01 movw r0, r22
924: b9 01 movw r22, r18
926: 90 01 movw r18, r0
928: 0c 01 movw r0, r24
92a: ca 01 movw r24, r20
92c: a0 01 movw r20, r0
92e: 11 24 eor r1, r1
930: ff 27 eor r31, r31
932: 59 1b sub r21, r25
934: 99 f0 breq .+38 ; 0x95c <__stack+0x5d>
936: 59 3f cpi r21, 0xF9 ; 249
938: 50 f4 brcc .+20 ; 0x94e <__stack+0x4f>
93a: 50 3e cpi r21, 0xE0 ; 224
93c: 68 f1 brcs .+90 ; 0x998 <__stack+0x99>
93e: 1a 16 cp r1, r26
940: f0 40 sbci r31, 0x00 ; 0
942: a2 2f mov r26, r18
944: 23 2f mov r18, r19
946: 34 2f mov r19, r20
948: 44 27 eor r20, r20
94a: 58 5f subi r21, 0xF8 ; 248
94c: f3 cf rjmp .-26 ; 0x934 <__stack+0x35>
94e: 46 95 lsr r20
950: 37 95 ror r19
952: 27 95 ror r18
954: a7 95 ror r26
956: f0 40 sbci r31, 0x00 ; 0
958: 53 95 inc r21
95a: c9 f7 brne .-14 ; 0x94e <__stack+0x4f>
95c: 7e f4 brtc .+30 ; 0x97c <__stack+0x7d>
95e: 1f 16 cp r1, r31
960: ba 0b sbc r27, r26
962: 62 0b sbc r22, r18
964: 73 0b sbc r23, r19
966: 84 0b sbc r24, r20
968: ba f0 brmi .+46 ; 0x998 <__stack+0x99>
96a: 91 50 subi r25, 0x01 ; 1
96c: a1 f0 breq .+40 ; 0x996 <__stack+0x97>
96e: ff 0f add r31, r31
970: bb 1f adc r27, r27
972: 66 1f adc r22, r22
974: 77 1f adc r23, r23
976: 88 1f adc r24, r24
978: c2 f7 brpl .-16 ; 0x96a <__stack+0x6b>
97a: 0e c0 rjmp .+28 ; 0x998 <__stack+0x99>
97c: ba 0f add r27, r26
97e: 62 1f adc r22, r18
980: 73 1f adc r23, r19
982: 84 1f adc r24, r20
984: 48 f4 brcc .+18 ; 0x998 <__stack+0x99>
986: 87 95 ror r24
988: 77 95 ror r23
98a: 67 95 ror r22
98c: b7 95 ror r27
98e: f7 95 ror r31
990: 9e 3f cpi r25, 0xFE ; 254
992: 08 f0 brcs .+2 ; 0x996 <__stack+0x97>
994: b0 cf rjmp .-160 ; 0x8f6 <__addsf3+0x28>
996: 93 95 inc r25
998: 88 0f add r24, r24
99a: 08 f0 brcs .+2 ; 0x99e <__stack+0x9f>
99c: 99 27 eor r25, r25
99e: ee 0f add r30, r30
9a0: 97 95 ror r25
9a2: 87 95 ror r24
9a4: 08 95 ret
000009a6 <__divsf3>:
9a6: 0e 94 e7 04 call 0x9ce ; 0x9ce <__divsf3x>
9aa: 0c 94 c8 05 jmp 0xb90 ; 0xb90 <__fp_round>
9ae: 0e 94 c1 05 call 0xb82 ; 0xb82 <__fp_pscB>
9b2: 58 f0 brcs .+22 ; 0x9ca <__divsf3+0x24>
9b4: 0e 94 ba 05 call 0xb74 ; 0xb74 <__fp_pscA>
9b8: 40 f0 brcs .+16 ; 0x9ca <__divsf3+0x24>
9ba: 29 f4 brne .+10 ; 0x9c6 <__divsf3+0x20>
9bc: 5f 3f cpi r21, 0xFF ; 255
9be: 29 f0 breq .+10 ; 0x9ca <__divsf3+0x24>
9c0: 0c 94 b1 05 jmp 0xb62 ; 0xb62 <__fp_inf>
9c4: 51 11 cpse r21, r1
9c6: 0c 94 fc 05 jmp 0xbf8 ; 0xbf8 <__fp_szero>
9ca: 0c 94 b7 05 jmp 0xb6e ; 0xb6e <__fp_nan>
000009ce <__divsf3x>:
9ce: 0e 94 d9 05 call 0xbb2 ; 0xbb2 <__fp_split3>
9d2: 68 f3 brcs .-38 ; 0x9ae <__divsf3+0x8>
000009d4 <__divsf3_pse>:
9d4: 99 23 and r25, r25
9d6: b1 f3 breq .-20 ; 0x9c4 <__divsf3+0x1e>
9d8: 55 23 and r21, r21
9da: 91 f3 breq .-28 ; 0x9c0 <__divsf3+0x1a>
9dc: 95 1b sub r25, r21
9de: 55 0b sbc r21, r21
9e0: bb 27 eor r27, r27
9e2: aa 27 eor r26, r26
9e4: 62 17 cp r22, r18
9e6: 73 07 cpc r23, r19
9e8: 84 07 cpc r24, r20
9ea: 38 f0 brcs .+14 ; 0x9fa <__divsf3_pse+0x26>
9ec: 9f 5f subi r25, 0xFF ; 255
9ee: 5f 4f sbci r21, 0xFF ; 255
9f0: 22 0f add r18, r18
9f2: 33 1f adc r19, r19
9f4: 44 1f adc r20, r20
9f6: aa 1f adc r26, r26
9f8: a9 f3 breq .-22 ; 0x9e4 <__divsf3_pse+0x10>
9fa: 35 d0 rcall .+106 ; 0xa66 <__divsf3_pse+0x92>
9fc: 0e 2e mov r0, r30
9fe: 3a f0 brmi .+14 ; 0xa0e <__divsf3_pse+0x3a>
a00: e0 e8 ldi r30, 0x80 ; 128
a02: 32 d0 rcall .+100 ; 0xa68 <__divsf3_pse+0x94>
a04: 91 50 subi r25, 0x01 ; 1
a06: 50 40 sbci r21, 0x00 ; 0
a08: e6 95 lsr r30
a0a: 00 1c adc r0, r0
a0c: ca f7 brpl .-14 ; 0xa00 <__divsf3_pse+0x2c>
a0e: 2b d0 rcall .+86 ; 0xa66 <__divsf3_pse+0x92>
a10: fe 2f mov r31, r30
a12: 29 d0 rcall .+82 ; 0xa66 <__divsf3_pse+0x92>
a14: 66 0f add r22, r22
a16: 77 1f adc r23, r23
a18: 88 1f adc r24, r24
a1a: bb 1f adc r27, r27
a1c: 26 17 cp r18, r22
a1e: 37 07 cpc r19, r23
a20: 48 07 cpc r20, r24
a22: ab 07 cpc r26, r27
a24: b0 e8 ldi r27, 0x80 ; 128
a26: 09 f0 breq .+2 ; 0xa2a <__divsf3_pse+0x56>
a28: bb 0b sbc r27, r27
a2a: 80 2d mov r24, r0
a2c: bf 01 movw r22, r30
a2e: ff 27 eor r31, r31
a30: 93 58 subi r25, 0x83 ; 131
a32: 5f 4f sbci r21, 0xFF ; 255
a34: 3a f0 brmi .+14 ; 0xa44 <__divsf3_pse+0x70>
a36: 9e 3f cpi r25, 0xFE ; 254
a38: 51 05 cpc r21, r1
a3a: 78 f0 brcs .+30 ; 0xa5a <__divsf3_pse+0x86>
a3c: 0c 94 b1 05 jmp 0xb62 ; 0xb62 <__fp_inf>
a40: 0c 94 fc 05 jmp 0xbf8 ; 0xbf8 <__fp_szero>
a44: 5f 3f cpi r21, 0xFF ; 255
a46: e4 f3 brlt .-8 ; 0xa40 <__divsf3_pse+0x6c>
a48: 98 3e cpi r25, 0xE8 ; 232
a4a: d4 f3 brlt .-12 ; 0xa40 <__divsf3_pse+0x6c>
a4c: 86 95 lsr r24
a4e: 77 95 ror r23
a50: 67 95 ror r22
a52: b7 95 ror r27
a54: f7 95 ror r31
a56: 9f 5f subi r25, 0xFF ; 255
a58: c9 f7 brne .-14 ; 0xa4c <__divsf3_pse+0x78>
a5a: 88 0f add r24, r24
a5c: 91 1d adc r25, r1
a5e: 96 95 lsr r25
a60: 87 95 ror r24
a62: 97 f9 bld r25, 7
a64: 08 95 ret
a66: e1 e0 ldi r30, 0x01 ; 1
a68: 66 0f add r22, r22
a6a: 77 1f adc r23, r23
a6c: 88 1f adc r24, r24
a6e: bb 1f adc r27, r27
a70: 62 17 cp r22, r18
a72: 73 07 cpc r23, r19
a74: 84 07 cpc r24, r20
a76: ba 07 cpc r27, r26
a78: 20 f0 brcs .+8 ; 0xa82 <__divsf3_pse+0xae>
a7a: 62 1b sub r22, r18
a7c: 73 0b sbc r23, r19
a7e: 84 0b sbc r24, r20
a80: ba 0b sbc r27, r26
a82: ee 1f adc r30, r30
a84: 88 f7 brcc .-30 ; 0xa68 <__divsf3_pse+0x94>
a86: e0 95 com r30
a88: 08 95 ret
00000a8a <__fixunssfsi>:
a8a: 0e 94 e1 05 call 0xbc2 ; 0xbc2 <__fp_splitA>
a8e: 88 f0 brcs .+34 ; 0xab2 <__fixunssfsi+0x28>
a90: 9f 57 subi r25, 0x7F ; 127
a92: 98 f0 brcs .+38 ; 0xaba <__fixunssfsi+0x30>
a94: b9 2f mov r27, r25
a96: 99 27 eor r25, r25
a98: b7 51 subi r27, 0x17 ; 23
a9a: b0 f0 brcs .+44 ; 0xac8 <__fixunssfsi+0x3e>
a9c: e1 f0 breq .+56 ; 0xad6 <__fixunssfsi+0x4c>
a9e: 66 0f add r22, r22
aa0: 77 1f adc r23, r23
aa2: 88 1f adc r24, r24
aa4: 99 1f adc r25, r25
aa6: 1a f0 brmi .+6 ; 0xaae <__fixunssfsi+0x24>
aa8: ba 95 dec r27
aaa: c9 f7 brne .-14 ; 0xa9e <__fixunssfsi+0x14>
aac: 14 c0 rjmp .+40 ; 0xad6 <__fixunssfsi+0x4c>
aae: b1 30 cpi r27, 0x01 ; 1
ab0: 91 f0 breq .+36 ; 0xad6 <__fixunssfsi+0x4c>
ab2: 0e 94 fb 05 call 0xbf6 ; 0xbf6 <__fp_zero>
ab6: b1 e0 ldi r27, 0x01 ; 1
ab8: 08 95 ret
aba: 0c 94 fb 05 jmp 0xbf6 ; 0xbf6 <__fp_zero>
abe: 67 2f mov r22, r23
ac0: 78 2f mov r23, r24
ac2: 88 27 eor r24, r24
ac4: b8 5f subi r27, 0xF8 ; 248
ac6: 39 f0 breq .+14 ; 0xad6 <__fixunssfsi+0x4c>
ac8: b9 3f cpi r27, 0xF9 ; 249
aca: cc f3 brlt .-14 ; 0xabe <__fixunssfsi+0x34>
acc: 86 95 lsr r24
ace: 77 95 ror r23
ad0: 67 95 ror r22
ad2: b3 95 inc r27
ad4: d9 f7 brne .-10 ; 0xacc <__fixunssfsi+0x42>
ad6: 3e f4 brtc .+14 ; 0xae6 <__fixunssfsi+0x5c>
ad8: 90 95 com r25
ada: 80 95 com r24
adc: 70 95 com r23
ade: 61 95 neg r22
ae0: 7f 4f sbci r23, 0xFF ; 255
ae2: 8f 4f sbci r24, 0xFF ; 255
ae4: 9f 4f sbci r25, 0xFF ; 255
ae6: 08 95 ret
00000ae8 <__floatunsisf>:
ae8: e8 94 clt
aea: 09 c0 rjmp .+18 ; 0xafe <__floatsisf+0x12>
00000aec <__floatsisf>:
aec: 97 fb bst r25, 7
aee: 3e f4 brtc .+14 ; 0xafe <__floatsisf+0x12>
af0: 90 95 com r25
af2: 80 95 com r24
af4: 70 95 com r23
af6: 61 95 neg r22
af8: 7f 4f sbci r23, 0xFF ; 255
afa: 8f 4f sbci r24, 0xFF ; 255
afc: 9f 4f sbci r25, 0xFF ; 255
afe: 99 23 and r25, r25
b00: a9 f0 breq .+42 ; 0xb2c <__floatsisf+0x40>
b02: f9 2f mov r31, r25
b04: 96 e9 ldi r25, 0x96 ; 150
b06: bb 27 eor r27, r27
b08: 93 95 inc r25
b0a: f6 95 lsr r31
b0c: 87 95 ror r24
b0e: 77 95 ror r23
b10: 67 95 ror r22
b12: b7 95 ror r27
b14: f1 11 cpse r31, r1
b16: f8 cf rjmp .-16 ; 0xb08 <__floatsisf+0x1c>
b18: fa f4 brpl .+62 ; 0xb58 <__floatsisf+0x6c>
b1a: bb 0f add r27, r27
b1c: 11 f4 brne .+4 ; 0xb22 <__floatsisf+0x36>
b1e: 60 ff sbrs r22, 0
b20: 1b c0 rjmp .+54 ; 0xb58 <__floatsisf+0x6c>
b22: 6f 5f subi r22, 0xFF ; 255
b24: 7f 4f sbci r23, 0xFF ; 255
b26: 8f 4f sbci r24, 0xFF ; 255
b28: 9f 4f sbci r25, 0xFF ; 255
b2a: 16 c0 rjmp .+44 ; 0xb58 <__floatsisf+0x6c>
b2c: 88 23 and r24, r24
b2e: 11 f0 breq .+4 ; 0xb34 <__floatsisf+0x48>
b30: 96 e9 ldi r25, 0x96 ; 150
b32: 11 c0 rjmp .+34 ; 0xb56 <__floatsisf+0x6a>
b34: 77 23 and r23, r23
b36: 21 f0 breq .+8 ; 0xb40 <__floatsisf+0x54>
b38: 9e e8 ldi r25, 0x8E ; 142
b3a: 87 2f mov r24, r23
b3c: 76 2f mov r23, r22
b3e: 05 c0 rjmp .+10 ; 0xb4a <__floatsisf+0x5e>
b40: 66 23 and r22, r22
b42: 71 f0 breq .+28 ; 0xb60 <__floatsisf+0x74>
b44: 96 e8 ldi r25, 0x86 ; 134
b46: 86 2f mov r24, r22
b48: 70 e0 ldi r23, 0x00 ; 0
b4a: 60 e0 ldi r22, 0x00 ; 0
b4c: 2a f0 brmi .+10 ; 0xb58 <__floatsisf+0x6c>
b4e: 9a 95 dec r25
b50: 66 0f add r22, r22
b52: 77 1f adc r23, r23
b54: 88 1f adc r24, r24
b56: da f7 brpl .-10 ; 0xb4e <__floatsisf+0x62>
b58: 88 0f add r24, r24
b5a: 96 95 lsr r25
b5c: 87 95 ror r24
b5e: 97 f9 bld r25, 7
b60: 08 95 ret
00000b62 <__fp_inf>:
b62: 97 f9 bld r25, 7
b64: 9f 67 ori r25, 0x7F ; 127
b66: 80 e8 ldi r24, 0x80 ; 128
b68: 70 e0 ldi r23, 0x00 ; 0
b6a: 60 e0 ldi r22, 0x00 ; 0
b6c: 08 95 ret
00000b6e <__fp_nan>:
b6e: 9f ef ldi r25, 0xFF ; 255
b70: 80 ec ldi r24, 0xC0 ; 192
b72: 08 95 ret
00000b74 <__fp_pscA>:
b74: 00 24 eor r0, r0
b76: 0a 94 dec r0
b78: 16 16 cp r1, r22
b7a: 17 06 cpc r1, r23
b7c: 18 06 cpc r1, r24
b7e: 09 06 cpc r0, r25
b80: 08 95 ret
00000b82 <__fp_pscB>:
b82: 00 24 eor r0, r0
b84: 0a 94 dec r0
b86: 12 16 cp r1, r18
b88: 13 06 cpc r1, r19
b8a: 14 06 cpc r1, r20
b8c: 05 06 cpc r0, r21
b8e: 08 95 ret
00000b90 <__fp_round>:
b90: 09 2e mov r0, r25
b92: 03 94 inc r0
b94: 00 0c add r0, r0
b96: 11 f4 brne .+4 ; 0xb9c <__fp_round+0xc>
b98: 88 23 and r24, r24
b9a: 52 f0 brmi .+20 ; 0xbb0 <__fp_round+0x20>
b9c: bb 0f add r27, r27
b9e: 40 f4 brcc .+16 ; 0xbb0 <__fp_round+0x20>
ba0: bf 2b or r27, r31
ba2: 11 f4 brne .+4 ; 0xba8 <__fp_round+0x18>
ba4: 60 ff sbrs r22, 0
ba6: 04 c0 rjmp .+8 ; 0xbb0 <__fp_round+0x20>
ba8: 6f 5f subi r22, 0xFF ; 255
baa: 7f 4f sbci r23, 0xFF ; 255
bac: 8f 4f sbci r24, 0xFF ; 255
bae: 9f 4f sbci r25, 0xFF ; 255
bb0: 08 95 ret
00000bb2 <__fp_split3>:
bb2: 57 fd sbrc r21, 7
bb4: 90 58 subi r25, 0x80 ; 128
bb6: 44 0f add r20, r20
bb8: 55 1f adc r21, r21
bba: 59 f0 breq .+22 ; 0xbd2 <__fp_splitA+0x10>
bbc: 5f 3f cpi r21, 0xFF ; 255
bbe: 71 f0 breq .+28 ; 0xbdc <__fp_splitA+0x1a>
bc0: 47 95 ror r20
00000bc2 <__fp_splitA>:
bc2: 88 0f add r24, r24
bc4: 97 fb bst r25, 7
bc6: 99 1f adc r25, r25
bc8: 61 f0 breq .+24 ; 0xbe2 <__fp_splitA+0x20>
bca: 9f 3f cpi r25, 0xFF ; 255
bcc: 79 f0 breq .+30 ; 0xbec <__fp_splitA+0x2a>
bce: 87 95 ror r24
bd0: 08 95 ret
bd2: 12 16 cp r1, r18
bd4: 13 06 cpc r1, r19
bd6: 14 06 cpc r1, r20
bd8: 55 1f adc r21, r21
bda: f2 cf rjmp .-28 ; 0xbc0 <__fp_split3+0xe>
bdc: 46 95 lsr r20
bde: f1 df rcall .-30 ; 0xbc2 <__fp_splitA>
be0: 08 c0 rjmp .+16 ; 0xbf2 <__fp_splitA+0x30>
be2: 16 16 cp r1, r22
be4: 17 06 cpc r1, r23
be6: 18 06 cpc r1, r24
be8: 99 1f adc r25, r25
bea: f1 cf rjmp .-30 ; 0xbce <__fp_splitA+0xc>
bec: 86 95 lsr r24
bee: 71 05 cpc r23, r1
bf0: 61 05 cpc r22, r1
bf2: 08 94 sec
bf4: 08 95 ret
00000bf6 <__fp_zero>:
bf6: e8 94 clt
00000bf8 <__fp_szero>:
bf8: bb 27 eor r27, r27
bfa: 66 27 eor r22, r22
bfc: 77 27 eor r23, r23
bfe: cb 01 movw r24, r22
c00: 97 f9 bld r25, 7
c02: 08 95 ret
00000c04 <__mulsf3>:
c04: 0e 94 15 06 call 0xc2a ; 0xc2a <__mulsf3x>
c08: 0c 94 c8 05 jmp 0xb90 ; 0xb90 <__fp_round>
c0c: 0e 94 ba 05 call 0xb74 ; 0xb74 <__fp_pscA>
c10: 38 f0 brcs .+14 ; 0xc20 <__mulsf3+0x1c>
c12: 0e 94 c1 05 call 0xb82 ; 0xb82 <__fp_pscB>
c16: 20 f0 brcs .+8 ; 0xc20 <__mulsf3+0x1c>
c18: 95 23 and r25, r21
c1a: 11 f0 breq .+4 ; 0xc20 <__mulsf3+0x1c>
c1c: 0c 94 b1 05 jmp 0xb62 ; 0xb62 <__fp_inf>
c20: 0c 94 b7 05 jmp 0xb6e ; 0xb6e <__fp_nan>
c24: 11 24 eor r1, r1
c26: 0c 94 fc 05 jmp 0xbf8 ; 0xbf8 <__fp_szero>
00000c2a <__mulsf3x>:
c2a: 0e 94 d9 05 call 0xbb2 ; 0xbb2 <__fp_split3>
c2e: 70 f3 brcs .-36 ; 0xc0c <__mulsf3+0x8>
00000c30 <__mulsf3_pse>:
c30: 95 9f mul r25, r21
c32: c1 f3 breq .-16 ; 0xc24 <__mulsf3+0x20>
c34: 95 0f add r25, r21
c36: 50 e0 ldi r21, 0x00 ; 0
c38: 55 1f adc r21, r21
c3a: 62 9f mul r22, r18
c3c: f0 01 movw r30, r0
c3e: 72 9f mul r23, r18
c40: bb 27 eor r27, r27
c42: f0 0d add r31, r0
c44: b1 1d adc r27, r1
c46: 63 9f mul r22, r19
c48: aa 27 eor r26, r26
c4a: f0 0d add r31, r0
c4c: b1 1d adc r27, r1
c4e: aa 1f adc r26, r26
c50: 64 9f mul r22, r20
c52: 66 27 eor r22, r22
c54: b0 0d add r27, r0
c56: a1 1d adc r26, r1
c58: 66 1f adc r22, r22
c5a: 82 9f mul r24, r18
c5c: 22 27 eor r18, r18
c5e: b0 0d add r27, r0
c60: a1 1d adc r26, r1
c62: 62 1f adc r22, r18
c64: 73 9f mul r23, r19
c66: b0 0d add r27, r0
c68: a1 1d adc r26, r1
c6a: 62 1f adc r22, r18
c6c: 83 9f mul r24, r19
c6e: a0 0d add r26, r0
c70: 61 1d adc r22, r1
c72: 22 1f adc r18, r18
c74: 74 9f mul r23, r20
c76: 33 27 eor r19, r19
c78: a0 0d add r26, r0
c7a: 61 1d adc r22, r1
c7c: 23 1f adc r18, r19
c7e: 84 9f mul r24, r20
c80: 60 0d add r22, r0
c82: 21 1d adc r18, r1
c84: 82 2f mov r24, r18
c86: 76 2f mov r23, r22
c88: 6a 2f mov r22, r26
c8a: 11 24 eor r1, r1
c8c: 9f 57 subi r25, 0x7F ; 127
c8e: 50 40 sbci r21, 0x00 ; 0
c90: 9a f0 brmi .+38 ; 0xcb8 <__mulsf3_pse+0x88>
c92: f1 f0 breq .+60 ; 0xcd0 <__mulsf3_pse+0xa0>
c94: 88 23 and r24, r24
c96: 4a f0 brmi .+18 ; 0xcaa <__mulsf3_pse+0x7a>
c98: ee 0f add r30, r30
c9a: ff 1f adc r31, r31
c9c: bb 1f adc r27, r27
c9e: 66 1f adc r22, r22
ca0: 77 1f adc r23, r23
ca2: 88 1f adc r24, r24
ca4: 91 50 subi r25, 0x01 ; 1
ca6: 50 40 sbci r21, 0x00 ; 0
ca8: a9 f7 brne .-22 ; 0xc94 <__mulsf3_pse+0x64>
caa: 9e 3f cpi r25, 0xFE ; 254
cac: 51 05 cpc r21, r1
cae: 80 f0 brcs .+32 ; 0xcd0 <__mulsf3_pse+0xa0>
cb0: 0c 94 b1 05 jmp 0xb62 ; 0xb62 <__fp_inf>
cb4: 0c 94 fc 05 jmp 0xbf8 ; 0xbf8 <__fp_szero>
cb8: 5f 3f cpi r21, 0xFF ; 255
cba: e4 f3 brlt .-8 ; 0xcb4 <__mulsf3_pse+0x84>
cbc: 98 3e cpi r25, 0xE8 ; 232
cbe: d4 f3 brlt .-12 ; 0xcb4 <__mulsf3_pse+0x84>
cc0: 86 95 lsr r24
cc2: 77 95 ror r23
cc4: 67 95 ror r22
cc6: b7 95 ror r27
cc8: f7 95 ror r31
cca: e7 95 ror r30
ccc: 9f 5f subi r25, 0xFF ; 255
cce: c1 f7 brne .-16 ; 0xcc0 <__mulsf3_pse+0x90>
cd0: fe 2b or r31, r30
cd2: 88 0f add r24, r24
cd4: 91 1d adc r25, r1
cd6: 96 95 lsr r25
cd8: 87 95 ror r24
cda: 97 f9 bld r25, 7
cdc: 08 95 ret
00000cde <__divmodhi4>:
cde: 97 fb bst r25, 7
ce0: 07 2e mov r0, r23
ce2: 16 f4 brtc .+4 ; 0xce8 <__divmodhi4+0xa>
ce4: 00 94 com r0
ce6: 07 d0 rcall .+14 ; 0xcf6 <__divmodhi4_neg1>
ce8: 77 fd sbrc r23, 7
cea: 09 d0 rcall .+18 ; 0xcfe <__divmodhi4_neg2>
cec: 0e 94 89 06 call 0xd12 ; 0xd12 <__udivmodhi4>
cf0: 07 fc sbrc r0, 7
cf2: 05 d0 rcall .+10 ; 0xcfe <__divmodhi4_neg2>
cf4: 3e f4 brtc .+14 ; 0xd04 <__divmodhi4_exit>
00000cf6 <__divmodhi4_neg1>:
cf6: 90 95 com r25
cf8: 81 95 neg r24
cfa: 9f 4f sbci r25, 0xFF ; 255
cfc: 08 95 ret
00000cfe <__divmodhi4_neg2>:
cfe: 70 95 com r23
d00: 61 95 neg r22
d02: 7f 4f sbci r23, 0xFF ; 255
00000d04 <__divmodhi4_exit>:
d04: 08 95 ret
00000d06 <__tablejump2__>:
d06: ee 0f add r30, r30
d08: ff 1f adc r31, r31
d0a: 05 90 lpm r0, Z+
d0c: f4 91 lpm r31, Z
d0e: e0 2d mov r30, r0
d10: 09 94 ijmp
00000d12 <__udivmodhi4>:
d12: aa 1b sub r26, r26
d14: bb 1b sub r27, r27
d16: 51 e1 ldi r21, 0x11 ; 17
d18: 07 c0 rjmp .+14 ; 0xd28 <__udivmodhi4_ep>
00000d1a <__udivmodhi4_loop>:
d1a: aa 1f adc r26, r26
d1c: bb 1f adc r27, r27
d1e: a6 17 cp r26, r22
d20: b7 07 cpc r27, r23
d22: 10 f0 brcs .+4 ; 0xd28 <__udivmodhi4_ep>
d24: a6 1b sub r26, r22
d26: b7 0b sbc r27, r23
00000d28 <__udivmodhi4_ep>:
d28: 88 1f adc r24, r24
d2a: 99 1f adc r25, r25
d2c: 5a 95 dec r21
d2e: a9 f7 brne .-22 ; 0xd1a <__udivmodhi4_loop>
d30: 80 95 com r24
d32: 90 95 com r25
d34: bc 01 movw r22, r24
d36: cd 01 movw r24, r26
d38: 08 95 ret
00000d3a <_exit>:
d3a: f8 94 cli
00000d3c <__stop_program>:
d3c: ff cf rjmp .-2 ; 0xd3c <__stop_program>