convert form c to assembly

Status
Not open for further replies.

Eng.ME

Newbie level 4
Joined
Jan 5, 2010
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Palestine-Gaza
Activity points
1,328
Can any one convert this c code to assembly code .. i'm using this code with pic16f877a ....

##################################
unsigned int Digital;
unsigned float A;
unsigned char txt[13];

void main()
{
Lcd_Config(&PORTB,0,2,1,7,6,5,4);
Lcd_Cmd(LCD_CURSOR_OFF);
//##############################
lcd_out(1,1,"Volt: ");

TRISA.f0=1; // INPUT ANALOG
ADCON1=4; // RA0 & RA1 ARE ANALOGS
do
{
Digital = Adc_Read(1); // READ FROM RA0
delay_ms(20); // sampling time = 20 ms

A=(Digital*5.0)/1023;
FloatToStr(A,txt); // convert the number to ascii code
lcd_out(1,6,txt);
}while(1);

}

Added after 20 minutes:

Help me plz
 

Just click on the "Disassembly Listing" in the view menu of Mplab
 

Hi,
From what it seems to me, that C code is from mikroC, right?
In that case, under the View menu, there is an option called "View Assembly". Click that and you can see the assembly code although it is almost incomprehensible. There is a converter online (free, I can't seem to remember the name) which converts this "scrambled" piece of asm to proper readable asm.
Hope it helped.
Tahmid.
 

Tahmid said:
Hi,
From what it seems to me, that C code is from mikroC, right?
Tahmid.

Oh sorry.
I didn't noted the code.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…