a.out: file format elf32-avr Sections: Idx Name Size VMA LMA File off Algn 0 .text 0000009a 00000000 00000000 00000074 2**1 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000000 00800060 0000009a 0000010e 2**0 CONTENTS, ALLOC, LOAD, DATA 2 .comment 00000026 00000000 00000000 0000010e 2**0 CONTENTS, READONLY 3 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00000134 2**2 CONTENTS, READONLY, OCTETS 4 .debug_aranges 00000048 00000000 00000000 00000170 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 5 .debug_info 00000506 00000000 00000000 000001b8 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 6 .debug_abbrev 0000049a 00000000 00000000 000006be 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 7 .debug_line 0000017c 00000000 00000000 00000b58 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 8 .debug_frame 00000044 00000000 00000000 00000cd4 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 9 .debug_str 00000279 00000000 00000000 00000d18 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 10 .debug_ranges 00000018 00000000 00000000 00000f91 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS Disassembly of section .text: 00000000 <__vectors>: 0: 0e c0 rjmp .+28 ; 0x1e <__ctors_end> 2: 15 c0 rjmp .+42 ; 0x2e <__bad_interrupt> 4: 14 c0 rjmp .+40 ; 0x2e <__bad_interrupt> 6: 13 c0 rjmp .+38 ; 0x2e <__bad_interrupt> 8: 12 c0 rjmp .+36 ; 0x2e <__bad_interrupt> a: 11 c0 rjmp .+34 ; 0x2e <__bad_interrupt> c: 10 c0 rjmp .+32 ; 0x2e <__bad_interrupt> e: 0f c0 rjmp .+30 ; 0x2e <__bad_interrupt> 10: 0e c0 rjmp .+28 ; 0x2e <__bad_interrupt> 12: 0d c0 rjmp .+26 ; 0x2e <__bad_interrupt> 14: 0c c0 rjmp .+24 ; 0x2e <__bad_interrupt> 16: 0b c0 rjmp .+22 ; 0x2e <__bad_interrupt> 18: 0a c0 rjmp .+20 ; 0x2e <__bad_interrupt> 1a: 09 c0 rjmp .+18 ; 0x2e <__bad_interrupt> 1c: 08 c0 rjmp .+16 ; 0x2e <__bad_interrupt> 0000001e <__ctors_end>: 1e: 11 24 eor r1, r1 20: 1f be out 0x3f, r1 ; 63 22: cf e5 ldi r28, 0x5F ; 95 24: d1 e0 ldi r29, 0x01 ; 1 26: de bf out 0x3e, r29 ; 62 28: cd bf out 0x3d, r28 ; 61 2a: 27 d0 rcall .+78 ; 0x7a
2c: 34 c0 rjmp .+104 ; 0x96 <_exit> 0000002e <__bad_interrupt>: 2e: e8 cf rjmp .-48 ; 0x0 <__vectors> 00000030 : //10.4.3 DDRB – Port B Data Direction Register #define DDRB *((volatile unsigned char*) 0x37) //(0x20 + 0x17) #define LED_PIN 3 void delay(volatile long time) { 30: cf 93 push r28 32: df 93 push r29 34: 00 d0 rcall .+0 ; 0x36 00000036 : 36: 00 d0 rcall .+0 ; 0x38 00000038 : 38: cd b7 in r28, 0x3d ; 61 3a: de b7 in r29, 0x3e ; 62 3c: 69 83 std Y+1, r22 ; 0x01 3e: 7a 83 std Y+2, r23 ; 0x02 40: 8b 83 std Y+3, r24 ; 0x03 42: 9c 83 std Y+4, r25 ; 0x04 00000044 <.L2>: while (time != 0) { 44: 89 81 ldd r24, Y+1 ; 0x01 46: 9a 81 ldd r25, Y+2 ; 0x02 48: ab 81 ldd r26, Y+3 ; 0x03 4a: bc 81 ldd r27, Y+4 ; 0x04 0000004c <.Loc.5>: 4c: 89 2b or r24, r25 4e: 8a 2b or r24, r26 50: 8b 2b or r24, r27 52: 39 f4 brne .+14 ; 0x62 <.L3> 00000054 <.Loc.6>: time--; } } 54: 0f 90 pop r0 56: 0f 90 pop r0 58: 0f 90 pop r0 5a: 0f 90 pop r0 5c: df 91 pop r29 5e: cf 91 pop r28 60: 08 95 ret 00000062 <.L3>: time--; 62: 89 81 ldd r24, Y+1 ; 0x01 64: 9a 81 ldd r25, Y+2 ; 0x02 66: ab 81 ldd r26, Y+3 ; 0x03 68: bc 81 ldd r27, Y+4 ; 0x04 6a: 01 97 sbiw r24, 0x01 ; 1 6c: a1 09 sbc r26, r1 6e: b1 09 sbc r27, r1 70: 89 83 std Y+1, r24 ; 0x01 72: 9a 83 std Y+2, r25 ; 0x02 74: ab 83 std Y+3, r26 ; 0x03 76: bc 83 std Y+4, r27 ; 0x04 78: e5 cf rjmp .-54 ; 0x44 <.L2> 0000007a
: int main() { DDRB |= (1<: //PORT &= ~(1<: delay(50000); 7e: 60 e5 ldi r22, 0x50 ; 80 80: 73 ec ldi r23, 0xC3 ; 195 82: 80 e0 ldi r24, 0x00 ; 0 84: 90 e0 ldi r25, 0x00 ; 0 86: d4 df rcall .-88 ; 0x30 00000088 <.LVL1>: PORTB &= ~(1<: delay(50000); 8a: 60 e5 ldi r22, 0x50 ; 80 8c: 73 ec ldi r23, 0xC3 ; 195 8e: 80 e0 ldi r24, 0x00 ; 0 90: 90 e0 ldi r25, 0x00 ; 0 92: ce df rcall .-100 ; 0x30 00000094 <.LVL2>: while (1) { 94: f3 cf rjmp .-26 ; 0x7c <.L5> 00000096 <_exit>: 96: f8 94 cli 00000098 <__stop_program>: 98: ff cf rjmp .-2 ; 0x98 <__stop_program>