I want to convert my C program to a AVR Assembly program thats converts the decimal number into a binary number. This program is specified for the Atmega32a. Can someone help me ? Thankyou. This is the program that i need to convert to Asssembly:
int main()
{
int num, bin = 0, rem = 0, place = 1;
printf("Enter a decimal number\n");
scanf("%d", &num);
printf("\nBinary equivalent of %d is ", num);
while(num)
{
rem = num % 2;
num = num / 2;
bin = bin + (rem * place);
place = place * 10;
}
printf("%d\n", bin);
return 0;
}