
photo_tropic_atmega8_mini.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000000b8  00000000  00000000  00000054  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .debug_aranges 00000020  00000000  00000000  0000010c  2**0
                  CONTENTS, READONLY, DEBUGGING
  2 .debug_pubnames 0000001b  00000000  00000000  0000012c  2**0
                  CONTENTS, READONLY, DEBUGGING
  3 .debug_info   00000091  00000000  00000000  00000147  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_abbrev 0000005b  00000000  00000000  000001d8  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_line   000000e5  00000000  00000000  00000233  2**0
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_frame  00000020  00000000  00000000  00000318  2**2
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_str    000000af  00000000  00000000  00000338  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_loc    00000028  00000000  00000000  000003e7  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:	2a c0       	rjmp	.+84     	; 0x5c <__bad_interrupt>
   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:	24 c0       	rjmp	.+72     	; 0x5c <__bad_interrupt>
  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_copy_data>:
  32:	10 e0       	ldi	r17, 0x00	; 0
  34:	a0 e6       	ldi	r26, 0x60	; 96
  36:	b0 e0       	ldi	r27, 0x00	; 0
  38:	e8 eb       	ldi	r30, 0xB8	; 184
  3a:	f0 e0       	ldi	r31, 0x00	; 0
  3c:	02 c0       	rjmp	.+4      	; 0x42 <.do_copy_data_start>

0000003e <.do_copy_data_loop>:
  3e:	05 90       	lpm	r0, Z+
  40:	0d 92       	st	X+, r0

00000042 <.do_copy_data_start>:
  42:	a0 36       	cpi	r26, 0x60	; 96
  44:	b1 07       	cpc	r27, r17
  46:	d9 f7       	brne	.-10     	; 0x3e <.do_copy_data_loop>

00000048 <__do_clear_bss>:
  48:	10 e0       	ldi	r17, 0x00	; 0
  4a:	a0 e6       	ldi	r26, 0x60	; 96
  4c:	b0 e0       	ldi	r27, 0x00	; 0
  4e:	01 c0       	rjmp	.+2      	; 0x52 <.do_clear_bss_start>

00000050 <.do_clear_bss_loop>:
  50:	1d 92       	st	X+, r1

00000052 <.do_clear_bss_start>:
  52:	a0 36       	cpi	r26, 0x60	; 96
  54:	b1 07       	cpc	r27, r17
  56:	e1 f7       	brne	.-8      	; 0x50 <.do_clear_bss_loop>
  58:	02 d0       	rcall	.+4      	; 0x5e <main>
  5a:	2c c0       	rjmp	.+88     	; 0xb4 <_exit>

0000005c <__bad_interrupt>:
  5c:	d1 cf       	rjmp	.-94     	; 0x0 <__vectors>

0000005e <main>:
#include<avr/io.h>


