Help with translating C code into assembler code


Posted on 16th Feb 2014 07:03 pm by admin

Hi im doing a project that moves a robot around a maze avoiding walls and need some help with converting C code into assembly code.



Did you know?Explore Trending and Topic pages for more stories like this.

#include
int left_feeler;
int right_feeler
int left_speed;
in right_speed;

void main ()
{
While (1)
{
printf(" left feeler=");
scanf( "%d/n", &left_feeler);
printf(" right feeler=");
scanf( "%d", &right_feeler);
if (( left_feeler ==0) && ( right_feeler ==0))
{
left_speed = 10 ;
right_speed = 10 ;
}
if (( left_feeler ==1) && ( right_feeler ==0))
{
left_speed = 10 ;
right_speed = 0 ;
}
if (( left_feeler ==0) && ( right_feeler ==1))
{
left_speed = 0 ;
right_speed = 10 ;
}
if (( left_feeler ==1) && ( right_feeler ==1))
{
left_speed = 10 ;
right_speed = 0 ;
}
printf("right speed = %d n", right_speed) ;
printf("left speed = %d n", left_speed) ;
No comments posted yet

Your Answer:

Login to answer
131 Like 32 Dislike
Previous forums Next forums
Other forums

Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to ret

Merger of 6 sister companies under one flagship company after go live
Dear Experts,
I need one help regarding Merger of sister companies of same group. currently we

Escape Latin Characters
I need to escape latin characters in an xml doc. Example: "é" is escaped to "é". I thoug

type check while uploading
Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here

function to return url
Hi,

Can you guys help me giving a function that takes all the contents in a particular field

CHECK A STRING FOR ' " ' (DOUBLE QUOTES)
I am checking for delimiter (.!?) and if there is a " after a sentence then it should neglect a

MySQL issue
I am taking sentences through a form on page. Then checking some condition and trying to insert them

very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and

Simple AND question
Hello,

I've got following code:

Code: if(strpos($row[13],"http://")

Matchcode in ALV change header column
Hello everyone,

I am working in an SAP system that is currently in upgrade and conversion

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash