15cmZahl.elf: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn 0 .text 000000ec 00000000 00000000 00000094 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000010 00800060 000000ec 00000180 2**0 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000002 00800070 00800070 00000190 2**0 ALLOC 3 .stab 000006b4 00000000 00000000 00000190 2**2 CONTENTS, READONLY, DEBUGGING 4 .stabstr 00000085 00000000 00000000 00000844 2**0 CONTENTS, READONLY, DEBUGGING 5 .debug_aranges 00000020 00000000 00000000 000008c9 2**0 CONTENTS, READONLY, DEBUGGING 6 .debug_pubnames 00000053 00000000 00000000 000008e9 2**0 CONTENTS, READONLY, DEBUGGING 7 .debug_info 000002ec 00000000 00000000 0000093c 2**0 CONTENTS, READONLY, DEBUGGING 8 .debug_abbrev 0000018e 00000000 00000000 00000c28 2**0 CONTENTS, READONLY, DEBUGGING 9 .debug_line 0000023c 00000000 00000000 00000db6 2**0 CONTENTS, READONLY, DEBUGGING 10 .debug_frame 00000050 00000000 00000000 00000ff4 2**2 CONTENTS, READONLY, DEBUGGING 11 .debug_str 000000f8 00000000 00000000 00001044 2**0 CONTENTS, READONLY, DEBUGGING 12 .debug_loc 0000015f 00000000 00000000 0000113c 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_pubtypes 0000002b 00000000 00000000 0000129b 2**0 CONTENTS, READONLY, DEBUGGING 14 .debug_ranges 00000030 00000000 00000000 000012c6 2**0 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 00000000 <__vectors>: 0: 12 c0 rjmp .+36 ; 0x26 <__ctors_end> 2: 2a c0 rjmp .+84 ; 0x58 <__bad_interrupt> 4: 29 c0 rjmp .+82 ; 0x58 <__bad_interrupt> 6: 28 c0 rjmp .+80 ; 0x58 <__bad_interrupt> 8: 27 c0 rjmp .+78 ; 0x58 <__bad_interrupt> a: 26 c0 rjmp .+76 ; 0x58 <__bad_interrupt> c: 25 c0 rjmp .+74 ; 0x58 <__bad_interrupt> e: 24 c0 rjmp .+72 ; 0x58 <__bad_interrupt> 10: 23 c0 rjmp .+70 ; 0x58 <__bad_interrupt> 12: 22 c0 rjmp .+68 ; 0x58 <__bad_interrupt> 14: 21 c0 rjmp .+66 ; 0x58 <__bad_interrupt> 16: 20 c0 rjmp .+64 ; 0x58 <__bad_interrupt> 18: 1f c0 rjmp .+62 ; 0x58 <__bad_interrupt> 1a: 1e c0 rjmp .+60 ; 0x58 <__bad_interrupt> 1c: 1d c0 rjmp .+58 ; 0x58 <__bad_interrupt> 1e: 1c c0 rjmp .+56 ; 0x58 <__bad_interrupt> 20: 1b c0 rjmp .+54 ; 0x58 <__bad_interrupt> 22: 1a c0 rjmp .+52 ; 0x58 <__bad_interrupt> 24: 19 c0 rjmp .+50 ; 0x58 <__bad_interrupt> 00000026 <__ctors_end>: 26: 11 24 eor r1, r1 28: 1f be out 0x3f, r1 ; 63 2a: cf ed ldi r28, 0xDF ; 223 2c: cd bf out 0x3d, r28 ; 61 0000002e <__do_copy_data>: 2e: 10 e0 ldi r17, 0x00 ; 0 30: a0 e6 ldi r26, 0x60 ; 96 32: b0 e0 ldi r27, 0x00 ; 0 34: ec ee ldi r30, 0xEC ; 236 36: f0 e0 ldi r31, 0x00 ; 0 38: 02 c0 rjmp .+4 ; 0x3e <__SP_H__> 3a: 05 90 lpm r0, Z+ 3c: 0d 92 st X+, r0 3e: a0 37 cpi r26, 0x70 ; 112 40: b1 07 cpc r27, r17 42: d9 f7 brne .-10 ; 0x3a <__CCP__+0x6> 00000044 <__do_clear_bss>: 44: 10 e0 ldi r17, 0x00 ; 0 46: a0 e7 ldi r26, 0x70 ; 112 48: b0 e0 ldi r27, 0x00 ; 0 4a: 01 c0 rjmp .+2 ; 0x4e <.do_clear_bss_start> 0000004c <.do_clear_bss_loop>: 4c: 1d 92 st X+, r1 0000004e <.do_clear_bss_start>: 4e: a2 37 cpi r26, 0x72 ; 114 50: b1 07 cpc r27, r17 52: e1 f7 brne .-8 ; 0x4c <.do_clear_bss_loop> 54: 3d d0 rcall .+122 ; 0xd0
56: 48 c0 rjmp .+144 ; 0xe8 <_exit> 00000058 <__bad_interrupt>: 58: d3 cf rjmp .-90 ; 0x0 <__vectors> 0000005a : volatile uint8_t segs[16] = {S0,S1,S2,S3,S4,S5,S6,S7,S8,S9,Sa,Sb,Sc,Sd,Se,Sf}; volatile uint8_t ind = 0; volatile uint8_t dim = 0; void show() { uint8_t i = ind; 5a: e0 91 70 00 lds r30, 0x0070 uint8_t j = dim; 5e: 60 91 71 00 lds r22, 0x0071 62: 44 e1 ldi r20, 0x14 ; 20 for(uint8_t l=0;l<20;l++) { for(uint8_t k=0;k void show() { uint8_t i = ind; uint8_t j = dim; for(uint8_t l=0;l<20;l++) { for(uint8_t k=0;k 7e: 00 c0 rjmp .+0 ; 0x80 void show() { uint8_t i = ind; uint8_t j = dim; for(uint8_t l=0;l<20;l++) { for(uint8_t k=0;k 86: 50 e0 ldi r21, 0x00 ; 0 88: 06 c0 rjmp .+12 ; 0x96 PORTB = segs[i]; _delay_us(1); } for(uint8_t k=0;k<255-j;k++) { PORTB = 0; 8a: 18 ba out 0x18, r1 ; 24 8c: 26 e0 ldi r18, 0x06 ; 6 8e: 2a 95 dec r18 90: f1 f7 brne .-4 ; 0x8e 92: 00 c0 rjmp .+0 ; 0x94 for(uint8_t l=0;l<20;l++) { for(uint8_t k=0;k a0: 41 50 subi r20, 0x01 ; 1 volatile uint8_t dim = 0; void show() { uint8_t i = ind; uint8_t j = dim; for(uint8_t l=0;l<20;l++) { a2: 11 f0 breq .+4 ; 0xa8 volatile uint8_t segs[16] = {S0,S1,S2,S3,S4,S5,S6,S7,S8,S9,Sa,Sb,Sc,Sd,Se,Sf}; volatile uint8_t ind = 0; volatile uint8_t dim = 0; void show() { a4: 20 e0 ldi r18, 0x00 ; 0 a6: ed cf rjmp .-38 ; 0x82 a8: 08 95 ret 000000aa : _delay_us(1); } } } void dimup() { aa: 1f 93 push r17 for(uint8_t j=0;j<250;j++) { ac: 10 e0 ldi r17, 0x00 ; 0 dim = j; ae: 10 93 71 00 sts 0x0071, r17 show(); b2: d3 df rcall .-90 ; 0x5a } } void dimup() { for(uint8_t j=0;j<250;j++) { b4: 1f 5f subi r17, 0xFF ; 255 b6: 1a 3f cpi r17, 0xFA ; 250 b8: d1 f7 brne .-12 ; 0xae dim = j; show(); } } ba: 1f 91 pop r17 bc: 08 95 ret 000000be : void dimdown() { be: 1f 93 push r17 for(uint8_t i=250;i>0;i--) { c0: 1a ef ldi r17, 0xFA ; 250 dim = i; c2: 10 93 71 00 sts 0x0071, r17 show(); c6: c9 df rcall .-110 ; 0x5a show(); } } void dimdown() { for(uint8_t i=250;i>0;i--) { c8: 11 50 subi r17, 0x01 ; 1 ca: d9 f7 brne .-10 ; 0xc2 dim = i; show(); } } cc: 1f 91 pop r17 ce: 08 95 ret 000000d0
: int main(void) { d0: 1f 93 push r17 DDRB = 0b01111111; d2: 8f e7 ldi r24, 0x7F ; 127 d4: 87 bb out 0x17, r24 ; 23 //dim = 1; while(1){ for(uint8_t i=0;i<16;i++) { d6: 10 e0 ldi r17, 0x00 ; 0 ind = i; d8: 10 93 70 00 sts 0x0070, r17 dimup(); dc: e6 df rcall .-52 ; 0xaa dimdown(); de: ef df rcall .-34 ; 0xbe int main(void) { DDRB = 0b01111111; //dim = 1; while(1){ for(uint8_t i=0;i<16;i++) { e0: 1f 5f subi r17, 0xFF ; 255 e2: 10 31 cpi r17, 0x10 ; 16 e4: c0 f7 brcc .-16 ; 0xd6 e6: f8 cf rjmp .-16 ; 0xd8 000000e8 <_exit>: e8: f8 94 cli 000000ea <__stop_program>: ea: ff cf rjmp .-2 ; 0xea <__stop_program>