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.




#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

preg_match logical error
Code: <?php
$s = file_get_contents("page.html");
preg_match('/<div cla

Can't find a decent web analytics!!!
I've downloaded and installed Piwik. It's location detection based on IP addresses is fairly inaccur

ALV List Display to point to another report on Double Click
Hi,

I want my ALV List Display to point to another report on Double Click on its line ite

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

Search function
I am looking for some guidance from the experts.

I am trying to create a search function. It

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

FFmpeg Images 2 Video conversion problem ??
I got folder full of images , number of images = 600 , I want to make a video which plays one image

Taxonomy? Classification? Categorisation?
Not sure if there is a way around this classification problem
I have a supplier who produces

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

Displaying a clickable playername
I am going wrong somewhere with the mysql_query, can someone please put me straight?

$playern

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