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

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

Save User Inputs while javascript reloading!
hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown..

The type or namespace name 'ServiceModel' does not exist in the namespace 'System'
When I locally run the website, it works just fine, but when I uploaded it to the hosting environmen

session checking in page load
hai all I have a web site is www.Mryas.com in this my login page is Page1.aspx its co

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons sel

help with variable
I've got a problem, i want to echo some images depending on the $id, however for me to get that id i

Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that

Count Session and Trigger Events
I am New in PHP, seeking a method to count logged users by counting the sessions or any …, is

question about n
I was looking at some of the things you could do with php and one of the things I have tried is n.<

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