;In the Name of Allah ;Calculating the Difference Between the Value of Port A and the Value of Port B .EQU PINA=0x19 .EQU DDRA=0x1A ;----- .EQU PINB=0x16 .EQU DDRB=0x17 ;----- .EQU PORTC=0x15 .EQU DDRC=0x14 ;----- LDI R16,0X00 LDI R17,0XFF OUT DDRA,R16 OUT DDRB,R16 OUT DDRC,R17 LOOP: IN R16,PINA IN R17,PINB SUB R16,17 OUT PORTC,R16 RJMP LOOP