Society of Robots - Robot Forum

Software => Software => Topic started by: LunchBox! on April 12, 2009, 10:16:24 PM

Title: Arrays in assembly language
Post by: LunchBox! on April 12, 2009, 10:16:24 PM
This is my first time building a robot.  Its for a class project.  All my parts are ordered but haven't arrived yet.  I've been reading as much as possible to be prepared when it all gets here.

I was reading the article on the sharp IR range finder..... http://www.societyofrobots.com/sensors_sharpirrange.shtml (http://www.societyofrobots.com/sensors_sharpirrange.shtml)

Im having a little bit of a problem understanding how to use arrays for 2d mapping using assembly language.
I have practically no knowledge of c language, right now were learning assembly, i think we are doing c next semester and all the stuff on arrays I can find is in c.

If someone could post a sample code of how to use an array in assembly or give me a link to something, that would be excellent.

Any help is appreciated.
Title: Re: Arrays in assembly language
Post by: gamefreak on April 13, 2009, 07:50:27 AM
Curios as to why the low level language, but I did find this after a quick google search found http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/toc.html (http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/toc.html)
I have never used Assembly so I am unsure about the validity of the link, but it may be worth a look.
Title: Re: Arrays in assembly language
Post by: chelmi on April 13, 2009, 08:30:48 AM
What is the MCU you are using? Assembly language varies a lot between MCUs!
Title: Re: Arrays in assembly language
Post by: LunchBox! on April 13, 2009, 09:28:43 AM
Curios as to why the low level language, but I did find this after a quick google search found http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/toc.html (http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/toc.html)
I have never used Assembly so I am unsure about the validity of the link, but it may be worth a look.

its for a class project and assembly is all we've learned so far.

What is the MCU you are using? Assembly language varies a lot between MCUs!

pic18f4520
Title: Re: Arrays in assembly language
Post by: Admin on May 13, 2009, 08:51:34 PM
learn C now, few people use assembly and for good reason!
Title: Re: Arrays in assembly language
Post by: LunchBox! on May 14, 2009, 01:35:44 PM
learn C now, few people use assembly and for good reason!

had to for school.  got it all figured out tho.  found out about indirect addressing in my data sheet.

learning c next semester im pretty sure. i love assembly tho :)