void main()
{
	DDRC=0b0000000;     //set PORTC as input port
  5e:	14 ba       	out	0x14, r1	; 20
	DDRB=0b00011110;    //PB1, PB2, PB3, PB4 as output port
  60:	8e e1       	ldi	r24, 0x1E	; 30
  62:	87 bb       	out	0x17, r24	; 23
	ls=(PINC&0b0000001); //acquire only left sensor status connected at PC0
	rs=(PINC&0b0001000); // acquire only right sensor status connected at PC3
		
	if((ls==0b0000001)&(rs==0b0001000)) //check sensor status for both sensor ON
		{
			PORTB=0b00010010;           //move forward
  64:	a2 e1       	ldi	r26, 0x12	; 18

		if((ls==0b0000001)&(rs==0b0000000))  //check sensor status for left sensor=ON and right sensor=OFF
		                                    
		{
			
			PORTB=0b00000010;                //turn left
  66:	f2 e0       	ldi	r31, 0x02	; 2
		if((ls==0b0000000)&(rs==0b0001000)) //check sensor status for left sensor=OFF and right sensor=ON
		                                   
		{
			
			
			PORTB=0b00010000;               //turn right
  68:	e0 e1       	ldi	r30, 0x10	; 16
	DDRB=0b00011110;    //PB1, PB2, PB3, PB4 as output port
    int ls=0, rs=0;     // define & initialize ls, rs integer as 0 to  acquire the left sensor status in ls and right sensor status in rs
 
	while(1)            // create infinite loop
	{
	ls=(PINC&0b0000001); //acquire only left sensor status connected at PC0
  6a:	83 b3       	in	r24, 0x13	; 19
  6c:	90 e0       	ldi	r25, 0x00	; 0
	rs=(PINC&0b0001000); // acquire only right sensor status connected at PC3
  6e:	23 b3       	in	r18, 0x13	; 19
  70:	30 e0       	ldi	r19, 0x00	; 0
  72:	28 70       	andi	r18, 0x08	; 8
  74:	30 70       	andi	r19, 0x00	; 0
		
	if((ls==0b0000001)&(rs==0b0001000)) //check sensor status for both sensor ON
  76:	40 e0       	ldi	r20, 0x00	; 0
  78:	bc 01       	movw	r22, r24
  7a:	61 70       	andi	r22, 0x01	; 1
  7c:	70 70       	andi	r23, 0x00	; 0
  7e:	80 fd       	sbrc	r24, 0
  80:	41 e0       	ldi	r20, 0x01	; 1
  82:	50 e0       	ldi	r21, 0x00	; 0
  84:	28 30       	cpi	r18, 0x08	; 8
  86:	31 05       	cpc	r19, r1
  88:	09 f4       	brne	.+2      	; 0x8c <main+0x2e>
  8a:	51 e0       	ldi	r21, 0x01	; 1
  8c:	44 23       	and	r20, r20
  8e:	11 f0       	breq	.+4      	; 0x94 <main+0x36>
  90:	51 11       	cpse	r21, r1
		{
			PORTB=0b00010010;           //move forward
  92:	a8 bb       	out	0x18, r26	; 24
			
		}

		if((ls==0b0000001)&(rs==0b0000000))  //check sensor status for left sensor=ON and right sensor=OFF
  94:	80 e0       	ldi	r24, 0x00	; 0
  96:	23 2b       	or	r18, r19
  98:	09 f4       	brne	.+2      	; 0x9c <main+0x3e>
  9a:	81 e0       	ldi	r24, 0x01	; 1
  9c:	44 23       	and	r20, r20
  9e:	11 f0       	breq	.+4      	; 0xa4 <main+0x46>
  a0:	81 11       	cpse	r24, r1
		                                    
		{
			
			PORTB=0b00000010;                //turn left
  a2:	f8 bb       	out	0x18, r31	; 24
		
		}
		
		if((ls==0b0000000)&(rs==0b0001000)) //check sensor status for left sensor=OFF and right sensor=ON
  a4:	67 2b       	or	r22, r23
  a6:	09 f7       	brne	.-62     	; 0x6a <main+0xc>
  a8:	51 11       	cpse	r21, r1
		                                   
		{
			
			
			PORTB=0b00010000;               //turn right
  aa:	e8 bb       	out	0x18, r30	; 24
			
			
		}
        if((ls==0b0000000)&(rs==0b0000000)) //check sensor status for both sensor OFF
  ac:	88 23       	and	r24, r24
  ae:	e9 f2       	breq	.-70     	; 0x6a <main+0xc>
		{
			PORTB=0b00000000;               //stop
  b0:	18 ba       	out	0x18, r1	; 24
  b2:	db cf       	rjmp	.-74     	; 0x6a <main+0xc>

000000b4 <_exit>:
  b4:	f8 94       	cli

000000b6 <__stop_program>:
  b6:	ff cf       	rjmp	.-2      	; 0xb6 <__stop_program>
