,i am trying to solve this already a copal days with no luck 'can someone help me ?
i need to convert the code from c to asm
`
# define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>
asm volatile(".equ DDRD, 0x0A;\n"
".equ PORTD, 0x0B;\n"
".equ DDRB, 0x04;\n"
".equ PORTB, 0x05;\n");
int main()
{
// Reset direction of PORTD:
//(assembler command: CLR)
DDRD = 0;
// Reset PORTD (disable Tx & Rx LEDs)
//(assembler command: CLR)
PORTD = 0;
// Reset PORTB
// (assembler command: CLR)
PORTB = 0;
// Set pin 1 of PORTD for output (LED):
// (assembler command: SBR)
//DDRD |= 0x01;
asm("LDI R16, 0x01\n");
asm("OUT DDRD, R16\n");
while(1)
{
// Don't convert this line!!!:
while(PINB & (0x01));
//Turn LED on/off:
PORTD ^= 0x01;
// Delay controls the blinking frequency:
_delay_ms(500);
}
}
`