ledcube.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn 0 .text 0000112e 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000004 00800060 0000112e 000011c2 2**0 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000088 00800064 00800064 000011c6 2**0 ALLOC 3 .stab 00004284 00000000 00000000 000011c8 2**2 CONTENTS, READONLY, DEBUGGING 4 .stabstr 00001cbd 00000000 00000000 0000544c 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: 0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end> 2: 2c c0 rjmp .+88 ; 0x5c <__bad_interrupt> 4: 2b c0 rjmp .+86 ; 0x5c <__bad_interrupt> 6: 70 c0 rjmp .+224 ; 0xe8 <__vector_3> 8: 29 c0 rjmp .+82 ; 0x5c <__bad_interrupt> a: 28 c0 rjmp .+80 ; 0x5c <__bad_interrupt> c: 27 c0 rjmp .+78 ; 0x5c <__bad_interrupt> e: 26 c0 rjmp .+76 ; 0x5c <__bad_interrupt> 10: 25 c0 rjmp .+74 ; 0x5c <__bad_interrupt> 12: 25 c0 rjmp .+74 ; 0x5e <__vector_9> 14: 23 c0 rjmp .+70 ; 0x5c <__bad_interrupt> 16: 22 c0 rjmp .+68 ; 0x5c <__bad_interrupt> 18: 21 c0 rjmp .+66 ; 0x5c <__bad_interrupt> 1a: 20 c0 rjmp .+64 ; 0x5c <__bad_interrupt> 1c: 1f c0 rjmp .+62 ; 0x5c <__bad_interrupt> 1e: 1e c0 rjmp .+60 ; 0x5c <__bad_interrupt> 20: 1d c0 rjmp .+58 ; 0x5c <__bad_interrupt> 22: 1c c0 rjmp .+56 ; 0x5c <__bad_interrupt> 24: 1b c0 rjmp .+54 ; 0x5c <__bad_interrupt> 00000026 <__ctors_end>: 26: 11 24 eor r1, r1 28: 1f be out 0x3f, r1 ; 63 2a: cf e5 ldi r28, 0x5F ; 95 2c: d4 e0 ldi r29, 0x04 ; 4 2e: de bf out 0x3e, r29 ; 62 30: cd bf out 0x3d, r28 ; 61 00000032 <__do_clear_bss>: 32: 10 e0 ldi r17, 0x00 ; 0 34: a4 e6 ldi r26, 0x64 ; 100 36: b0 e0 ldi r27, 0x00 ; 0 38: 01 c0 rjmp .+2 ; 0x3c <.do_clear_bss_start> 0000003a <.do_clear_bss_loop>: 3a: 1d 92 st X+, r1 0000003c <.do_clear_bss_start>: 3c: ac 3e cpi r26, 0xEC ; 236 3e: b1 07 cpc r27, r17 40: e1 f7 brne .-8 ; 0x3a <.do_clear_bss_loop> 00000042 <__do_copy_data>: 42: 10 e0 ldi r17, 0x00 ; 0 44: a0 e6 ldi r26, 0x60 ; 96 46: b0 e0 ldi r27, 0x00 ; 0 48: ee e2 ldi r30, 0x2E ; 46 4a: f1 e1 ldi r31, 0x11 ; 17 4c: 02 c0 rjmp .+4 ; 0x52 <.do_copy_data_start> 0000004e <.do_copy_data_loop>: 4e: 05 90 lpm r0, Z+ 50: 0d 92 st X+, r0 00000052 <.do_copy_data_start>: 52: a4 36 cpi r26, 0x64 ; 100 54: b1 07 cpc r27, r17 56: d9 f7 brne .-10 ; 0x4e <.do_copy_data_loop> 58: d9 d0 rcall .+434 ; 0x20c
5a: 67 c8 rjmp .-3890 ; 0xfffff12a <__eeprom_end+0xff7ef12a> 0000005c <__bad_interrupt>: 5c: d1 cf rjmp .-94 ; 0x0 <__vectors> 0000005e <__vector_9>: //volatile uint32_t timer0_overflow_count = 0; volatile uint32_t timer0_millis = 0; //static uint8_t timer0_fract = 0; ISR(TIMER0_OVF_vect) 5e: 1f 92 push r1 60: 0f 92 push r0 62: 0f b6 in r0, 0x3f ; 63 64: 0f 92 push r0 66: 11 24 eor r1, r1 68: ef 92 push r14 6a: ff 92 push r15 6c: 0f 93 push r16 6e: 1f 93 push r17 70: 2f 93 push r18 72: 3f 93 push r19 74: 4f 93 push r20 76: 5f 93 push r21 78: 8f 93 push r24 7a: 9f 93 push r25 { // copy these to local variables so they can be stored in registers // (volatile variables must be read from memory on every access) uint32_t m = timer0_millis; 7c: e0 90 e5 00 lds r14, 0x00E5 80: f0 90 e6 00 lds r15, 0x00E6 84: 00 91 e7 00 lds r16, 0x00E7 88: 10 91 e8 00 lds r17, 0x00E8 //uint8_t f = timer0_fract; static uint8_t timer0_fract = 0; m += MILLIS_INC; 8c: a8 01 movw r20, r16 8e: 97 01 movw r18, r14 90: 2e 5f subi r18, 0xFE ; 254 92: 3f 4f sbci r19, 0xFF ; 255 94: 4f 4f sbci r20, 0xFF ; 255 96: 5f 4f sbci r21, 0xFF ; 255 //f += FRACT_INC; timer0_fract += FRACT_INC; 98: 90 91 eb 00 lds r25, 0x00EB 9c: 89 2f mov r24, r25 9e: 8a 5f subi r24, 0xFA ; 250 a0: 80 93 eb 00 sts 0x00EB, r24 //if (f >= FRACT_MAX) { if (timer0_fract >= FRACT_MAX) { a4: 8d 37 cpi r24, 0x7D ; 125 a6: 48 f0 brcs .+18 ; 0xba <__vector_9+0x5c> //f -= FRACT_MAX; timer0_fract -= FRACT_MAX; a8: 97 57 subi r25, 0x77 ; 119 aa: 90 93 eb 00 sts 0x00EB, r25 ++m; ae: a8 01 movw r20, r16 b0: 97 01 movw r18, r14 b2: 2d 5f subi r18, 0xFD ; 253 b4: 3f 4f sbci r19, 0xFF ; 255 b6: 4f 4f sbci r20, 0xFF ; 255 b8: 5f 4f sbci r21, 0xFF ; 255 } //timer0_fract = f; timer0_millis = m; ba: 20 93 e5 00 sts 0x00E5, r18 be: 30 93 e6 00 sts 0x00E6, r19 c2: 40 93 e7 00 sts 0x00E7, r20 c6: 50 93 e8 00 sts 0x00E8, r21 //if (timer0_overflow_count & 0x1) //if (m - last_time >= 5) { //debounce_keys(); // called nearly each 2ms (0,002048s) //last_time = m; //} } ca: 9f 91 pop r25 cc: 8f 91 pop r24 ce: 5f 91 pop r21 d0: 4f 91 pop r20 d2: 3f 91 pop r19 d4: 2f 91 pop r18 d6: 1f 91 pop r17 d8: 0f 91 pop r16 da: ff 90 pop r15 dc: ef 90 pop r14 de: 0f 90 pop r0 e0: 0f be out 0x3f, r0 ; 63 e2: 0f 90 pop r0 e4: 1f 90 pop r1 e6: 18 95 reti 000000e8 <__vector_3>: // current_layer = current_layer_ & 0x07; // // PORTC |= 0x28; // layer and latch high //} ISR(TIMER2_COMP_vect) e8: 1f 92 push r1 ea: 0f 92 push r0 ec: 0f b6 in r0, 0x3f ; 63 ee: 0f 92 push r0 f0: 11 24 eor r1, r1 f2: 2f 93 push r18 f4: 3f 93 push r19 f6: 4f 93 push r20 f8: 5f 93 push r21 fa: 6f 93 push r22 fc: 8f 93 push r24 fe: 9f 93 push r25 100: af 93 push r26 102: bf 93 push r27 104: ef 93 push r30 106: ff 93 push r31 { //if (!in_wait) return; PORTC &= ~0x28; // layer and latch low 108: 85 b3 in r24, 0x15 ; 21 10a: 87 7d andi r24, 0xD7 ; 215 10c: 85 bb out 0x15, r24 ; 21 unsigned char current_layer_ = current_layer; 10e: 60 91 e9 00 lds r22, 0x00E9 112: 57 e0 ldi r21, 0x07 ; 7 for (unsigned char j = 7; j < 255; --j) { //for (char j = 0; j < 4; ++j) { unsigned char val = cube[j][current_layer_]; 114: a6 2f mov r26, r22 116: b0 e0 ldi r27, 0x00 ; 0 118: e5 2f mov r30, r21 11a: f0 e0 ldi r31, 0x00 ; 0 11c: 33 e0 ldi r19, 0x03 ; 3 11e: ee 0f add r30, r30 120: ff 1f adc r31, r31 122: 3a 95 dec r19 124: e1 f7 brne .-8 ; 0x11e <__vector_3+0x36> 126: ea 0f add r30, r26 128: fb 1f adc r31, r27 12a: ec 59 subi r30, 0x9C ; 156 12c: ff 4f sbci r31, 0xFF ; 255 12e: 40 81 ld r20, Z PORTC &= ~0x10; 130: ac 98 cbi 0x15, 4 ; 21 PORTB = (PORTB & ~0x01) | ((val ) & 0x01); 132: 88 b3 in r24, 0x18 ; 24 134: 94 2f mov r25, r20 136: 91 70 andi r25, 0x01 ; 1 138: 8e 7f andi r24, 0xFE ; 254 13a: 98 2b or r25, r24 13c: 98 bb out 0x18, r25 ; 24 PORTC |= 0x10; 13e: ac 9a sbi 0x15, 4 ; 21 PORTC &= ~0x10; 140: ac 98 cbi 0x15, 4 ; 21 PORTB = (PORTB & ~0x01) | ((val >> 1) & 0x01); 142: 38 b3 in r19, 0x18 ; 24 144: 84 2f mov r24, r20 146: 90 e0 ldi r25, 0x00 ; 0 148: 95 95 asr r25 14a: 87 95 ror r24 14c: 28 2f mov r18, r24 14e: 21 70 andi r18, 0x01 ; 1 150: 3e 7f andi r19, 0xFE ; 254 152: 23 2b or r18, r19 154: 28 bb out 0x18, r18 ; 24 PORTC |= 0x10; 156: ac 9a sbi 0x15, 4 ; 21 PORTC &= ~0x10; 158: ac 98 cbi 0x15, 4 ; 21 PORTB = (PORTB & ~0x01) | ((val >> 2) & 0x01); 15a: 38 b3 in r19, 0x18 ; 24 15c: 95 95 asr r25 15e: 87 95 ror r24 160: 28 2f mov r18, r24 162: 21 70 andi r18, 0x01 ; 1 164: 3e 7f andi r19, 0xFE ; 254 166: 23 2b or r18, r19 168: 28 bb out 0x18, r18 ; 24 PORTC |= 0x10; 16a: ac 9a sbi 0x15, 4 ; 21 PORTC &= ~0x10; 16c: ac 98 cbi 0x15, 4 ; 21 PORTB = (PORTB & ~0x01) | ((val >> 3) & 0x01); 16e: 38 b3 in r19, 0x18 ; 24 170: 95 95 asr r25 172: 87 95 ror r24 174: 28 2f mov r18, r24 176: 21 70 andi r18, 0x01 ; 1 178: 3e 7f andi r19, 0xFE ; 254 17a: 23 2b or r18, r19 17c: 28 bb out 0x18, r18 ; 24 PORTC |= 0x10; 17e: ac 9a sbi 0x15, 4 ; 21 PORTC &= ~0x10; 180: ac 98 cbi 0x15, 4 ; 21 PORTB = (PORTB & ~0x01) | ((val >> 4) & 0x01); 182: 38 b3 in r19, 0x18 ; 24 184: 95 95 asr r25 186: 87 95 ror r24 188: 28 2f mov r18, r24 18a: 21 70 andi r18, 0x01 ; 1 18c: 3e 7f andi r19, 0xFE ; 254 18e: 23 2b or r18, r19 190: 28 bb out 0x18, r18 ; 24 PORTC |= 0x10; 192: ac 9a sbi 0x15, 4 ; 21 PORTC &= ~0x10; 194: ac 98 cbi 0x15, 4 ; 21 PORTB = (PORTB & ~0x01) | ((val >> 5) & 0x01); 196: 38 b3 in r19, 0x18 ; 24 198: 95 95 asr r25 19a: 87 95 ror r24 19c: 28 2f mov r18, r24 19e: 21 70 andi r18, 0x01 ; 1 1a0: 3e 7f andi r19, 0xFE ; 254 1a2: 23 2b or r18, r19 1a4: 28 bb out 0x18, r18 ; 24 PORTC |= 0x10; 1a6: ac 9a sbi 0x15, 4 ; 21 PORTC &= ~0x10; 1a8: ac 98 cbi 0x15, 4 ; 21 PORTB = (PORTB & ~0x01) | ((val >> 6) & 0x01); 1aa: 28 b3 in r18, 0x18 ; 24 1ac: 95 95 asr r25 1ae: 87 95 ror r24 1b0: 81 70 andi r24, 0x01 ; 1 1b2: 2e 7f andi r18, 0xFE ; 254 1b4: 82 2b or r24, r18 1b6: 88 bb out 0x18, r24 ; 24 PORTC |= 0x10; 1b8: ac 9a sbi 0x15, 4 ; 21 PORTC &= ~0x10; 1ba: ac 98 cbi 0x15, 4 ; 21 PORTB = (PORTB & ~0x01) | ((val >> 7) & 0x01); 1bc: 88 b3 in r24, 0x18 ; 24 1be: 44 1f adc r20, r20 1c0: 44 27 eor r20, r20 1c2: 44 1f adc r20, r20 1c4: 8e 7f andi r24, 0xFE ; 254 1c6: 48 2b or r20, r24 1c8: 48 bb out 0x18, r20 ; 24 //PORTD = val; PORTC |= 0x10; 1ca: ac 9a sbi 0x15, 4 ; 21 { //if (!in_wait) return; PORTC &= ~0x28; // layer and latch low unsigned char current_layer_ = current_layer; for (unsigned char j = 7; j < 255; --j) { 1cc: 51 50 subi r21, 0x01 ; 1 1ce: 08 f0 brcs .+2 ; 0x1d2 <__vector_3+0xea> 1d0: a3 cf rjmp .-186 ; 0x118 <__vector_3+0x30> PORTB = (PORTB & ~0x01) | ((val >> 7) & 0x01); //PORTD = val; PORTC |= 0x10; } PORTC = (PORTC & ~0x07) | current_layer_ | 0x28; 1d2: 85 b3 in r24, 0x15 ; 21 1d4: 96 2f mov r25, r22 1d6: 98 62 ori r25, 0x28 ; 40 1d8: 88 7f andi r24, 0xF8 ; 248 1da: 98 2b or r25, r24 1dc: 95 bb out 0x15, r25 ; 21 ++current_layer_; 1de: 96 2f mov r25, r22 1e0: 9f 5f subi r25, 0xFF ; 255 if (current_layer_ > 7) current_layer_ = 0; 1e2: 98 30 cpi r25, 0x08 ; 8 1e4: 08 f0 brcs .+2 ; 0x1e8 <__vector_3+0x100> 1e6: 90 e0 ldi r25, 0x00 ; 0 //current_layer = current_layer_ & 0x07; current_layer = current_layer_; 1e8: 90 93 e9 00 sts 0x00E9, r25 //PORTC |= 0x28; // layer and latch high } 1ec: ff 91 pop r31 1ee: ef 91 pop r30 1f0: bf 91 pop r27 1f2: af 91 pop r26 1f4: 9f 91 pop r25 1f6: 8f 91 pop r24 1f8: 6f 91 pop r22 1fa: 5f 91 pop r21 1fc: 4f 91 pop r20 1fe: 3f 91 pop r19 200: 2f 91 pop r18 202: 0f 90 pop r0 204: 0f be out 0x3f, r0 ; 63 206: 0f 90 pop r0 208: 1f 90 pop r1 20a: 18 95 reti 0000020c
: *****************************************************************************/ #include "main.h" #include "effect.h" #include "draw.h" int main() 20c: ef 92 push r14 20e: ff 92 push r15 210: 0f 93 push r16 212: 1f 93 push r17 * Initialisation * ======================================================================= */ //*** init time management TCNT0 = 0; // init timer count to 0 214: 12 be out 0x32, r1 ; 50 TCCR0 |= 0x03; // prescaler: 64 216: 83 b7 in r24, 0x33 ; 51 218: 83 60 ori r24, 0x03 ; 3 21a: 83 bf out 0x33, r24 ; 51 TIMSK |= 0x01; // enable timer 0 overflow interrupt 21c: 89 b7 in r24, 0x39 ; 57 21e: 81 60 ori r24, 0x01 ; 1 220: 89 bf out 0x39, r24 ; 57 // Timer 2 // Frame buffer interrupt // 14745600/128/11 = 10472.72 interrupts per second // 10472.72/8 = 1309 frames per second OCR2 = 11; // interrupt at counter = 10 222: 8b e0 ldi r24, 0x0B ; 11 224: 83 bd out 0x23, r24 ; 35 TCCR2 |= (1 << CS20) | (0 << CS21) | (1 << CS22); // Prescaler = 128. 226: 85 b5 in r24, 0x25 ; 37 228: 85 60 ori r24, 0x05 ; 5 22a: 85 bd out 0x25, r24 ; 37 TCCR2 |= (1 << WGM21); // CTC mode. Reset counter when OCR2 is reached. 22c: 85 b5 in r24, 0x25 ; 37 22e: 88 60 ori r24, 0x08 ; 8 230: 85 bd out 0x25, r24 ; 37 TCNT2 = 0x00; // initial counter value = 0; 232: 14 bc out 0x24, r1 ; 36 TIMSK |= (1 << OCIE2); // Enable CTC interrupt 234: 89 b7 in r24, 0x39 ; 57 236: 80 68 ori r24, 0x80 ; 128 238: 89 bf out 0x39, r24 ; 57 PORTD = 0; 23a: 12 ba out 0x12, r1 ; 18 PORTB = 0; 23c: 18 ba out 0x18, r1 ; 24 PORTC = 0; 23e: 15 ba out 0x15, r1 ; 21 DDRD = 0xff; 240: 8f ef ldi r24, 0xFF ; 255 242: 81 bb out 0x11, r24 ; 17 DDRB = 0xff; 244: 87 bb out 0x17, r24 ; 23 DDRC = 0xff; 246: 84 bb out 0x14, r24 ; 20 //*** set interupts sei(); 248: 78 94 sei 24a: 20 e0 ldi r18, 0x00 ; 0 return timer0_millis; } void delay(uint32_t ms) { in_wait = true; 24c: ee 24 eor r14, r14 24e: e3 94 inc r14 //clear_led(); //delay_ms(1000); for (unsigned char z = 0; z < 8; ++z) { for (unsigned char y = 0; y < 8; ++y) { cube[y][z] = 0xFF; 250: ff 24 eor r15, r15 252: fa 94 dec r15 254: 14 c0 rjmp .+40 ; 0x27e DDRD = 0xff; DDRB = 0xff; DDRC = 0xff; //*** set interupts sei(); 256: 80 e0 ldi r24, 0x00 ; 0 258: 90 e0 ldi r25, 0x00 ; 0 //clear_led(); //delay_ms(1000); for (unsigned char z = 0; z < 8; ++z) { for (unsigned char y = 0; y < 8; ++y) { cube[y][z] = 0xFF; 25a: 42 2f mov r20, r18 25c: 50 e0 ldi r21, 0x00 ; 0 25e: fc 01 movw r30, r24 260: 63 e0 ldi r22, 0x03 ; 3 262: ee 0f add r30, r30 264: ff 1f adc r31, r31 266: 6a 95 dec r22 268: e1 f7 brne .-8 ; 0x262 26a: e4 0f add r30, r20 26c: f5 1f adc r31, r21 26e: ec 59 subi r30, 0x9C ; 156 270: ff 4f sbci r31, 0xFF ; 255 272: f0 82 st Z, r15 274: 01 96 adiw r24, 0x01 ; 1 for (;;) { //clear_led(); //delay_ms(1000); for (unsigned char z = 0; z < 8; ++z) { for (unsigned char y = 0; y < 8; ++y) { 276: 88 30 cpi r24, 0x08 ; 8 278: 91 05 cpc r25, r1 27a: 89 f7 brne .-30 ; 0x25e for (;;) { //clear_led(); //delay_ms(1000); for (unsigned char z = 0; z < 8; ++z) { 27c: 2f 5f subi r18, 0xFF ; 255 27e: 28 30 cpi r18, 0x08 ; 8 280: 50 f3 brcs .-44 ; 0x256 return timer0_millis; } void delay(uint32_t ms) { in_wait = true; 282: e0 92 a4 00 sts 0x00A4, r14 } */ inline uint32_t millis() { return timer0_millis; 286: 20 91 e5 00 lds r18, 0x00E5 28a: 30 91 e6 00 lds r19, 0x00E6 28e: 40 91 e7 00 lds r20, 0x00E7 292: 50 91 e8 00 lds r21, 0x00E8 296: 80 91 e5 00 lds r24, 0x00E5 29a: 90 91 e6 00 lds r25, 0x00E6 29e: a0 91 e7 00 lds r26, 0x00E7 2a2: b0 91 e8 00 lds r27, 0x00E8 void delay(uint32_t ms) { in_wait = true; uint32_t time1 = millis(); while ((millis()) - time1 < ms); 2a6: 82 1b sub r24, r18 2a8: 93 0b sbc r25, r19 2aa: a4 0b sbc r26, r20 2ac: b5 0b sbc r27, r21 2ae: 88 5e subi r24, 0xE8 ; 232 2b0: 93 40 sbci r25, 0x03 ; 3 2b2: a0 40 sbci r26, 0x00 ; 0 2b4: b0 40 sbci r27, 0x00 ; 0 2b6: 78 f3 brcs .-34 ; 0x296 in_wait = false; 2b8: 10 92 a4 00 sts 0x00A4, r1 delay(1000); // Show the effects in a predefined order //for (char i=0; i effect_rain(100); 2ca: 84 e6 ldi r24, 0x64 ; 100 2cc: 90 e0 ldi r25, 0x00 ; 0 2ce: 84 d2 rcall .+1288 ; 0x7d8 <_Z11effect_raini> effect_random_filler(5,1); 2d0: 85 e0 ldi r24, 0x05 ; 5 2d2: 90 e0 ldi r25, 0x00 ; 0 2d4: 61 e0 ldi r22, 0x01 ; 1 2d6: 70 e0 ldi r23, 0x00 ; 0 2d8: f7 d4 rcall .+2542 ; 0xcc8 <_Z20effect_random_fillerii> effect_z_updown(20,1000); 2da: 84 e1 ldi r24, 0x14 ; 20 2dc: 90 e0 ldi r25, 0x00 ; 0 2de: 68 ee ldi r22, 0xE8 ; 232 2e0: 73 e0 ldi r23, 0x03 ; 3 2e2: 47 d4 rcall .+2190 ; 0xb72 <_Z15effect_z_updownii> effect_wormsqueeze (2, AXIS_Z, -1, 100, 1000); 2e4: 82 e0 ldi r24, 0x02 ; 2 2e6: 90 e0 ldi r25, 0x00 ; 0 2e8: 6a e7 ldi r22, 0x7A ; 122 2ea: 70 e0 ldi r23, 0x00 ; 0 2ec: 4f ef ldi r20, 0xFF ; 255 2ee: 5f ef ldi r21, 0xFF ; 255 2f0: 24 e6 ldi r18, 0x64 ; 100 2f2: 30 e0 ldi r19, 0x00 ; 0 2f4: 08 ee ldi r16, 0xE8 ; 232 2f6: 13 e0 ldi r17, 0x03 ; 3 2f8: 9c d1 rcall .+824 ; 0x632 <_Z18effect_wormsqueezeiiiii> effect_blinky2(); 2fa: b1 d5 rcall .+2914 ; 0xe5e <_Z14effect_blinky2v> 2fc: 10 e0 ldi r17, 0x00 ; 0 // Comment the two lines above and uncomment this // if you want the effects in a random order. //launch_effect(rand()%EFFECTS_TOTAL); for (char i = 0; i < 10; ++i) { effect_boxside_randsend_parallel (AXIS_X, 0, 150, 1); 2fe: 88 e7 ldi r24, 0x78 ; 120 300: 60 e0 ldi r22, 0x00 ; 0 302: 70 e0 ldi r23, 0x00 ; 0 304: 46 e9 ldi r20, 0x96 ; 150 306: 50 e0 ldi r21, 0x00 ; 0 308: 21 e0 ldi r18, 0x01 ; 1 30a: 30 e0 ldi r19, 0x00 ; 0 30c: 5e d3 rcall .+1724 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> effect_boxside_randsend_parallel (AXIS_X, 1, 150, 1); 30e: 88 e7 ldi r24, 0x78 ; 120 310: 61 e0 ldi r22, 0x01 ; 1 312: 70 e0 ldi r23, 0x00 ; 0 314: 46 e9 ldi r20, 0x96 ; 150 316: 50 e0 ldi r21, 0x00 ; 0 318: 21 e0 ldi r18, 0x01 ; 1 31a: 30 e0 ldi r19, 0x00 ; 0 31c: 56 d3 rcall .+1708 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> effect_boxside_randsend_parallel (AXIS_Y, 0, 150, 1); 31e: 89 e7 ldi r24, 0x79 ; 121 320: 60 e0 ldi r22, 0x00 ; 0 322: 70 e0 ldi r23, 0x00 ; 0 324: 46 e9 ldi r20, 0x96 ; 150 326: 50 e0 ldi r21, 0x00 ; 0 328: 21 e0 ldi r18, 0x01 ; 1 32a: 30 e0 ldi r19, 0x00 ; 0 32c: 4e d3 rcall .+1692 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> effect_boxside_randsend_parallel (AXIS_Y, 1, 150, 1); 32e: 89 e7 ldi r24, 0x79 ; 121 330: 61 e0 ldi r22, 0x01 ; 1 332: 70 e0 ldi r23, 0x00 ; 0 334: 46 e9 ldi r20, 0x96 ; 150 336: 50 e0 ldi r21, 0x00 ; 0 338: 21 e0 ldi r18, 0x01 ; 1 33a: 30 e0 ldi r19, 0x00 ; 0 33c: 46 d3 rcall .+1676 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> effect_boxside_randsend_parallel (AXIS_Z, 0, 150, 1); 33e: 8a e7 ldi r24, 0x7A ; 122 340: 60 e0 ldi r22, 0x00 ; 0 342: 70 e0 ldi r23, 0x00 ; 0 344: 46 e9 ldi r20, 0x96 ; 150 346: 50 e0 ldi r21, 0x00 ; 0 348: 21 e0 ldi r18, 0x01 ; 1 34a: 30 e0 ldi r19, 0x00 ; 0 34c: 3e d3 rcall .+1660 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> effect_boxside_randsend_parallel (AXIS_Z, 1, 150, 1); 34e: 8a e7 ldi r24, 0x7A ; 122 350: 61 e0 ldi r22, 0x01 ; 1 352: 70 e0 ldi r23, 0x00 ; 0 354: 46 e9 ldi r20, 0x96 ; 150 356: 50 e0 ldi r21, 0x00 ; 0 358: 21 e0 ldi r18, 0x01 ; 1 35a: 30 e0 ldi r19, 0x00 ; 0 35c: 36 d3 rcall .+1644 ; 0x9ca <_Z32effect_boxside_randsend_parallelciii> // Show the effects in a random order. // Comment the two lines above and uncomment this // if you want the effects in a random order. //launch_effect(rand()%EFFECTS_TOTAL); for (char i = 0; i < 10; ++i) { 35e: 1f 5f subi r17, 0xFF ; 255 360: 1a 30 cpi r17, 0x0A ; 10 362: 69 f6 brne .-102 ; 0x2fe 364: 20 e0 ldi r18, 0x00 ; 0 366: 77 cf rjmp .-274 ; 0x256 00000368 <_Z6myrandv>: // static short rand = 0; // rand=(rand*109+89)%251; // return rand; //} int myrand() { return rand(); } 368: 75 d6 rcall .+3306 ; 0x1054 36a: 08 95 ret 0000036c <_Z7inrangeiii>: } // This function validates that we are drawing inside the cube. unsigned char inrange(int x, int y, int z) { if (x >= 0 && x < CUBE_SIZE && y >= 0 && y < CUBE_SIZE && z >= 0 && z < CUBE_SIZE) 36c: 08 97 sbiw r24, 0x08 ; 8 36e: 78 f4 brcc .+30 ; 0x38e <_Z7inrangeiii+0x22> 370: 77 fd sbrc r23, 7 372: 0d c0 rjmp .+26 ; 0x38e <_Z7inrangeiii+0x22> 374: 68 30 cpi r22, 0x08 ; 8 376: 71 05 cpc r23, r1 378: 54 f4 brge .+20 ; 0x38e <_Z7inrangeiii+0x22> 37a: 57 fd sbrc r21, 7 37c: 08 c0 rjmp .+16 ; 0x38e <_Z7inrangeiii+0x22> 37e: 90 e0 ldi r25, 0x00 ; 0 380: 48 30 cpi r20, 0x08 ; 8 382: 51 05 cpc r21, r1 384: 0c f0 brlt .+2 ; 0x388 <_Z7inrangeiii+0x1c> 386: 91 e0 ldi r25, 0x01 ; 1 388: 81 e0 ldi r24, 0x01 ; 1 38a: 98 27 eor r25, r24 38c: 01 c0 rjmp .+2 ; 0x390 <_Z7inrangeiii+0x24> 38e: 90 e0 ldi r25, 0x00 ; 0 } else { // One of the coordinates was outside the cube. return 0; } } 390: 89 2f mov r24, r25 392: 08 95 ret 00000394 <_Z8clrvoxeliii>: if (inrange(x,y,z)) fb[z][y] |= (1 << x); } // Set a single voxel to OFF void clrvoxel(int x, int y, int z) 394: ff 92 push r15 396: 0f 93 push r16 398: 1f 93 push r17 39a: cf 93 push r28 39c: df 93 push r29 39e: f8 2e mov r15, r24 3a0: 8b 01 movw r16, r22 3a2: ea 01 movw r28, r20 { if (inrange(x,y,z)) 3a4: e3 df rcall .-58 ; 0x36c <_Z7inrangeiii> 3a6: 88 23 and r24, r24 3a8: a9 f0 breq .+42 ; 0x3d4 <_Z8clrvoxeliii+0x40> cube[z][y] &= ~(1 << x); 3aa: fe 01 movw r30, r28 3ac: 93 e0 ldi r25, 0x03 ; 3 3ae: ee 0f add r30, r30 3b0: ff 1f adc r31, r31 3b2: 9a 95 dec r25 3b4: e1 f7 brne .-8 ; 0x3ae <_Z8clrvoxeliii+0x1a> 3b6: e0 0f add r30, r16 3b8: f1 1f adc r31, r17 3ba: ec 59 subi r30, 0x9C ; 156 3bc: ff 4f sbci r31, 0xFF ; 255 3be: 20 81 ld r18, Z 3c0: 81 e0 ldi r24, 0x01 ; 1 3c2: 90 e0 ldi r25, 0x00 ; 0 3c4: 02 c0 rjmp .+4 ; 0x3ca <_Z8clrvoxeliii+0x36> 3c6: 88 0f add r24, r24 3c8: 99 1f adc r25, r25 3ca: fa 94 dec r15 3cc: e2 f7 brpl .-8 ; 0x3c6 <_Z8clrvoxeliii+0x32> 3ce: 80 95 com r24 3d0: 82 23 and r24, r18 3d2: 80 83 st Z, r24 } 3d4: df 91 pop r29 3d6: cf 91 pop r28 3d8: 1f 91 pop r17 3da: 0f 91 pop r16 3dc: ff 90 pop r15 3de: 08 95 ret 000003e0 <_Z8setvoxeliii>: #include "draw.h" #include "string.h" // Set a single voxel to ON void setvoxel(int x, int y, int z) 3e0: ff 92 push r15 3e2: 0f 93 push r16 3e4: 1f 93 push r17 3e6: cf 93 push r28 3e8: df 93 push r29 3ea: f8 2e mov r15, r24 3ec: 8b 01 movw r16, r22 3ee: ea 01 movw r28, r20 { if (inrange(x,y,z)) 3f0: bd df rcall .-134 ; 0x36c <_Z7inrangeiii> 3f2: 88 23 and r24, r24 3f4: a1 f0 breq .+40 ; 0x41e <_Z8setvoxeliii+0x3e> cube[z][y] |= (1 << x); 3f6: fe 01 movw r30, r28 3f8: 33 e0 ldi r19, 0x03 ; 3 3fa: ee 0f add r30, r30 3fc: ff 1f adc r31, r31 3fe: 3a 95 dec r19 400: e1 f7 brne .-8 ; 0x3fa <_Z8setvoxeliii+0x1a> 402: e0 0f add r30, r16 404: f1 1f adc r31, r17 406: ec 59 subi r30, 0x9C ; 156 408: ff 4f sbci r31, 0xFF ; 255 40a: 20 81 ld r18, Z 40c: 81 e0 ldi r24, 0x01 ; 1 40e: 90 e0 ldi r25, 0x00 ; 0 410: 02 c0 rjmp .+4 ; 0x416 <_Z8setvoxeliii+0x36> 412: 88 0f add r24, r24 414: 99 1f adc r25, r25 416: fa 94 dec r15 418: e2 f7 brpl .-8 ; 0x412 <_Z8setvoxeliii+0x32> 41a: 28 2b or r18, r24 41c: 20 83 st Z, r18 } 41e: df 91 pop r29 420: cf 91 pop r28 422: 1f 91 pop r17 424: 0f 91 pop r16 426: ff 90 pop r15 428: 08 95 ret 0000042a <_Z8getvoxeliii>: return 0; } } // Get the current status of a voxel unsigned char getvoxel(int x, int y, int z) 42a: ff 92 push r15 42c: 0f 93 push r16 42e: 1f 93 push r17 430: cf 93 push r28 432: df 93 push r29 434: f8 2e mov r15, r24 436: 8b 01 movw r16, r22 438: ea 01 movw r28, r20 { if (inrange(x,y,z)) 43a: 98 df rcall .-208 ; 0x36c <_Z7inrangeiii> 43c: 88 23 and r24, r24 43e: 89 f0 breq .+34 ; 0x462 <__stack+0x3> { if (cube[z][y] & (1 << x)) 440: 43 e0 ldi r20, 0x03 ; 3 442: cc 0f add r28, r28 444: dd 1f adc r29, r29 446: 4a 95 dec r20 448: e1 f7 brne .-8 ; 0x442 <_Z8getvoxeliii+0x18> 44a: c0 0f add r28, r16 44c: d1 1f adc r29, r17 44e: cc 59 subi r28, 0x9C ; 156 450: df 4f sbci r29, 0xFF ; 255 452: 88 81 ld r24, Y 454: 90 e0 ldi r25, 0x00 ; 0 456: 02 c0 rjmp .+4 ; 0x45c <_Z8getvoxeliii+0x32> 458: 95 95 asr r25 45a: 87 95 ror r24 45c: fa 94 dec r15 45e: e2 f7 brpl .-8 ; 0x458 <_Z8getvoxeliii+0x2e> 460: 81 70 andi r24, 0x01 ; 1 } } else { return 0; } } 462: df 91 pop r29 464: cf 91 pop r28 466: 1f 91 pop r17 468: 0f 91 pop r16 46a: ff 90 pop r15 46c: 08 95 ret 0000046e <_Z10altervoxeliiii>: // In some effect we want to just take bool and write it to a voxel // this function calls the apropriate voxel manipulation function. void altervoxel(int x, int y, int z, int state) { if (state == 1) 46e: 21 30 cpi r18, 0x01 ; 1 470: 31 05 cpc r19, r1 472: 11 f4 brne .+4 ; 0x478 <_Z10altervoxeliiii+0xa> { setvoxel(x,y,z); 474: b5 df rcall .-150 ; 0x3e0 <_Z8setvoxeliii> 476: 08 95 ret } else { clrvoxel(x,y,z); 478: 8d df rcall .-230 ; 0x394 <_Z8clrvoxeliii> 47a: 08 95 ret 0000047c <_Z4fillh>: } // Fill a value into all 64 byts of the cube buffer // Mostly used for clearing. fill(0x00) // or setting all on. fill(0xff) void fill (unsigned char pattern) 47c: 40 e0 ldi r20, 0x00 ; 0 47e: 50 e0 ldi r21, 0x00 ; 0 480: 10 c0 rjmp .+32 ; 0x4a2 <_Z4fillh+0x26> int y; for (z=0;z // or setting all on. fill(0xff) void fill (unsigned char pattern) { int z; int y; for (z=0;z 4a2: 20 e0 ldi r18, 0x00 ; 0 4a4: 30 e0 ldi r19, 0x00 ; 0 { for (y=0;y 4b2: e7 cf rjmp .-50 ; 0x482 <_Z4fillh+0x6> 4b4: 08 95 ret 000004b6 <_Z8delay_msj>: // Delay loop. // This is not calibrated to milliseconds, // but we had allready made to many effects using this // calibration when we figured it might be a good idea // to calibrate it. void delay_ms(uint16_t x) 4b6: 0b c0 rjmp .+22 ; 0x4ce <_Z8delay_msj+0x18> { uint8_t y, z; for ( ; x > 0 ; x--){ 4b8: 20 e0 ldi r18, 0x00 ; 0 ... for ( y = 0 ; y < 90 ; y++){ 4c6: 2f 5f subi r18, 0xFF ; 255 4c8: 2a 35 cpi r18, 0x5A ; 90 4ca: b9 f7 brne .-18 ; 0x4ba <_Z8delay_msj+0x4> // calibration when we figured it might be a good idea // to calibrate it. void delay_ms(uint16_t x) { uint8_t y, z; for ( ; x > 0 ; x--){ 4cc: 01 97 sbiw r24, 0x01 ; 1 4ce: 00 97 sbiw r24, 0x00 ; 0 4d0: 99 f7 brne .-26 ; 0x4b8 <_Z8delay_msj+0x2> for ( z = 0 ; z < 6 ; z++){ asm volatile ("nop"); } } } } 4d2: 08 95 ret 000004d4 <_Z5shiftci>: // Shift the entire contents of the cube along an axis // This is great for effects where you want to draw something // on one side of the cube and have it flow towards the other // side. Like rain flowing down the Z axiz. void shift (char axis, int direction) 4d4: 2f 92 push r2 4d6: 3f 92 push r3 4d8: 4f 92 push r4 4da: 5f 92 push r5 4dc: 6f 92 push r6 4de: 7f 92 push r7 4e0: 9f 92 push r9 4e2: af 92 push r10 4e4: bf 92 push r11 4e6: cf 92 push r12 4e8: df 92 push r13 4ea: ef 92 push r14 4ec: ff 92 push r15 4ee: 0f 93 push r16 4f0: 1f 93 push r17 4f2: cf 93 push r28 4f4: df 93 push r29 4f6: 98 2e mov r9, r24 4f8: 5b 01 movw r10, r22 4fa: cc 24 eor r12, r12 4fc: dd 24 eor r13, r13 int ii, iii; int state; for (i = 0; i < CUBE_SIZE; i++) { if (direction == -1) 4fe: 47 e0 ldi r20, 0x07 ; 7 500: 24 2e mov r2, r20 502: 31 2c mov r3, r1 504: 8f ef ldi r24, 0xFF ; 255 506: a8 16 cp r10, r24 508: 8f ef ldi r24, 0xFF ; 255 50a: b8 06 cpc r11, r24 50c: 11 f4 brne .+4 ; 0x512 <_Z5shiftci+0x3e> 50e: 76 01 movw r14, r12 510: 03 c0 rjmp .+6 ; 0x518 <_Z5shiftci+0x44> 512: 71 01 movw r14, r2 514: ec 18 sub r14, r12 516: fd 08 sbc r15, r13 518: 00 e0 ldi r16, 0x00 ; 0 51a: 10 e0 ldi r17, 0x00 ; 0 if (direction == -1) { iii = ii+1; } else { iii = ii-1; 51c: 27 01 movw r4, r14 51e: 08 94 sec 520: 41 08 sbc r4, r1 522: 51 08 sbc r5, r1 { for (y = 0; y < CUBE_SIZE; y++) { if (direction == -1) { iii = ii+1; 524: 37 01 movw r6, r14 526: 08 94 sec 528: 61 1c adc r6, r1 52a: 71 1c adc r7, r1 52c: 36 c0 rjmp .+108 ; 0x59a <_Z5shiftci+0xc6> for (x = 0; x < CUBE_SIZE; x++) { for (y = 0; y < CUBE_SIZE; y++) { if (direction == -1) 52e: 8f ef ldi r24, 0xFF ; 255 530: a8 16 cp r10, r24 532: 8f ef ldi r24, 0xFF ; 255 534: b8 06 cpc r11, r24 536: 11 f4 brne .+4 ; 0x53c <_Z5shiftci+0x68> { iii = ii+1; 538: c3 01 movw r24, r6 53a: 01 c0 rjmp .+2 ; 0x53e <_Z5shiftci+0x6a> } else { iii = ii-1; 53c: c2 01 movw r24, r4 53e: ac 01 movw r20, r24 } if (axis == AXIS_Z) 540: 8a e7 ldi r24, 0x7A ; 122 542: 98 16 cp r9, r24 544: 41 f4 brne .+16 ; 0x556 <_Z5shiftci+0x82> { state = getvoxel(x,y,iii); 546: c8 01 movw r24, r16 548: be 01 movw r22, r28 54a: 6f df rcall .-290 ; 0x42a <_Z8getvoxeliii> 54c: 28 2f mov r18, r24 altervoxel(x,y,ii,state); 54e: c8 01 movw r24, r16 550: be 01 movw r22, r28 552: a7 01 movw r20, r14 554: 17 c0 rjmp .+46 ; 0x584 <_Z5shiftci+0xb0> } if (axis == AXIS_Y) 556: 89 e7 ldi r24, 0x79 ; 121 558: 98 16 cp r9, r24 55a: 49 f4 brne .+18 ; 0x56e <_Z5shiftci+0x9a> { state = getvoxel(x,iii,y); 55c: c8 01 movw r24, r16 55e: ba 01 movw r22, r20 560: ae 01 movw r20, r28 562: 63 df rcall .-314 ; 0x42a <_Z8getvoxeliii> 564: 28 2f mov r18, r24 altervoxel(x,ii,y,state); 566: c8 01 movw r24, r16 568: b7 01 movw r22, r14 56a: ae 01 movw r20, r28 56c: 0b c0 rjmp .+22 ; 0x584 <_Z5shiftci+0xb0> } if (axis == AXIS_X) 56e: 88 e7 ldi r24, 0x78 ; 120 570: 98 16 cp r9, r24 572: 51 f4 brne .+20 ; 0x588 <_Z5shiftci+0xb4> { state = getvoxel(iii,y,x); 574: ca 01 movw r24, r20 576: be 01 movw r22, r28 578: a8 01 movw r20, r16 57a: 57 df rcall .-338 ; 0x42a <_Z8getvoxeliii> 57c: 28 2f mov r18, r24 altervoxel(ii,y,x,state); 57e: c7 01 movw r24, r14 580: be 01 movw r22, r28 582: a8 01 movw r20, r16 584: 30 e0 ldi r19, 0x00 ; 0 586: 73 df rcall .-282 ; 0x46e <_Z10altervoxeliiii> } for (x = 0; x < CUBE_SIZE; x++) { for (y = 0; y < CUBE_SIZE; y++) 588: 21 96 adiw r28, 0x01 ; 1 58a: c8 30 cpi r28, 0x08 ; 8 58c: d1 05 cpc r29, r1 58e: 79 f6 brne .-98 ; 0x52e <_Z5shiftci+0x5a> { ii = (7-i); } for (x = 0; x < CUBE_SIZE; x++) 590: 0f 5f subi r16, 0xFF ; 255 592: 1f 4f sbci r17, 0xFF ; 255 594: 08 30 cpi r16, 0x08 ; 8 596: 11 05 cpc r17, r1 598: 19 f0 breq .+6 ; 0x5a0 <_Z5shiftci+0xcc> 59a: c0 e0 ldi r28, 0x00 ; 0 59c: d0 e0 ldi r29, 0x00 ; 0 59e: c7 cf rjmp .-114 ; 0x52e <_Z5shiftci+0x5a> { int i, x ,y; int ii, iii; int state; for (i = 0; i < CUBE_SIZE; i++) 5a0: 08 94 sec 5a2: c1 1c adc r12, r1 5a4: d1 1c adc r13, r1 5a6: 88 e0 ldi r24, 0x08 ; 8 5a8: c8 16 cp r12, r24 5aa: d1 04 cpc r13, r1 5ac: 09 f0 breq .+2 ; 0x5b0 <_Z5shiftci+0xdc> 5ae: aa cf rjmp .-172 ; 0x504 <_Z5shiftci+0x30> } } } } if (direction == -1) 5b0: 8f ef ldi r24, 0xFF ; 255 5b2: a8 16 cp r10, r24 5b4: 8f ef ldi r24, 0xFF ; 255 5b6: b8 06 cpc r11, r24 5b8: 19 f0 breq .+6 ; 0x5c0 <_Z5shiftci+0xec> 5ba: ee 24 eor r14, r14 5bc: ff 24 eor r15, r15 5be: 03 c0 rjmp .+6 ; 0x5c6 <_Z5shiftci+0xf2> 5c0: 37 e0 ldi r19, 0x07 ; 7 5c2: e3 2e mov r14, r19 5c4: f1 2c mov r15, r1 5c6: 00 e0 ldi r16, 0x00 ; 0 5c8: 10 e0 ldi r17, 0x00 ; 0 5ca: 1e c0 rjmp .+60 ; 0x608 <_Z5shiftci+0x134> for (x = 0; x < CUBE_SIZE; x++) { for (y = 0; y < CUBE_SIZE; y++) { if (axis == AXIS_Z) 5cc: 8a e7 ldi r24, 0x7A ; 122 5ce: 98 16 cp r9, r24 5d0: 21 f4 brne .+8 ; 0x5da <_Z5shiftci+0x106> clrvoxel(x,y,i); 5d2: c8 01 movw r24, r16 5d4: be 01 movw r22, r28 5d6: a7 01 movw r20, r14 5d8: 0d c0 rjmp .+26 ; 0x5f4 <_Z5shiftci+0x120> if (axis == AXIS_Y) 5da: 89 e7 ldi r24, 0x79 ; 121 5dc: 98 16 cp r9, r24 5de: 21 f4 brne .+8 ; 0x5e8 <_Z5shiftci+0x114> clrvoxel(x,i,y); 5e0: c8 01 movw r24, r16 5e2: b7 01 movw r22, r14 5e4: ae 01 movw r20, r28 5e6: 06 c0 rjmp .+12 ; 0x5f4 <_Z5shiftci+0x120> if (axis == AXIS_X) 5e8: 88 e7 ldi r24, 0x78 ; 120 5ea: 98 16 cp r9, r24 5ec: 21 f4 brne .+8 ; 0x5f6 <_Z5shiftci+0x122> clrvoxel(i,y,x); 5ee: c7 01 movw r24, r14 5f0: be 01 movw r22, r28 5f2: a8 01 movw r20, r16 5f4: cf de rcall .-610 ; 0x394 <_Z8clrvoxeliii> i = 0; } for (x = 0; x < CUBE_SIZE; x++) { for (y = 0; y < CUBE_SIZE; y++) 5f6: 21 96 adiw r28, 0x01 ; 1 5f8: c8 30 cpi r28, 0x08 ; 8 5fa: d1 05 cpc r29, r1 5fc: 39 f7 brne .-50 ; 0x5cc <_Z5shiftci+0xf8> } else { i = 0; } for (x = 0; x < CUBE_SIZE; x++) 5fe: 0f 5f subi r16, 0xFF ; 255 600: 1f 4f sbci r17, 0xFF ; 255 602: 08 30 cpi r16, 0x08 ; 8 604: 11 05 cpc r17, r1 606: 19 f0 breq .+6 ; 0x60e <_Z5shiftci+0x13a> 608: c0 e0 ldi r28, 0x00 ; 0 60a: d0 e0 ldi r29, 0x00 ; 0 60c: df cf rjmp .-66 ; 0x5cc <_Z5shiftci+0xf8> if (axis == AXIS_X) clrvoxel(i,y,x); } } } 60e: df 91 pop r29 610: cf 91 pop r28 612: 1f 91 pop r17 614: 0f 91 pop r16 616: ff 90 pop r15 618: ef 90 pop r14 61a: df 90 pop r13 61c: cf 90 pop r12 61e: bf 90 pop r11 620: af 90 pop r10 622: 9f 90 pop r9 624: 7f 90 pop r7 626: 6f 90 pop r6 628: 5f 90 pop r5 62a: 4f 90 pop r4 62c: 3f 90 pop r3 62e: 2f 90 pop r2 630: 08 95 ret 00000632 <_Z18effect_wormsqueezeiiiii>: x = effect_telcstairs_do(x,val,delay); } } } void effect_wormsqueeze (int size, int axis, int direction, int iterations, int delay) 632: 2f 92 push r2 634: 3f 92 push r3 636: 4f 92 push r4 638: 5f 92 push r5 63a: 6f 92 push r6 63c: 7f 92 push r7 63e: 8f 92 push r8 640: 9f 92 push r9 642: af 92 push r10 644: bf 92 push r11 646: cf 92 push r12 648: df 92 push r13 64a: ef 92 push r14 64c: ff 92 push r15 64e: 0f 93 push r16 650: 1f 93 push r17 652: df 93 push r29 654: cf 93 push r28 656: cd b7 in r28, 0x3d ; 61 658: de b7 in r29, 0x3e ; 62 65a: 2e 97 sbiw r28, 0x0e ; 14 65c: 0f b6 in r0, 0x3f ; 63 65e: f8 94 cli 660: de bf out 0x3e, r29 ; 62 662: 0f be out 0x3f, r0 ; 63 664: cd bf out 0x3d, r28 ; 61 666: 9a 83 std Y+2, r25 ; 0x02 668: 89 83 std Y+1, r24 ; 0x01 66a: 7c 83 std Y+4, r23 ; 0x04 66c: 6b 83 std Y+3, r22 ; 0x03 66e: 5e 83 std Y+6, r21 ; 0x06 670: 4d 83 std Y+5, r20 ; 0x05 672: 38 87 std Y+8, r19 ; 0x08 674: 2f 83 std Y+7, r18 ; 0x07 676: 1a 87 std Y+10, r17 ; 0x0a 678: 09 87 std Y+9, r16 ; 0x09 { int x, y, i,j,k, dx, dy; int cube_size; int origin = 0; if (direction == -1) 67a: 4f 5f subi r20, 0xFF ; 255 67c: 5f 4f sbci r21, 0xFF ; 255 67e: 21 f4 brne .+8 ; 0x688 <_Z18effect_wormsqueezeiiiii+0x56> 680: 97 e0 ldi r25, 0x07 ; 7 682: 29 2e mov r2, r25 684: 31 2c mov r3, r1 686: 02 c0 rjmp .+4 ; 0x68c <_Z18effect_wormsqueezeiiiii+0x5a> 688: 22 24 eor r2, r2 68a: 33 24 eor r3, r3 origin = 7; cube_size = 8-(size-1); 68c: 89 e0 ldi r24, 0x09 ; 9 68e: 68 2e mov r6, r24 690: 71 2c mov r7, r1 692: 89 81 ldd r24, Y+1 ; 0x01 694: 9a 81 ldd r25, Y+2 ; 0x02 696: 68 1a sub r6, r24 698: 79 0a sbc r7, r25 x = myrand()%cube_size; 69a: 66 de rcall .-820 ; 0x368 <_Z6myrandv> 69c: b3 01 movw r22, r6 69e: 32 d4 rcall .+2148 ; 0xf04 <__divmodhi4> 6a0: 6c 01 movw r12, r24 y = myrand()%cube_size; 6a2: 62 de rcall .-828 ; 0x368 <_Z6myrandv> 6a4: b3 01 movw r22, r6 6a6: 2e d4 rcall .+2140 ; 0xf04 <__divmodhi4> 6a8: 7c 01 movw r14, r24 6aa: 44 24 eor r4, r4 6ac: 55 24 eor r5, r5 6ae: 75 c0 rjmp .+234 ; 0x79a <_Z18effect_wormsqueezeiiiii+0x168> for (i=0; i 6b2: 8c 01 movw r16, r24 dy = ((myrand()%3)-1); 6b4: 59 de rcall .-846 ; 0x368 <_Z6myrandv> 6b6: 9c 01 movw r18, r24 if ((x+dx) > 0 && (x+dx) < cube_size) 6b8: c8 01 movw r24, r16 6ba: 63 e0 ldi r22, 0x03 ; 3 6bc: 70 e0 ldi r23, 0x00 ; 0 6be: 22 d4 rcall .+2116 ; 0xf04 <__divmodhi4> 6c0: 01 97 sbiw r24, 0x01 ; 1 6c2: 8c 0d add r24, r12 6c4: 9d 1d adc r25, r13 6c6: 9e 87 std Y+14, r25 ; 0x0e 6c8: 8d 87 std Y+13, r24 ; 0x0d 6ca: 18 16 cp r1, r24 6cc: 19 06 cpc r1, r25 6ce: 1c f4 brge .+6 ; 0x6d6 <_Z18effect_wormsqueezeiiiii+0xa4> 6d0: 86 15 cp r24, r6 6d2: 97 05 cpc r25, r7 6d4: 14 f0 brlt .+4 ; 0x6da <_Z18effect_wormsqueezeiiiii+0xa8> 6d6: de 86 std Y+14, r13 ; 0x0e 6d8: cd 86 std Y+13, r12 ; 0x0d x += dx; if ((y+dy) > 0 && (y+dy) < cube_size) 6da: c9 01 movw r24, r18 6dc: 63 e0 ldi r22, 0x03 ; 3 6de: 70 e0 ldi r23, 0x00 ; 0 6e0: 11 d4 rcall .+2082 ; 0xf04 <__divmodhi4> 6e2: 8c 01 movw r16, r24 6e4: 01 50 subi r16, 0x01 ; 1 6e6: 10 40 sbci r17, 0x00 ; 0 6e8: 0e 0d add r16, r14 6ea: 1f 1d adc r17, r15 6ec: 10 16 cp r1, r16 6ee: 11 06 cpc r1, r17 6f0: 1c f4 brge .+6 ; 0x6f8 <_Z18effect_wormsqueezeiiiii+0xc6> 6f2: 06 15 cp r16, r6 6f4: 17 05 cpc r17, r7 6f6: 0c f0 brlt .+2 ; 0x6fa <_Z18effect_wormsqueezeiiiii+0xc8> 6f8: 87 01 movw r16, r14 y += dy; shift(axis, direction); 6fa: 8b 81 ldd r24, Y+3 ; 0x03 6fc: 6d 81 ldd r22, Y+5 ; 0x05 6fe: 7e 81 ldd r23, Y+6 ; 0x06 700: e9 de rcall .-558 ; 0x4d4 <_Z5shiftci> 702: 8d 84 ldd r8, Y+13 ; 0x0d 704: 9e 84 ldd r9, Y+14 ; 0x0e 706: aa 24 eor r10, r10 708: bb 24 eor r11, r11 70a: 30 c0 rjmp .+96 ; 0x76c <_Z18effect_wormsqueezeiiiii+0x13a> for (j=0; j setvoxel(x+j,y+k,origin); 716: c4 01 movw r24, r8 718: b6 01 movw r22, r12 71a: a1 01 movw r20, r2 71c: 15 c0 rjmp .+42 ; 0x748 <_Z18effect_wormsqueezeiiiii+0x116> if (axis == AXIS_Y) 71e: 8b 81 ldd r24, Y+3 ; 0x03 720: 9c 81 ldd r25, Y+4 ; 0x04 722: 89 37 cpi r24, 0x79 ; 121 724: 91 05 cpc r25, r1 726: 21 f4 brne .+8 ; 0x730 <_Z18effect_wormsqueezeiiiii+0xfe> setvoxel(x+j,origin,y+k); 728: c4 01 movw r24, r8 72a: b1 01 movw r22, r2 72c: a6 01 movw r20, r12 72e: 0c c0 rjmp .+24 ; 0x748 <_Z18effect_wormsqueezeiiiii+0x116> if (axis == AXIS_X) 730: eb 81 ldd r30, Y+3 ; 0x03 732: fc 81 ldd r31, Y+4 ; 0x04 734: e8 37 cpi r30, 0x78 ; 120 736: f1 05 cpc r31, r1 738: 41 f4 brne .+16 ; 0x74a <_Z18effect_wormsqueezeiiiii+0x118> setvoxel(origin,y+j,x+k); 73a: 4d 85 ldd r20, Y+13 ; 0x0d 73c: 5e 85 ldd r21, Y+14 ; 0x0e 73e: 4e 0d add r20, r14 740: 5f 1d adc r21, r15 742: c1 01 movw r24, r2 744: 6b 85 ldd r22, Y+11 ; 0x0b 746: 7c 85 ldd r23, Y+12 ; 0x0c 748: 4b de rcall .-874 ; 0x3e0 <_Z8setvoxeliii> shift(axis, direction); for (j=0; j y += dy; shift(axis, direction); for (j=0; j 776: 68 01 movw r12, r16 778: ee 24 eor r14, r14 77a: ff 24 eor r15, r15 if (axis == AXIS_Y) setvoxel(x+j,origin,y+k); if (axis == AXIS_X) setvoxel(origin,y+j,x+k); 77c: c5 01 movw r24, r10 77e: 80 0f add r24, r16 780: 91 1f adc r25, r17 782: 9c 87 std Y+12, r25 ; 0x0c 784: 8b 87 std Y+11, r24 ; 0x0b 786: e7 cf rjmp .-50 ; 0x756 <_Z18effect_wormsqueezeiiiii+0x124> } } delay_ms(delay); 788: 89 85 ldd r24, Y+9 ; 0x09 78a: 9a 85 ldd r25, Y+10 ; 0x0a 78c: 94 de rcall .-728 ; 0x4b6 <_Z8delay_msj> cube_size = 8-(size-1); x = myrand()%cube_size; y = myrand()%cube_size; for (i=0; i 7a4: 85 cf rjmp .-246 ; 0x6b0 <_Z18effect_wormsqueezeiiiii+0x7e> } } delay_ms(delay); } } 7a6: 2e 96 adiw r28, 0x0e ; 14 7a8: 0f b6 in r0, 0x3f ; 63 7aa: f8 94 cli 7ac: de bf out 0x3e, r29 ; 62 7ae: 0f be out 0x3f, r0 ; 63 7b0: cd bf out 0x3d, r28 ; 61 7b2: cf 91 pop r28 7b4: df 91 pop r29 7b6: 1f 91 pop r17 7b8: 0f 91 pop r16 7ba: ff 90 pop r15 7bc: ef 90 pop r14 7be: df 90 pop r13 7c0: cf 90 pop r12 7c2: bf 90 pop r11 7c4: af 90 pop r10 7c6: 9f 90 pop r9 7c8: 8f 90 pop r8 7ca: 7f 90 pop r7 7cc: 6f 90 pop r6 7ce: 5f 90 pop r5 7d0: 4f 90 pop r4 7d2: 3f 90 pop r3 7d4: 2f 90 pop r2 7d6: 08 95 ret 000007d8 <_Z11effect_raini>: } } } void effect_rain (int iterations) 7d8: af 92 push r10 7da: bf 92 push r11 7dc: cf 92 push r12 7de: df 92 push r13 7e0: ef 92 push r14 7e2: ff 92 push r15 7e4: 0f 93 push r16 7e6: 1f 93 push r17 7e8: cf 93 push r28 7ea: df 93 push r29 7ec: 5c 01 movw r10, r24 7ee: cc 24 eor r12, r12 7f0: dd 24 eor r13, r13 7f2: 2a c0 rjmp .+84 ; 0x848 <_Z11effect_raini+0x70> int rnd_y; int rnd_num; for (ii=0;ii 7f6: 64 e0 ldi r22, 0x04 ; 4 7f8: 70 e0 ldi r23, 0x00 ; 0 7fa: 84 d3 rcall .+1800 ; 0xf04 <__divmodhi4> 7fc: ec 01 movw r28, r24 7fe: ee 24 eor r14, r14 800: ff 24 eor r15, r15 802: 15 c0 rjmp .+42 ; 0x82e <_Z11effect_raini+0x56> for (i=0; i < rnd_num;i++) { rnd_x = myrand()%8; 804: b1 dd rcall .-1182 ; 0x368 <_Z6myrandv> 806: 8c 01 movw r16, r24 rnd_y = myrand()%8; 808: af dd rcall .-1186 ; 0x368 <_Z6myrandv> 80a: 9c 01 movw r18, r24 setvoxel(rnd_x,rnd_y,7); 80c: c8 01 movw r24, r16 80e: 68 e0 ldi r22, 0x08 ; 8 810: 70 e0 ldi r23, 0x00 ; 0 812: 78 d3 rcall .+1776 ; 0xf04 <__divmodhi4> 814: fc 01 movw r30, r24 816: c9 01 movw r24, r18 818: 68 e0 ldi r22, 0x08 ; 8 81a: 70 e0 ldi r23, 0x00 ; 0 81c: 73 d3 rcall .+1766 ; 0xf04 <__divmodhi4> 81e: bc 01 movw r22, r24 820: cf 01 movw r24, r30 822: 47 e0 ldi r20, 0x07 ; 7 824: 50 e0 ldi r21, 0x00 ; 0 826: dc dd rcall .-1096 ; 0x3e0 <_Z8setvoxeliii> for (ii=0;ii rnd_x = myrand()%8; rnd_y = myrand()%8; setvoxel(rnd_x,rnd_y,7); } delay_ms(1000); 834: 88 ee ldi r24, 0xE8 ; 232 836: 93 e0 ldi r25, 0x03 ; 3 838: 3e de rcall .-900 ; 0x4b6 <_Z8delay_msj> shift(AXIS_Z,-1); 83a: 8a e7 ldi r24, 0x7A ; 122 83c: 6f ef ldi r22, 0xFF ; 255 83e: 7f ef ldi r23, 0xFF ; 255 840: 49 de rcall .-878 ; 0x4d4 <_Z5shiftci> int i, ii; int rnd_x; int rnd_y; int rnd_num; for (ii=0;ii } delay_ms(1000); shift(AXIS_Z,-1); } } 84e: df 91 pop r29 850: cf 91 pop r28 852: 1f 91 pop r17 854: 0f 91 pop r16 856: ff 90 pop r15 858: ef 90 pop r14 85a: df 90 pop r13 85c: cf 90 pop r12 85e: bf 90 pop r11 860: af 90 pop r10 862: 08 95 ret 00000864 <_Z11sendvoxel_zhhhi>: } // Send a voxel flying from one side of the cube to the other // If its at the bottom, send it to the top.. void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) 864: 7f 92 push r7 866: 8f 92 push r8 868: 9f 92 push r9 86a: af 92 push r10 86c: bf 92 push r11 86e: cf 92 push r12 870: df 92 push r13 872: ef 92 push r14 874: ff 92 push r15 876: 0f 93 push r16 878: 1f 93 push r17 87a: cf 93 push r28 87c: df 93 push r29 87e: e8 2e mov r14, r24 880: f6 2e mov r15, r22 882: 74 2e mov r7, r20 884: 69 01 movw r12, r18 886: c0 e0 ldi r28, 0x00 ; 0 888: d0 e0 ldi r29, 0x00 ; 0 88a: f7 e0 ldi r31, 0x07 ; 7 88c: 8f 2e mov r8, r31 88e: 91 2c mov r9, r1 for (i=0; i<8; i++) { if (z == 7) { ii = 7-i; clrvoxel(x,y,ii+1); 890: e8 e0 ldi r30, 0x08 ; 8 892: ae 2e mov r10, r30 894: b1 2c mov r11, r1 void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) { int i, ii; for (i=0; i<8; i++) { if (z == 7) 896: 87 e0 ldi r24, 0x07 ; 7 898: 78 16 cp r7, r24 89a: 61 f4 brne .+24 ; 0x8b4 <_Z11sendvoxel_zhhhi+0x50> } // Send a voxel flying from one side of the cube to the other // If its at the bottom, send it to the top.. void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) 89c: 84 01 movw r16, r8 89e: 0c 1b sub r16, r28 8a0: 1d 0b sbc r17, r29 for (i=0; i<8; i++) { if (z == 7) { ii = 7-i; clrvoxel(x,y,ii+1); 8a2: a5 01 movw r20, r10 8a4: 4c 1b sub r20, r28 8a6: 5d 0b sbc r21, r29 8a8: 8e 2d mov r24, r14 8aa: 90 e0 ldi r25, 0x00 ; 0 8ac: 6f 2d mov r22, r15 8ae: 70 e0 ldi r23, 0x00 ; 0 8b0: 71 dd rcall .-1310 ; 0x394 <_Z8clrvoxeliii> 8b2: 09 c0 rjmp .+18 ; 0x8c6 <_Z11sendvoxel_zhhhi+0x62> } else { ii = i; clrvoxel(x,y,ii-1); 8b4: ae 01 movw r20, r28 8b6: 41 50 subi r20, 0x01 ; 1 8b8: 50 40 sbci r21, 0x00 ; 0 8ba: 8e 2d mov r24, r14 8bc: 90 e0 ldi r25, 0x00 ; 0 8be: 6f 2d mov r22, r15 8c0: 70 e0 ldi r23, 0x00 ; 0 8c2: 68 dd rcall .-1328 ; 0x394 <_Z8clrvoxeliii> 8c4: 8e 01 movw r16, r28 } setvoxel(x,y,ii); 8c6: 8e 2d mov r24, r14 8c8: 90 e0 ldi r25, 0x00 ; 0 8ca: 6f 2d mov r22, r15 8cc: 70 e0 ldi r23, 0x00 ; 0 8ce: a8 01 movw r20, r16 8d0: 87 dd rcall .-1266 ; 0x3e0 <_Z8setvoxeliii> delay_ms(delay); 8d2: c6 01 movw r24, r12 8d4: f0 dd rcall .-1056 ; 0x4b6 <_Z8delay_msj> // Send a voxel flying from one side of the cube to the other // If its at the bottom, send it to the top.. void sendvoxel_z (unsigned char x, unsigned char y, unsigned char z, int delay) { int i, ii; for (i=0; i<8; i++) 8d6: 21 96 adiw r28, 0x01 ; 1 8d8: c8 30 cpi r28, 0x08 ; 8 8da: d1 05 cpc r29, r1 8dc: e1 f6 brne .-72 ; 0x896 <_Z11sendvoxel_zhhhi+0x32> clrvoxel(x,y,ii-1); } setvoxel(x,y,ii); delay_ms(delay); } } 8de: df 91 pop r29 8e0: cf 91 pop r28 8e2: 1f 91 pop r17 8e4: 0f 91 pop r16 8e6: ff 90 pop r15 8e8: ef 90 pop r14 8ea: df 90 pop r13 8ec: cf 90 pop r12 8ee: bf 90 pop r11 8f0: af 90 pop r10 8f2: 9f 90 pop r9 8f4: 8f 90 pop r8 8f6: 7f 90 pop r7 8f8: 08 95 ret 000008fa <_Z19draw_positions_axiscPhi>: draw_positions_axis (axis, positions,invert); delay_ms(delay); } } void draw_positions_axis (char axis, unsigned char positions[64], int invert) 8fa: 4f 92 push r4 8fc: 5f 92 push r5 8fe: 6f 92 push r6 900: 7f 92 push r7 902: 9f 92 push r9 904: af 92 push r10 906: bf 92 push r11 908: cf 92 push r12 90a: df 92 push r13 90c: ef 92 push r14 90e: ff 92 push r15 910: 0f 93 push r16 912: 1f 93 push r17 914: cf 93 push r28 916: df 93 push r29 918: 98 2e mov r9, r24 91a: 16 2f mov r17, r22 91c: 07 2f mov r16, r23 91e: 3a 01 movw r6, r20 { int x, y, p; fill(0x00); 920: 80 e0 ldi r24, 0x00 ; 0 922: ac dd rcall .-1192 ; 0x47c <_Z4fillh> 924: 21 2f mov r18, r17 926: 30 2f mov r19, r16 928: c9 01 movw r24, r18 92a: 6c 01 movw r12, r24 92c: c0 e0 ldi r28, 0x00 ; 0 92e: d0 e0 ldi r29, 0x00 ; 0 { for (y=0; y<8; y++) { if (invert) { p = (7-positions[(x*8)+y]); 930: 57 e0 ldi r21, 0x07 ; 7 932: 45 2e mov r4, r21 934: 51 2c mov r5, r1 936: 34 c0 rjmp .+104 ; 0x9a0 <_Z19draw_positions_axiscPhi+0xa6> for (x=0; x<8; x++) { for (y=0; y<8; y++) { if (invert) 938: 61 14 cp r6, r1 93a: 71 04 cpc r7, r1 93c: 31 f0 breq .+12 ; 0x94a <_Z19draw_positions_axiscPhi+0x50> { p = (7-positions[(x*8)+y]); 93e: f5 01 movw r30, r10 940: 80 81 ld r24, Z 942: a2 01 movw r20, r4 944: 48 1b sub r20, r24 946: 51 09 sbc r21, r1 948: 04 c0 rjmp .+8 ; 0x952 <_Z19draw_positions_axiscPhi+0x58> } else { p = positions[(x*8)+y]; 94a: f7 01 movw r30, r14 94c: 80 81 ld r24, Z 94e: 48 2f mov r20, r24 950: 50 e0 ldi r21, 0x00 ; 0 } if (axis == AXIS_Z) 952: fa e7 ldi r31, 0x7A ; 122 954: 9f 16 cp r9, r31 956: 19 f4 brne .+6 ; 0x95e <_Z19draw_positions_axiscPhi+0x64> setvoxel(x,y,p); 958: ce 01 movw r24, r28 95a: b8 01 movw r22, r16 95c: 0d c0 rjmp .+26 ; 0x978 <_Z19draw_positions_axiscPhi+0x7e> if (axis == AXIS_Y) 95e: 89 e7 ldi r24, 0x79 ; 121 960: 98 16 cp r9, r24 962: 21 f4 brne .+8 ; 0x96c <_Z19draw_positions_axiscPhi+0x72> setvoxel(x,p,y); 964: ce 01 movw r24, r28 966: ba 01 movw r22, r20 968: a8 01 movw r20, r16 96a: 06 c0 rjmp .+12 ; 0x978 <_Z19draw_positions_axiscPhi+0x7e> if (axis == AXIS_X) 96c: 98 e7 ldi r25, 0x78 ; 120 96e: 99 16 cp r9, r25 970: 21 f4 brne .+8 ; 0x97a <_Z19draw_positions_axiscPhi+0x80> setvoxel(p,y,x); 972: ca 01 movw r24, r20 974: b8 01 movw r22, r16 976: ae 01 movw r20, r28 978: 33 dd rcall .-1434 ; 0x3e0 <_Z8setvoxeliii> fill(0x00); for (x=0; x<8; x++) { for (y=0; y<8; y++) 97a: 0f 5f subi r16, 0xFF ; 255 97c: 1f 4f sbci r17, 0xFF ; 255 97e: 08 94 sec 980: a1 1c adc r10, r1 982: b1 1c adc r11, r1 984: 08 94 sec 986: e1 1c adc r14, r1 988: f1 1c adc r15, r1 98a: 08 30 cpi r16, 0x08 ; 8 98c: 11 05 cpc r17, r1 98e: a1 f6 brne .-88 ; 0x938 <_Z19draw_positions_axiscPhi+0x3e> { int x, y, p; fill(0x00); for (x=0; x<8; x++) 990: 21 96 adiw r28, 0x01 ; 1 992: e8 e0 ldi r30, 0x08 ; 8 994: f0 e0 ldi r31, 0x00 ; 0 996: ce 0e add r12, r30 998: df 1e adc r13, r31 99a: c8 30 cpi r28, 0x08 ; 8 99c: d1 05 cpc r29, r1 99e: 29 f0 breq .+10 ; 0x9aa <_Z19draw_positions_axiscPhi+0xb0> 9a0: 56 01 movw r10, r12 9a2: 76 01 movw r14, r12 9a4: 00 e0 ldi r16, 0x00 ; 0 9a6: 10 e0 ldi r17, 0x00 ; 0 9a8: c7 cf rjmp .-114 ; 0x938 <_Z19draw_positions_axiscPhi+0x3e> if (axis == AXIS_X) setvoxel(p,y,x); } } } 9aa: df 91 pop r29 9ac: cf 91 pop r28 9ae: 1f 91 pop r17 9b0: 0f 91 pop r16 9b2: ff 90 pop r15 9b4: ef 90 pop r14 9b6: df 90 pop r13 9b8: cf 90 pop r12 9ba: bf 90 pop r11 9bc: af 90 pop r10 9be: 9f 90 pop r9 9c0: 7f 90 pop r7 9c2: 6f 90 pop r6 9c4: 5f 90 pop r5 9c6: 4f 90 pop r4 9c8: 08 95 ret 000009ca <_Z32effect_boxside_randsend_parallelciii>: void effect_boxside_randsend_parallel (char axis, int origin, int delay, int mode) 9ca: 2f 92 push r2 9cc: 3f 92 push r3 9ce: 4f 92 push r4 9d0: 5f 92 push r5 9d2: 6f 92 push r6 9d4: 7f 92 push r7 9d6: 8f 92 push r8 9d8: 9f 92 push r9 9da: af 92 push r10 9dc: bf 92 push r11 9de: cf 92 push r12 9e0: df 92 push r13 9e2: ef 92 push r14 9e4: ff 92 push r15 9e6: 0f 93 push r16 9e8: 1f 93 push r17 9ea: df 93 push r29 9ec: cf 93 push r28 9ee: cd b7 in r28, 0x3d ; 61 9f0: de b7 in r29, 0x3e ; 62 9f2: c1 58 subi r28, 0x81 ; 129 9f4: d0 40 sbci r29, 0x00 ; 0 9f6: 0f b6 in r0, 0x3f ; 63 9f8: f8 94 cli 9fa: de bf out 0x3e, r29 ; 62 9fc: 0f be out 0x3f, r0 ; 63 9fe: cd bf out 0x3d, r28 ; 61 a00: cf 57 subi r28, 0x7F ; 127 a02: df 4f sbci r29, 0xFF ; 255 a04: 88 83 st Y, r24 a06: c1 58 subi r28, 0x81 ; 129 a08: d0 40 sbci r29, 0x00 ; 0 a0a: 2b 01 movw r4, r22 a0c: 3a 01 movw r6, r20 a0e: 49 01 movw r8, r18 a10: 71 e4 ldi r23, 0x41 ; 65 a12: a7 2e mov r10, r23 a14: b1 2c mov r11, r1 a16: ac 0e add r10, r28 a18: bd 1e adc r11, r29 a1a: f5 01 movw r30, r10 a1c: 61 e8 ldi r22, 0x81 ; 129 a1e: c6 2e mov r12, r22 a20: d1 2c mov r13, r1 a22: cc 0e add r12, r28 a24: dd 1e adc r13, r29 int notdone2 = 1; int sent = 0; for (i=0;i<64;i++) { pos[i] = 0; a26: 11 92 st Z+, r1 unsigned char pos[64]; int notdone = 1; int notdone2 = 1; int sent = 0; for (i=0;i<64;i++) a28: ec 15 cp r30, r12 a2a: fd 05 cpc r31, r13 a2c: e1 f7 brne .-8 ; 0xa26 <_Z32effect_boxside_randsend_parallelciii+0x5c> a2e: 00 e0 ldi r16, 0x00 ; 0 a30: 10 e0 ldi r17, 0x00 ; 0 sent++; } } done = 0; for (i=0;i<64;i++) a32: 1e 01 movw r2, r28 a34: 08 94 sec a36: 21 1c adc r2, r1 a38: 31 1c adc r3, r1 pos[i] = 0; } while (notdone) { if (mode == 1) a3a: 81 e0 ldi r24, 0x01 ; 1 a3c: 88 16 cp r8, r24 a3e: 91 04 cpc r9, r1 a40: b9 f4 brne .+46 ; 0xa70 <_Z32effect_boxside_randsend_parallelciii+0xa6> a42: 12 c0 rjmp .+36 ; 0xa68 <_Z32effect_boxside_randsend_parallelciii+0x9e> { notdone2 = 1; while (notdone2 && sent<64) { i = myrand()%64; a44: 91 dc rcall .-1758 ; 0x368 <_Z6myrandv> a46: 60 e4 ldi r22, 0x40 ; 64 a48: 70 e0 ldi r23, 0x00 ; 0 a4a: 5c d2 rcall .+1208 ; 0xf04 <__divmodhi4> if (pos[i] == 0) a4c: e1 e4 ldi r30, 0x41 ; 65 a4e: f0 e0 ldi r31, 0x00 ; 0 a50: ec 0f add r30, r28 a52: fd 1f adc r31, r29 a54: e8 0f add r30, r24 a56: f9 1f adc r31, r25 a58: 80 81 ld r24, Z a5a: 88 23 and r24, r24 a5c: 99 f7 brne .-26 ; 0xa44 <_Z32effect_boxside_randsend_parallelciii+0x7a> { sent++; a5e: 0f 5f subi r16, 0xFF ; 255 a60: 1f 4f sbci r17, 0xFF ; 255 pos[i] += 1; a62: 91 e0 ldi r25, 0x01 ; 1 a64: 90 83 st Z, r25 a66: 16 c0 rjmp .+44 ; 0xa94 <_Z32effect_boxside_randsend_parallelciii+0xca> while (notdone) { if (mode == 1) { notdone2 = 1; while (notdone2 && sent<64) a68: 00 34 cpi r16, 0x40 ; 64 a6a: 11 05 cpc r17, r1 a6c: 5c f3 brlt .-42 ; 0xa44 <_Z32effect_boxside_randsend_parallelciii+0x7a> a6e: 12 c0 rjmp .+36 ; 0xa94 <_Z32effect_boxside_randsend_parallelciii+0xca> sent++; pos[i] += 1; notdone2 = 0; } } } else if (mode == 2) a70: 82 e0 ldi r24, 0x02 ; 2 a72: 88 16 cp r8, r24 a74: 91 04 cpc r9, r1 a76: 71 f4 brne .+28 ; 0xa94 <_Z32effect_boxside_randsend_parallelciii+0xca> { if (sent<64) a78: 00 34 cpi r16, 0x40 ; 64 a7a: 11 05 cpc r17, r1 a7c: 5c f4 brge .+22 ; 0xa94 <_Z32effect_boxside_randsend_parallelciii+0xca> { pos[sent] += 1; a7e: e1 e4 ldi r30, 0x41 ; 65 a80: f0 e0 ldi r31, 0x00 ; 0 a82: ec 0f add r30, r28 a84: fd 1f adc r31, r29 a86: e0 0f add r30, r16 a88: f1 1f adc r31, r17 a8a: 80 81 ld r24, Z a8c: 8f 5f subi r24, 0xFF ; 255 a8e: 80 83 st Z, r24 sent++; a90: 0f 5f subi r16, 0xFF ; 255 a92: 1f 4f sbci r17, 0xFF ; 255 a94: f5 01 movw r30, r10 a96: ee 24 eor r14, r14 a98: ff 24 eor r15, r15 } done = 0; for (i=0;i<64;i++) { if (pos[i] > 0 && pos[i] <7) a9a: 90 81 ld r25, Z a9c: 89 2f mov r24, r25 a9e: 81 50 subi r24, 0x01 ; 1 aa0: 86 30 cpi r24, 0x06 ; 6 aa2: 10 f4 brcc .+4 ; 0xaa8 <_Z32effect_boxside_randsend_parallelciii+0xde> { pos[i] += 1; aa4: 9f 5f subi r25, 0xFF ; 255 aa6: 90 83 st Z, r25 } if (pos[i] == 7) aa8: 80 81 ld r24, Z aaa: 87 30 cpi r24, 0x07 ; 7 aac: 19 f4 brne .+6 ; 0xab4 <_Z32effect_boxside_randsend_parallelciii+0xea> done++; aae: 08 94 sec ab0: e1 1c adc r14, r1 ab2: f1 1c adc r15, r1 ab4: 31 96 adiw r30, 0x01 ; 1 sent++; } } done = 0; for (i=0;i<64;i++) ab6: ec 15 cp r30, r12 ab8: fd 05 cpc r31, r13 aba: 79 f7 brne .-34 ; 0xa9a <_Z32effect_boxside_randsend_parallelciii+0xd0> abc: d1 01 movw r26, r2 abe: f5 01 movw r30, r10 ac0: 80 81 ld r24, Z if (done == 64) notdone = 0; for (i=0;i<64;i++) { if (origin == 0) ac2: 41 14 cp r4, r1 ac4: 51 04 cpc r5, r1 ac6: 19 f0 breq .+6 ; 0xace <_Z32effect_boxside_randsend_parallelciii+0x104> { cubepos[i] = pos[i]; } else { cubepos[i] = (7-pos[i]); ac8: 97 e0 ldi r25, 0x07 ; 7 aca: 98 1b sub r25, r24 acc: 89 2f mov r24, r25 ace: 8c 93 st X, r24 ad0: 31 96 adiw r30, 0x01 ; 1 ad2: 11 96 adiw r26, 0x01 ; 1 } if (done == 64) notdone = 0; for (i=0;i<64;i++) ad4: ec 15 cp r30, r12 ad6: fd 05 cpc r31, r13 ad8: 99 f7 brne .-26 ; 0xac0 <_Z32effect_boxside_randsend_parallelciii+0xf6> cubepos[i] = (7-pos[i]); } } delay_ms(delay); ada: c3 01 movw r24, r6 adc: ec dc rcall .-1576 ; 0x4b6 <_Z8delay_msj> draw_positions_axis(axis,cubepos,0); ade: cf 57 subi r28, 0x7F ; 127 ae0: df 4f sbci r29, 0xFF ; 255 ae2: 88 81 ld r24, Y ae4: c1 58 subi r28, 0x81 ; 129 ae6: d0 40 sbci r29, 0x00 ; 0 ae8: b1 01 movw r22, r2 aea: 40 e0 ldi r20, 0x00 ; 0 aec: 50 e0 ldi r21, 0x00 ; 0 aee: 05 df rcall .-502 ; 0x8fa <_Z19draw_positions_axiscPhi> LED_PORT ^= LED_RED; af0: 82 b3 in r24, 0x12 ; 18 af2: 94 e0 ldi r25, 0x04 ; 4 af4: 89 27 eor r24, r25 af6: 82 bb out 0x12, r24 ; 18 for (i=0;i<64;i++) { pos[i] = 0; } while (notdone) af8: 80 e4 ldi r24, 0x40 ; 64 afa: e8 16 cp r14, r24 afc: f1 04 cpc r15, r1 afe: 09 f0 breq .+2 ; 0xb02 <_Z32effect_boxside_randsend_parallelciii+0x138> b00: 9c cf rjmp .-200 ; 0xa3a <_Z32effect_boxside_randsend_parallelciii+0x70> delay_ms(delay); draw_positions_axis(axis,cubepos,0); LED_PORT ^= LED_RED; } } b02: cf 57 subi r28, 0x7F ; 127 b04: df 4f sbci r29, 0xFF ; 255 b06: 0f b6 in r0, 0x3f ; 63 b08: f8 94 cli b0a: de bf out 0x3e, r29 ; 62 b0c: 0f be out 0x3f, r0 ; 63 b0e: cd bf out 0x3d, r28 ; 61 b10: cf 91 pop r28 b12: df 91 pop r29 b14: 1f 91 pop r17 b16: 0f 91 pop r16 b18: ff 90 pop r15 b1a: ef 90 pop r14 b1c: df 90 pop r13 b1e: cf 90 pop r12 b20: bf 90 pop r11 b22: af 90 pop r10 b24: 9f 90 pop r9 b26: 8f 90 pop r8 b28: 7f 90 pop r7 b2a: 6f 90 pop r6 b2c: 5f 90 pop r5 b2e: 4f 90 pop r4 b30: 3f 90 pop r3 b32: 2f 90 pop r2 b34: 08 95 ret 00000b36 <_Z20effect_z_updown_movePhS_c>: } } void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis) b36: ac 01 movw r20, r24 b38: dc 01 movw r26, r24 b3a: fb 01 movw r30, r22 b3c: 20 e0 ldi r18, 0x00 ; 0 b3e: 30 e0 ldi r19, 0x00 ; 0 { int px; for (px=0; px<64; px++) { if (positions[px] { positions[px]++; b48: 9f 5f subi r25, 0xFF ; 255 b4a: 9c 93 st X, r25 } if (positions[px]>destinations[px]) b4c: 9c 91 ld r25, X b4e: 80 81 ld r24, Z b50: 89 17 cp r24, r25 b52: 10 f4 brcc .+4 ; 0xb58 <_Z20effect_z_updown_movePhS_c+0x22> { positions[px]--; b54: 91 50 subi r25, 0x01 ; 1 b56: 9c 93 st X, r25 } void effect_z_updown_move (unsigned char positions[64], unsigned char destinations[64], char axis) { int px; for (px=0; px<64; px++) b58: 2f 5f subi r18, 0xFF ; 255 b5a: 3f 4f sbci r19, 0xFF ; 255 b5c: 11 96 adiw r26, 0x01 ; 1 b5e: 31 96 adiw r30, 0x01 ; 1 b60: 20 34 cpi r18, 0x40 ; 64 b62: 31 05 cpc r19, r1 b64: 69 f7 brne .-38 ; 0xb40 <_Z20effect_z_updown_movePhS_c+0xa> { positions[px]--; } } draw_positions_axis (AXIS_Z, positions,0); b66: 8a e7 ldi r24, 0x7A ; 122 b68: ba 01 movw r22, r20 b6a: 40 e0 ldi r20, 0x00 ; 0 b6c: 50 e0 ldi r21, 0x00 ; 0 b6e: c5 de rcall .-630 ; 0x8fa <_Z19draw_positions_axiscPhi> } b70: 08 95 ret 00000b72 <_Z15effect_z_updownii>: delay_ms(1000); shift(AXIS_Z,-1); } } void effect_z_updown (int iterations, int delay) b72: 2f 92 push r2 b74: 3f 92 push r3 b76: 4f 92 push r4 b78: 5f 92 push r5 b7a: 6f 92 push r6 b7c: 7f 92 push r7 b7e: 8f 92 push r8 b80: 9f 92 push r9 b82: af 92 push r10 b84: bf 92 push r11 b86: cf 92 push r12 b88: df 92 push r13 b8a: ef 92 push r14 b8c: ff 92 push r15 b8e: 0f 93 push r16 b90: 1f 93 push r17 b92: df 93 push r29 b94: cf 93 push r28 b96: cd b7 in r28, 0x3d ; 61 b98: de b7 in r29, 0x3e ; 62 b9a: c0 58 subi r28, 0x80 ; 128 b9c: d0 40 sbci r29, 0x00 ; 0 b9e: 0f b6 in r0, 0x3f ; 63 ba0: f8 94 cli ba2: de bf out 0x3e, r29 ; 62 ba4: 0f be out 0x3f, r0 ; 63 ba6: cd bf out 0x3d, r28 ; 61 ba8: 2c 01 movw r4, r24 baa: 7b 01 movw r14, r22 bac: 00 e0 ldi r16, 0x00 ; 0 bae: 10 e0 ldi r17, 0x00 ; 0 int i,y,move; for (i=0; i<64; i++) { positions[i] = 4; bb0: 5e 01 movw r10, r28 bb2: 08 94 sec bb4: a1 1c adc r10, r1 bb6: b1 1c adc r11, r1 bb8: 24 e0 ldi r18, 0x04 ; 4 bba: 92 2e mov r9, r18 destinations[i] = myrand()%8; bbc: 91 e4 ldi r25, 0x41 ; 65 bbe: c9 2e mov r12, r25 bc0: d1 2c mov r13, r1 bc2: cc 0e add r12, r28 bc4: dd 1e adc r13, r29 int i,y,move; for (i=0; i<64; i++) { positions[i] = 4; bc6: f5 01 movw r30, r10 bc8: e0 0f add r30, r16 bca: f1 1f adc r31, r17 bcc: 90 82 st Z, r9 destinations[i] = myrand()%8; bce: cc db rcall .-2152 ; 0x368 <_Z6myrandv> bd0: f6 01 movw r30, r12 bd2: e0 0f add r30, r16 bd4: f1 1f adc r31, r17 bd6: 68 e0 ldi r22, 0x08 ; 8 bd8: 70 e0 ldi r23, 0x00 ; 0 bda: 94 d1 rcall .+808 ; 0xf04 <__divmodhi4> bdc: 80 83 st Z, r24 unsigned char positions[64]; unsigned char destinations[64]; int i,y,move; for (i=0; i<64; i++) bde: 0f 5f subi r16, 0xFF ; 255 be0: 1f 4f sbci r17, 0xFF ; 255 be2: 00 34 cpi r16, 0x40 ; 64 be4: 11 05 cpc r17, r1 be6: 79 f7 brne .-34 ; 0xbc6 <_Z15effect_z_updownii+0x54> be8: 00 e0 ldi r16, 0x00 ; 0 bea: 10 e0 ldi r17, 0x00 ; 0 destinations[i] = myrand()%8; } for (i=0; i<8; i++) { effect_z_updown_move(positions, destinations, AXIS_Z); bec: 81 e4 ldi r24, 0x41 ; 65 bee: a8 2e mov r10, r24 bf0: b1 2c mov r11, r1 bf2: ac 0e add r10, r28 bf4: bd 1e adc r11, r29 bf6: 6e 01 movw r12, r28 bf8: 08 94 sec bfa: c1 1c adc r12, r1 bfc: d1 1c adc r13, r1 delay_ms(delay); bfe: 37 01 movw r6, r14 destinations[i] = myrand()%8; } for (i=0; i<8; i++) { effect_z_updown_move(positions, destinations, AXIS_Z); c00: c6 01 movw r24, r12 c02: b5 01 movw r22, r10 c04: 4a e7 ldi r20, 0x7A ; 122 c06: 97 df rcall .-210 ; 0xb36 <_Z20effect_z_updown_movePhS_c> delay_ms(delay); c08: c3 01 movw r24, r6 c0a: 55 dc rcall .-1878 ; 0x4b6 <_Z8delay_msj> { positions[i] = 4; destinations[i] = myrand()%8; } for (i=0; i<8; i++) c0c: 0f 5f subi r16, 0xFF ; 255 c0e: 1f 4f sbci r17, 0xFF ; 255 c10: 08 30 cpi r16, 0x08 ; 8 c12: 11 05 cpc r17, r1 c14: a9 f7 brne .-22 ; 0xc00 <_Z15effect_z_updownii+0x8e> { effect_z_updown_move(positions, destinations, AXIS_Z); delay_ms(delay); } delay_ms(delay*4); c16: 57 01 movw r10, r14 c18: aa 0c add r10, r10 c1a: bb 1c adc r11, r11 c1c: aa 0c add r10, r10 c1e: bb 1c adc r11, r11 c20: cc 24 eor r12, r12 c22: dd 24 eor r13, r13 for (i=0;i delay_ms(delay); } delay_ms(delay*4); c38: 00 e0 ldi r16, 0x00 ; 0 c3a: 10 e0 ldi r17, 0x00 ; 0 for (i=0;i delay_ms(delay); c44: c3 01 movw r24, r6 c46: 37 dc rcall .-1938 ; 0x4b6 <_Z8delay_msj> delay_ms(delay); } for (i=0;i { effect_z_updown_move(positions, destinations, AXIS_Z); delay_ms(delay); } delay_ms(delay*4); c52: c5 01 movw r24, r10 c54: 30 dc rcall .-1952 ; 0x4b6 <_Z8delay_msj> c56: ee 24 eor r14, r14 c58: ff 24 eor r15, r15 for (y=0;y<32;y++) { destinations[myrand()%64] = myrand()%8; c5a: 86 db rcall .-2292 ; 0x368 <_Z6myrandv> c5c: 8c 01 movw r16, r24 c5e: 84 db rcall .-2296 ; 0x368 <_Z6myrandv> c60: 9c 01 movw r18, r24 c62: c8 01 movw r24, r16 c64: 60 e4 ldi r22, 0x40 ; 64 c66: 70 e0 ldi r23, 0x00 ; 0 c68: 4d d1 rcall .+666 ; 0xf04 <__divmodhi4> c6a: f4 01 movw r30, r8 c6c: e8 0f add r30, r24 c6e: f9 1f adc r31, r25 c70: c9 01 movw r24, r18 c72: 68 e0 ldi r22, 0x08 ; 8 c74: 70 e0 ldi r23, 0x00 ; 0 c76: 46 d1 rcall .+652 ; 0xf04 <__divmodhi4> c78: 80 83 st Z, r24 } delay_ms(delay*4); for (y=0;y<32;y++) c7a: 08 94 sec c7c: e1 1c adc r14, r1 c7e: f1 1c adc r15, r1 c80: 80 e2 ldi r24, 0x20 ; 32 c82: e8 16 cp r14, r24 c84: f1 04 cpc r15, r1 c86: 49 f7 brne .-46 ; 0xc5a <_Z15effect_z_updownii+0xe8> { effect_z_updown_move(positions, destinations, AXIS_Z); delay_ms(delay); } for (i=0;i destinations[myrand()%64] = myrand()%8; } } } c94: c0 58 subi r28, 0x80 ; 128 c96: df 4f sbci r29, 0xFF ; 255 c98: 0f b6 in r0, 0x3f ; 63 c9a: f8 94 cli c9c: de bf out 0x3e, r29 ; 62 c9e: 0f be out 0x3f, r0 ; 63 ca0: cd bf out 0x3d, r28 ; 61 ca2: cf 91 pop r28 ca4: df 91 pop r29 ca6: 1f 91 pop r17 ca8: 0f 91 pop r16 caa: ff 90 pop r15 cac: ef 90 pop r14 cae: df 90 pop r13 cb0: cf 90 pop r12 cb2: bf 90 pop r11 cb4: af 90 pop r10 cb6: 9f 90 pop r9 cb8: 8f 90 pop r8 cba: 7f 90 pop r7 cbc: 6f 90 pop r6 cbe: 5f 90 pop r5 cc0: 4f 90 pop r4 cc2: 3f 90 pop r3 cc4: 2f 90 pop r2 cc6: 08 95 ret 00000cc8 <_Z20effect_random_fillerii>: iterations--; } } // Set or clear exactly 512 voxels in a random order. void effect_random_filler (int delay, int state) cc8: 8f 92 push r8 cca: 9f 92 push r9 ccc: af 92 push r10 cce: bf 92 push r11 cd0: cf 92 push r12 cd2: df 92 push r13 cd4: ef 92 push r14 cd6: ff 92 push r15 cd8: 0f 93 push r16 cda: 1f 93 push r17 cdc: cf 93 push r28 cde: df 93 push r29 ce0: 4c 01 movw r8, r24 ce2: 8b 01 movw r16, r22 { int x,y,z; int loop = 0; if (state == 1) ce4: 61 30 cpi r22, 0x01 ; 1 ce6: 71 05 cpc r23, r1 ce8: 11 f4 brne .+4 ; 0xcee <_Z20effect_random_fillerii+0x26> { fill(0x00); cea: 80 e0 ldi r24, 0x00 ; 0 cec: 01 c0 rjmp .+2 ; 0xcf0 <_Z20effect_random_fillerii+0x28> } else { fill(0xff); cee: 8f ef ldi r24, 0xFF ; 255 cf0: c5 db rcall .-2166 ; 0x47c <_Z4fillh> cf2: c0 e0 ldi r28, 0x00 ; 0 cf4: d0 e0 ldi r29, 0x00 ; 0 } while (loop<511) { x = myrand()%8; cf6: 38 db rcall .-2448 ; 0x368 <_Z6myrandv> cf8: 68 e0 ldi r22, 0x08 ; 8 cfa: 70 e0 ldi r23, 0x00 ; 0 cfc: 03 d1 rcall .+518 ; 0xf04 <__divmodhi4> cfe: b8 2e mov r11, r24 d00: a9 2e mov r10, r25 y = myrand()%8; d02: 32 db rcall .-2460 ; 0x368 <_Z6myrandv> d04: 68 e0 ldi r22, 0x08 ; 8 d06: 70 e0 ldi r23, 0x00 ; 0 d08: fd d0 rcall .+506 ; 0xf04 <__divmodhi4> d0a: d8 2e mov r13, r24 d0c: c9 2e mov r12, r25 z = myrand()%8; d0e: 2c db rcall .-2472 ; 0x368 <_Z6myrandv> d10: 68 e0 ldi r22, 0x08 ; 8 d12: 70 e0 ldi r23, 0x00 ; 0 d14: f7 d0 rcall .+494 ; 0xf04 <__divmodhi4> d16: f8 2e mov r15, r24 d18: e9 2e mov r14, r25 if ((state == 0 && getvoxel(x,y,z) == 0x01) || (state == 1 && getvoxel(x,y,z) == 0x00)) d1a: 01 15 cp r16, r1 d1c: 11 05 cpc r17, r1 d1e: 51 f4 brne .+20 ; 0xd34 <_Z20effect_random_fillerii+0x6c> d20: 8b 2d mov r24, r11 d22: 9a 2d mov r25, r10 d24: 6d 2d mov r22, r13 d26: 7c 2d mov r23, r12 d28: 4f 2d mov r20, r15 d2a: 5e 2d mov r21, r14 d2c: 7e db rcall .-2308 ; 0x42a <_Z8getvoxeliii> d2e: 81 30 cpi r24, 0x01 ; 1 d30: 11 f7 brne .-60 ; 0xcf6 <_Z20effect_random_fillerii+0x2e> d32: 0c c0 rjmp .+24 ; 0xd4c <_Z20effect_random_fillerii+0x84> d34: 01 30 cpi r16, 0x01 ; 1 d36: 11 05 cpc r17, r1 d38: f1 f6 brne .-68 ; 0xcf6 <_Z20effect_random_fillerii+0x2e> d3a: 8b 2d mov r24, r11 d3c: 9a 2d mov r25, r10 d3e: 6d 2d mov r22, r13 d40: 7c 2d mov r23, r12 d42: 4f 2d mov r20, r15 d44: 5e 2d mov r21, r14 d46: 71 db rcall .-2334 ; 0x42a <_Z8getvoxeliii> d48: 88 23 and r24, r24 d4a: a9 f6 brne .-86 ; 0xcf6 <_Z20effect_random_fillerii+0x2e> { altervoxel(x,y,z,state); d4c: 8b 2d mov r24, r11 d4e: 9a 2d mov r25, r10 d50: 6d 2d mov r22, r13 d52: 7c 2d mov r23, r12 d54: 4f 2d mov r20, r15 d56: 5e 2d mov r21, r14 d58: 98 01 movw r18, r16 d5a: 89 db rcall .-2286 ; 0x46e <_Z10altervoxeliiii> delay_ms(delay); d5c: c4 01 movw r24, r8 d5e: ab db rcall .-2218 ; 0x4b6 <_Z8delay_msj> loop++; d60: 21 96 adiw r28, 0x01 ; 1 } else { fill(0xff); } while (loop<511) d62: 81 e0 ldi r24, 0x01 ; 1 d64: cf 3f cpi r28, 0xFF ; 255 d66: d8 07 cpc r29, r24 d68: 31 f6 brne .-116 ; 0xcf6 <_Z20effect_random_fillerii+0x2e> altervoxel(x,y,z,state); delay_ms(delay); loop++; } } } d6a: df 91 pop r29 d6c: cf 91 pop r28 d6e: 1f 91 pop r17 d70: 0f 91 pop r16 d72: ff 90 pop r15 d74: ef 90 pop r14 d76: df 90 pop r13 d78: cf 90 pop r12 d7a: bf 90 pop r11 d7c: af 90 pop r10 d7e: 9f 90 pop r9 d80: 8f 90 pop r8 d82: 08 95 ret 00000d84 <_Z17sendvoxels_rand_ziii>: } } // For each coordinate along X and Y, a voxel is set either at level 0 or at level 7 // for n iterations, a random voxel is sent to the opposite side of where it was. void sendvoxels_rand_z (int iterations, int delay, int wait) d84: 6f 92 push r6 d86: 7f 92 push r7 d88: 8f 92 push r8 d8a: 9f 92 push r9 d8c: af 92 push r10 d8e: bf 92 push r11 d90: df 92 push r13 d92: ef 92 push r14 d94: ff 92 push r15 d96: 0f 93 push r16 d98: 1f 93 push r17 d9a: cf 93 push r28 d9c: df 93 push r29 d9e: 3c 01 movw r6, r24 da0: 5b 01 movw r10, r22 da2: 4a 01 movw r8, r20 { unsigned char x, y, last_x = 0, last_y = 0, i; fill(0x00); da4: 80 e0 ldi r24, 0x00 ; 0 da6: 6a db rcall .-2348 ; 0x47c <_Z4fillh> da8: 00 e0 ldi r16, 0x00 ; 0 daa: 10 e0 ldi r17, 0x00 ; 0 dac: 1c c0 rjmp .+56 ; 0xde6 <_Z17sendvoxels_rand_ziii+0x62> { for (y=0;y<8;y++) { // Then set a voxel either at the top or at the bottom // myrand()%2 returns either 0 or 1. multiplying by 7 gives either 0 or 7. setvoxel(x,y,((myrand()%2)*7)); dae: dc da rcall .-2632 ; 0x368 <_Z6myrandv> db0: 62 e0 ldi r22, 0x02 ; 2 db2: 70 e0 ldi r23, 0x00 ; 0 db4: a7 d0 rcall .+334 ; 0xf04 <__divmodhi4> db6: ac 01 movw r20, r24 db8: 33 e0 ldi r19, 0x03 ; 3 dba: 44 0f add r20, r20 dbc: 55 1f adc r21, r21 dbe: 3a 95 dec r19 dc0: e1 f7 brne .-8 ; 0xdba <_Z17sendvoxels_rand_ziii+0x36> dc2: 48 1b sub r20, r24 dc4: 59 0b sbc r21, r25 dc6: c8 01 movw r24, r16 dc8: be 01 movw r22, r28 dca: 0a db rcall .-2540 ; 0x3e0 <_Z8setvoxeliii> dcc: 21 96 adiw r28, 0x01 ; 1 fill(0x00); // Loop through all the X and Y coordinates for (x=0;x<8;x++) { for (y=0;y<8;y++) dce: c8 30 cpi r28, 0x08 ; 8 dd0: d1 05 cpc r29, r1 dd2: 69 f7 brne .-38 ; 0xdae <_Z17sendvoxels_rand_ziii+0x2a> dd4: 0f 5f subi r16, 0xFF ; 255 dd6: 1f 4f sbci r17, 0xFF ; 255 unsigned char x, y, last_x = 0, last_y = 0, i; fill(0x00); // Loop through all the X and Y coordinates for (x=0;x<8;x++) dd8: 08 30 cpi r16, 0x08 ; 8 dda: 11 05 cpc r17, r1 ddc: 21 f4 brne .+8 ; 0xde6 <_Z17sendvoxels_rand_ziii+0x62> dde: dd 24 eor r13, r13 de0: ee 24 eor r14, r14 de2: ff 24 eor r15, r15 de4: 29 c0 rjmp .+82 ; 0xe38 <_Z17sendvoxels_rand_ziii+0xb4> de6: c0 e0 ldi r28, 0x00 ; 0 de8: d0 e0 ldi r29, 0x00 ; 0 dea: e1 cf rjmp .-62 ; 0xdae <_Z17sendvoxels_rand_ziii+0x2a> } for (i=0;i dee: ec 01 movw r28, r24 y = myrand()%8; df0: bb da rcall .-2698 ; 0x368 <_Z6myrandv> df2: 68 e0 ldi r22, 0x08 ; 8 df4: 70 e0 ldi r23, 0x00 ; 0 df6: 86 d0 rcall .+268 ; 0xf04 <__divmodhi4> df8: 08 2f mov r16, r24 // but not the sameone twice in a row if (y != last_y && x != last_x) dfa: 8e 15 cp r24, r14 dfc: e1 f0 breq .+56 ; 0xe36 <_Z17sendvoxels_rand_ziii+0xb2> } for (i=0;i e06: 18 2f mov r17, r24 y = myrand()%8; // but not the sameone twice in a row if (y != last_y && x != last_x) e08: 8d 15 cp r24, r13 e0a: a9 f0 breq .+42 ; 0xe36 <_Z17sendvoxels_rand_ziii+0xb2> { // If the voxel at this x,y is at the bottom if (getvoxel(x,y,0)) e0c: 90 e0 ldi r25, 0x00 ; 0 e0e: 60 2f mov r22, r16 e10: 70 e0 ldi r23, 0x00 ; 0 e12: 40 e0 ldi r20, 0x00 ; 0 e14: 50 e0 ldi r21, 0x00 ; 0 e16: 09 db rcall .-2542 ; 0x42a <_Z8getvoxeliii> e18: 88 23 and r24, r24 e1a: 21 f0 breq .+8 ; 0xe24 <_Z17sendvoxels_rand_ziii+0xa0> { // send it to the top sendvoxel_z(x,y,0,delay); e1c: 81 2f mov r24, r17 e1e: 60 2f mov r22, r16 e20: 40 e0 ldi r20, 0x00 ; 0 e22: 03 c0 rjmp .+6 ; 0xe2a <_Z17sendvoxels_rand_ziii+0xa6> } else { // if its at the top, send it to the bottom sendvoxel_z(x,y,7,delay); e24: 81 2f mov r24, r17 e26: 60 2f mov r22, r16 e28: 47 e0 ldi r20, 0x07 ; 7 e2a: 95 01 movw r18, r10 e2c: 1b dd rcall .-1482 ; 0x864 <_Z11sendvoxel_zhhhi> } delay_ms(wait); e2e: c4 01 movw r24, r8 e30: 42 db rcall .-2428 ; 0x4b6 <_Z8delay_msj> e32: d1 2e mov r13, r17 e34: e0 2e mov r14, r16 // myrand()%2 returns either 0 or 1. multiplying by 7 gives either 0 or 7. setvoxel(x,y,((myrand()%2)*7)); } } for (i=0;i last_y = y; last_x = x; } } } e42: df 91 pop r29 e44: cf 91 pop r28 e46: 1f 91 pop r17 e48: 0f 91 pop r16 e4a: ff 90 pop r15 e4c: ef 90 pop r14 e4e: df 90 pop r13 e50: bf 90 pop r11 e52: af 90 pop r10 e54: 9f 90 pop r9 e56: 8f 90 pop r8 e58: 7f 90 pop r7 e5a: 6f 90 pop r6 e5c: 08 95 ret 00000e5e <_Z14effect_blinky2v>: setplane(plane,i); delay_ms(speed); } } void effect_blinky2() e5e: ef 92 push r14 e60: ff 92 push r15 e62: 0f 93 push r16 e64: 1f 93 push r17 e66: cf 93 push r28 e68: df 93 push r29 { int i,r; fill(0x00); e6a: 80 e0 ldi r24, 0x00 ; 0 e6c: 07 db rcall .-2546 ; 0x47c <_Z4fillh> e6e: 00 e0 ldi r16, 0x00 ; 0 e70: 10 e0 ldi r17, 0x00 ; 0 i = 750; while (i>0) { fill(0x00); delay_ms(751-i); e72: 4f ee ldi r20, 0xEF ; 239 e74: e4 2e mov r14, r20 e76: 42 e0 ldi r20, 0x02 ; 2 e78: f4 2e mov r15, r20 e7a: 3a c0 rjmp .+116 ; 0xef0 <_Z14effect_blinky2v+0x92> for (r=0;r<2;r++) { i = 750; while (i>0) { fill(0x00); e7c: 80 e0 ldi r24, 0x00 ; 0 e7e: fe da rcall .-2564 ; 0x47c <_Z4fillh> delay_ms(i); e80: ce 01 movw r24, r28 e82: 19 db rcall .-2510 ; 0x4b6 <_Z8delay_msj> fill(0xff); e84: 8f ef ldi r24, 0xFF ; 255 e86: fa da rcall .-2572 ; 0x47c <_Z4fillh> delay_ms(100); e88: 84 e6 ldi r24, 0x64 ; 100 e8a: 90 e0 ldi r25, 0x00 ; 0 e8c: 14 db rcall .-2520 ; 0x4b6 <_Z8delay_msj> i = i - (15+(1000/(i/10))); e8e: ce 01 movw r24, r28 e90: 66 ef ldi r22, 0xF6 ; 246 e92: 7f ef ldi r23, 0xFF ; 255 e94: 37 d0 rcall .+110 ; 0xf04 <__divmodhi4> e96: 88 ee ldi r24, 0xE8 ; 232 e98: 93 e0 ldi r25, 0x03 ; 3 e9a: 34 d0 rcall .+104 ; 0xf04 <__divmodhi4> e9c: 6f 50 subi r22, 0x0F ; 15 e9e: 70 40 sbci r23, 0x00 ; 0 ea0: c6 0f add r28, r22 ea2: d7 1f adc r29, r23 fill(0x00); for (r=0;r<2;r++) { i = 750; while (i>0) ea4: 1c 16 cp r1, r28 ea6: 1d 06 cpc r1, r29 ea8: 4c f3 brlt .-46 ; 0xe7c <_Z14effect_blinky2v+0x1e> delay_ms(100); i = i - (15+(1000/(i/10))); } delay_ms(1000); eaa: 88 ee ldi r24, 0xE8 ; 232 eac: 93 e0 ldi r25, 0x03 ; 3 eae: 03 db rcall .-2554 ; 0x4b6 <_Z8delay_msj> eb0: ce ee ldi r28, 0xEE ; 238 eb2: d2 e0 ldi r29, 0x02 ; 2 i = 750; while (i>0) { fill(0x00); eb4: 80 e0 ldi r24, 0x00 ; 0 eb6: e2 da rcall .-2620 ; 0x47c <_Z4fillh> delay_ms(751-i); eb8: c7 01 movw r24, r14 eba: 8c 1b sub r24, r28 ebc: 9d 0b sbc r25, r29 ebe: fb da rcall .-2570 ; 0x4b6 <_Z8delay_msj> fill(0xff); ec0: 8f ef ldi r24, 0xFF ; 255 ec2: dc da rcall .-2632 ; 0x47c <_Z4fillh> delay_ms(100); ec4: 84 e6 ldi r24, 0x64 ; 100 ec6: 90 e0 ldi r25, 0x00 ; 0 ec8: f6 da rcall .-2580 ; 0x4b6 <_Z8delay_msj> i = i - (15+(1000/(i/10))); eca: ce 01 movw r24, r28 ecc: 66 ef ldi r22, 0xF6 ; 246 ece: 7f ef ldi r23, 0xFF ; 255 ed0: 19 d0 rcall .+50 ; 0xf04 <__divmodhi4> ed2: 88 ee ldi r24, 0xE8 ; 232 ed4: 93 e0 ldi r25, 0x03 ; 3 ed6: 16 d0 rcall .+44 ; 0xf04 <__divmodhi4> ed8: 6f 50 subi r22, 0x0F ; 15 eda: 70 40 sbci r23, 0x00 ; 0 edc: c6 0f add r28, r22 ede: d7 1f adc r29, r23 } delay_ms(1000); i = 750; while (i>0) ee0: 1c 16 cp r1, r28 ee2: 1d 06 cpc r1, r29 ee4: 3c f3 brlt .-50 ; 0xeb4 <_Z14effect_blinky2v+0x56> void effect_blinky2() { int i,r; fill(0x00); for (r=0;r<2;r++) ee6: 0f 5f subi r16, 0xFF ; 255 ee8: 1f 4f sbci r17, 0xFF ; 255 eea: 02 30 cpi r16, 0x02 ; 2 eec: 11 05 cpc r17, r1 eee: 19 f0 breq .+6 ; 0xef6 <_Z14effect_blinky2v+0x98> ef0: ce ee ldi r28, 0xEE ; 238 ef2: d2 e0 ldi r29, 0x02 ; 2 ef4: c3 cf rjmp .-122 ; 0xe7c <_Z14effect_blinky2v+0x1e> i = i - (15+(1000/(i/10))); } } } ef6: df 91 pop r29 ef8: cf 91 pop r28 efa: 1f 91 pop r17 efc: 0f 91 pop r16 efe: ff 90 pop r15 f00: ef 90 pop r14 f02: 08 95 ret 00000f04 <__divmodhi4>: f04: 97 fb bst r25, 7 f06: 09 2e mov r0, r25 f08: 07 26 eor r0, r23 f0a: 0a d0 rcall .+20 ; 0xf20 <__divmodhi4_neg1> f0c: 77 fd sbrc r23, 7 f0e: 04 d0 rcall .+8 ; 0xf18 <__divmodhi4_neg2> f10: 0c d0 rcall .+24 ; 0xf2a <__udivmodhi4> f12: 06 d0 rcall .+12 ; 0xf20 <__divmodhi4_neg1> f14: 00 20 and r0, r0 f16: 1a f4 brpl .+6 ; 0xf1e <__divmodhi4_exit> 00000f18 <__divmodhi4_neg2>: f18: 70 95 com r23 f1a: 61 95 neg r22 f1c: 7f 4f sbci r23, 0xFF ; 255 00000f1e <__divmodhi4_exit>: f1e: 08 95 ret 00000f20 <__divmodhi4_neg1>: f20: f6 f7 brtc .-4 ; 0xf1e <__divmodhi4_exit> f22: 90 95 com r25 f24: 81 95 neg r24 f26: 9f 4f sbci r25, 0xFF ; 255 f28: 08 95 ret 00000f2a <__udivmodhi4>: f2a: aa 1b sub r26, r26 f2c: bb 1b sub r27, r27 f2e: 51 e1 ldi r21, 0x11 ; 17 f30: 07 c0 rjmp .+14 ; 0xf40 <__udivmodhi4_ep> 00000f32 <__udivmodhi4_loop>: f32: aa 1f adc r26, r26 f34: bb 1f adc r27, r27 f36: a6 17 cp r26, r22 f38: b7 07 cpc r27, r23 f3a: 10 f0 brcs .+4 ; 0xf40 <__udivmodhi4_ep> f3c: a6 1b sub r26, r22 f3e: b7 0b sbc r27, r23 00000f40 <__udivmodhi4_ep>: f40: 88 1f adc r24, r24 f42: 99 1f adc r25, r25 f44: 5a 95 dec r21 f46: a9 f7 brne .-22 ; 0xf32 <__udivmodhi4_loop> f48: 80 95 com r24 f4a: 90 95 com r25 f4c: bc 01 movw r22, r24 f4e: cd 01 movw r24, r26 f50: 08 95 ret 00000f52 <__prologue_saves__>: f52: 2f 92 push r2 f54: 3f 92 push r3 f56: 4f 92 push r4 f58: 5f 92 push r5 f5a: 6f 92 push r6 f5c: 7f 92 push r7 f5e: 8f 92 push r8 f60: 9f 92 push r9 f62: af 92 push r10 f64: bf 92 push r11 f66: cf 92 push r12 f68: df 92 push r13 f6a: ef 92 push r14 f6c: ff 92 push r15 f6e: 0f 93 push r16 f70: 1f 93 push r17 f72: cf 93 push r28 f74: df 93 push r29 f76: cd b7 in r28, 0x3d ; 61 f78: de b7 in r29, 0x3e ; 62 f7a: ca 1b sub r28, r26 f7c: db 0b sbc r29, r27 f7e: 0f b6 in r0, 0x3f ; 63 f80: f8 94 cli f82: de bf out 0x3e, r29 ; 62 f84: 0f be out 0x3f, r0 ; 63 f86: cd bf out 0x3d, r28 ; 61 f88: 09 94 ijmp 00000f8a <__epilogue_restores__>: f8a: 2a 88 ldd r2, Y+18 ; 0x12 f8c: 39 88 ldd r3, Y+17 ; 0x11 f8e: 48 88 ldd r4, Y+16 ; 0x10 f90: 5f 84 ldd r5, Y+15 ; 0x0f f92: 6e 84 ldd r6, Y+14 ; 0x0e f94: 7d 84 ldd r7, Y+13 ; 0x0d f96: 8c 84 ldd r8, Y+12 ; 0x0c f98: 9b 84 ldd r9, Y+11 ; 0x0b f9a: aa 84 ldd r10, Y+10 ; 0x0a f9c: b9 84 ldd r11, Y+9 ; 0x09 f9e: c8 84 ldd r12, Y+8 ; 0x08 fa0: df 80 ldd r13, Y+7 ; 0x07 fa2: ee 80 ldd r14, Y+6 ; 0x06 fa4: fd 80 ldd r15, Y+5 ; 0x05 fa6: 0c 81 ldd r16, Y+4 ; 0x04 fa8: 1b 81 ldd r17, Y+3 ; 0x03 faa: aa 81 ldd r26, Y+2 ; 0x02 fac: b9 81 ldd r27, Y+1 ; 0x01 fae: ce 0f add r28, r30 fb0: d1 1d adc r29, r1 fb2: 0f b6 in r0, 0x3f ; 63 fb4: f8 94 cli fb6: de bf out 0x3e, r29 ; 62 fb8: 0f be out 0x3f, r0 ; 63 fba: cd bf out 0x3d, r28 ; 61 fbc: ed 01 movw r28, r26 fbe: 08 95 ret 00000fc0 : fc0: a0 e0 ldi r26, 0x00 ; 0 fc2: b0 e0 ldi r27, 0x00 ; 0 fc4: e5 ee ldi r30, 0xE5 ; 229 fc6: f7 e0 ldi r31, 0x07 ; 7 fc8: cc cf rjmp .-104 ; 0xf62 <__prologue_saves__+0x10> fca: ec 01 movw r28, r24 fcc: a8 80 ld r10, Y fce: b9 80 ldd r11, Y+1 ; 0x01 fd0: ca 80 ldd r12, Y+2 ; 0x02 fd2: db 80 ldd r13, Y+3 ; 0x03 fd4: a1 14 cp r10, r1 fd6: b1 04 cpc r11, r1 fd8: c1 04 cpc r12, r1 fda: d1 04 cpc r13, r1 fdc: 41 f4 brne .+16 ; 0xfee fde: 84 e2 ldi r24, 0x24 ; 36 fe0: a8 2e mov r10, r24 fe2: 89 ed ldi r24, 0xD9 ; 217 fe4: b8 2e mov r11, r24 fe6: 8b e5 ldi r24, 0x5B ; 91 fe8: c8 2e mov r12, r24 fea: 87 e0 ldi r24, 0x07 ; 7 fec: d8 2e mov r13, r24 fee: c6 01 movw r24, r12 ff0: b5 01 movw r22, r10 ff2: 2d e1 ldi r18, 0x1D ; 29 ff4: 33 ef ldi r19, 0xF3 ; 243 ff6: 41 e0 ldi r20, 0x01 ; 1 ff8: 50 e0 ldi r21, 0x00 ; 0 ffa: 5a d0 rcall .+180 ; 0x10b0 <__divmodsi4> ffc: 27 ea ldi r18, 0xA7 ; 167 ffe: 31 e4 ldi r19, 0x41 ; 65 1000: 40 e0 ldi r20, 0x00 ; 0 1002: 50 e0 ldi r21, 0x00 ; 0 1004: 36 d0 rcall .+108 ; 0x1072 <__mulsi3> 1006: 7b 01 movw r14, r22 1008: 8c 01 movw r16, r24 100a: c6 01 movw r24, r12 100c: b5 01 movw r22, r10 100e: 2d e1 ldi r18, 0x1D ; 29 1010: 33 ef ldi r19, 0xF3 ; 243 1012: 41 e0 ldi r20, 0x01 ; 1 1014: 50 e0 ldi r21, 0x00 ; 0 1016: 4c d0 rcall .+152 ; 0x10b0 <__divmodsi4> 1018: ca 01 movw r24, r20 101a: b9 01 movw r22, r18 101c: 2c ee ldi r18, 0xEC ; 236 101e: 34 ef ldi r19, 0xF4 ; 244 1020: 4f ef ldi r20, 0xFF ; 255 1022: 5f ef ldi r21, 0xFF ; 255 1024: 26 d0 rcall .+76 ; 0x1072 <__mulsi3> 1026: 6e 0d add r22, r14 1028: 7f 1d adc r23, r15 102a: 80 1f adc r24, r16 102c: 91 1f adc r25, r17 102e: 97 ff sbrs r25, 7 1030: 04 c0 rjmp .+8 ; 0x103a 1032: 61 50 subi r22, 0x01 ; 1 1034: 70 40 sbci r23, 0x00 ; 0 1036: 80 40 sbci r24, 0x00 ; 0 1038: 90 48 sbci r25, 0x80 ; 128 103a: 68 83 st Y, r22 103c: 79 83 std Y+1, r23 ; 0x01 103e: 8a 83 std Y+2, r24 ; 0x02 1040: 9b 83 std Y+3, r25 ; 0x03 1042: 9b 01 movw r18, r22 1044: 3f 77 andi r19, 0x7F ; 127 1046: c9 01 movw r24, r18 1048: cd b7 in r28, 0x3d ; 61 104a: de b7 in r29, 0x3e ; 62 104c: ea e0 ldi r30, 0x0A ; 10 104e: a5 cf rjmp .-182 ; 0xf9a <__epilogue_restores__+0x10> 00001050 : 1050: b7 df rcall .-146 ; 0xfc0 1052: 08 95 ret 00001054 : 1054: 80 e6 ldi r24, 0x60 ; 96 1056: 90 e0 ldi r25, 0x00 ; 0 1058: b3 df rcall .-154 ; 0xfc0 105a: 08 95 ret 0000105c : 105c: a0 e0 ldi r26, 0x00 ; 0 105e: b0 e0 ldi r27, 0x00 ; 0 1060: 80 93 60 00 sts 0x0060, r24 1064: 90 93 61 00 sts 0x0061, r25 1068: a0 93 62 00 sts 0x0062, r26 106c: b0 93 63 00 sts 0x0063, r27 1070: 08 95 ret 00001072 <__mulsi3>: 1072: 62 9f mul r22, r18 1074: d0 01 movw r26, r0 1076: 73 9f mul r23, r19 1078: f0 01 movw r30, r0 107a: 82 9f mul r24, r18 107c: e0 0d add r30, r0 107e: f1 1d adc r31, r1 1080: 64 9f mul r22, r20 1082: e0 0d add r30, r0 1084: f1 1d adc r31, r1 1086: 92 9f mul r25, r18 1088: f0 0d add r31, r0 108a: 83 9f mul r24, r19 108c: f0 0d add r31, r0 108e: 74 9f mul r23, r20 1090: f0 0d add r31, r0 1092: 65 9f mul r22, r21 1094: f0 0d add r31, r0 1096: 99 27 eor r25, r25 1098: 72 9f mul r23, r18 109a: b0 0d add r27, r0 109c: e1 1d adc r30, r1 109e: f9 1f adc r31, r25 10a0: 63 9f mul r22, r19 10a2: b0 0d add r27, r0 10a4: e1 1d adc r30, r1 10a6: f9 1f adc r31, r25 10a8: bd 01 movw r22, r26 10aa: cf 01 movw r24, r30 10ac: 11 24 eor r1, r1 10ae: 08 95 ret 000010b0 <__divmodsi4>: 10b0: 97 fb bst r25, 7 10b2: 09 2e mov r0, r25 10b4: 05 26 eor r0, r21 10b6: 0e d0 rcall .+28 ; 0x10d4 <__divmodsi4_neg1> 10b8: 57 fd sbrc r21, 7 10ba: 04 d0 rcall .+8 ; 0x10c4 <__divmodsi4_neg2> 10bc: 14 d0 rcall .+40 ; 0x10e6 <__udivmodsi4> 10be: 0a d0 rcall .+20 ; 0x10d4 <__divmodsi4_neg1> 10c0: 00 1c adc r0, r0 10c2: 38 f4 brcc .+14 ; 0x10d2 <__divmodsi4_exit> 000010c4 <__divmodsi4_neg2>: 10c4: 50 95 com r21 10c6: 40 95 com r20 10c8: 30 95 com r19 10ca: 21 95 neg r18 10cc: 3f 4f sbci r19, 0xFF ; 255 10ce: 4f 4f sbci r20, 0xFF ; 255 10d0: 5f 4f sbci r21, 0xFF ; 255 000010d2 <__divmodsi4_exit>: 10d2: 08 95 ret 000010d4 <__divmodsi4_neg1>: 10d4: f6 f7 brtc .-4 ; 0x10d2 <__divmodsi4_exit> 10d6: 90 95 com r25 10d8: 80 95 com r24 10da: 70 95 com r23 10dc: 61 95 neg r22 10de: 7f 4f sbci r23, 0xFF ; 255 10e0: 8f 4f sbci r24, 0xFF ; 255 10e2: 9f 4f sbci r25, 0xFF ; 255 10e4: 08 95 ret 000010e6 <__udivmodsi4>: 10e6: a1 e2 ldi r26, 0x21 ; 33 10e8: 1a 2e mov r1, r26 10ea: aa 1b sub r26, r26 10ec: bb 1b sub r27, r27 10ee: fd 01 movw r30, r26 10f0: 0d c0 rjmp .+26 ; 0x110c <__udivmodsi4_ep> 000010f2 <__udivmodsi4_loop>: 10f2: aa 1f adc r26, r26 10f4: bb 1f adc r27, r27 10f6: ee 1f adc r30, r30 10f8: ff 1f adc r31, r31 10fa: a2 17 cp r26, r18 10fc: b3 07 cpc r27, r19 10fe: e4 07 cpc r30, r20 1100: f5 07 cpc r31, r21 1102: 20 f0 brcs .+8 ; 0x110c <__udivmodsi4_ep> 1104: a2 1b sub r26, r18 1106: b3 0b sbc r27, r19 1108: e4 0b sbc r30, r20 110a: f5 0b sbc r31, r21 0000110c <__udivmodsi4_ep>: 110c: 66 1f adc r22, r22 110e: 77 1f adc r23, r23 1110: 88 1f adc r24, r24 1112: 99 1f adc r25, r25 1114: 1a 94 dec r1 1116: 69 f7 brne .-38 ; 0x10f2 <__udivmodsi4_loop> 1118: 60 95 com r22 111a: 70 95 com r23 111c: 80 95 com r24 111e: 90 95 com r25 1120: 9b 01 movw r18, r22 1122: ac 01 movw r20, r24 1124: bd 01 movw r22, r26 1126: cf 01 movw r24, r30 1128: 08 95 ret 0000112a <_exit>: 112a: f8 94 cli 0000112c <__stop_program>: 112c: ff cf rjmp .-2 ; 0x112c <__stop_program>