Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top