|Help with Sparc Assembly language|
looking for tutorials or interactive cd's etc
| 7:32 pm on Sep 28, 2003 (gmt 0)|
I am taking an assembly class and I am wondering if anyone has any recommendations for interactive tutorials for the Sparc assembly language. I have a book but it is incredibly dull and quite complicated.
I know the language itself is hard at first but I feel as though I can do better if there was a video or interactive cd available.
| 8:55 pm on Oct 2, 2003 (gmt 0)|
I saw something along the lines of assembly language *somewhere* for SPARC, and I can't remember where, but, I have a good feeling that it may be available on MIT's OCW site...
Even if you can't find it, you may find other things that are useful there...
Here it is: MIT's Open CourseWare [ocw.mit.edu]
| 9:05 pm on Oct 2, 2003 (gmt 0)|
SPARC assembly is the least painful one to learn of all, being a RISC architecture. It is very much like programming straight C, all you have to do is a bit more math. (Programming assembly isn't easy, its just that a register-based RISC machine is easier than a stack-based CISC machine like an x86).
Sun's SPARC Assembly Language Reference Manual [docs.sun.com] may be helpful, along with a google search for "sparc assembly". Also, check out the book "SPARC Architecture, Assembly Language Programming, and C (2nd Edition)", I found it easy to read and learn from, much like the K&R book.
| 9:44 pm on Oct 2, 2003 (gmt 0)|
Hmm I'm pretty fluent in cisc assembly, but I can't imagine how to learn it from a video.
Try gettign some simple example codes that do "cool stuff" I found motivation is the beggest problem, and once you do "cool stuff" you'll learn a lot quickly and enjoy it too.
try finding somebody in your area who's into it and see if he'll give yo ua tutorial.
| 3:13 am on Oct 29, 2003 (gmt 0)|
Within the program, I am using the following code:
cmp %l4, %l0
When I try to compile the code, I receive the following. Does anyone by any chance know what exactly that means? I cannot find any text on it within my book or the web.
warning: invalid use of DCTI couple, produces implementation-dependent result
| 1:24 pm on Oct 29, 2003 (gmt 0)|
The way the code is used is. I actually did this as a project but realized that once compare is added, I get the error.
save %sp, -128, %sp
! Reset usable registers to zero
add %l2, -1, %l1
! Load last char into register
ldub [%i0 + %l1], %l4
! Shifting chars to the right
! Add negative one to register l1
add %l1, -1, %l1
! Add negative one to register l2
add %l2, -1, %l2
! Store last char back into memory
stb %l4, [%i0 + %l2]
! Make sure first spot is clear
! Compare l2 to zero if not equal loop again
cmp 0, %l2
cmp %l4, %l0