homepage Welcome to WebmasterWorld Guest from 54.196.162.238
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Help with Sparc Assembly language
looking for tutorials or interactive cd's etc
akande




msg:909093
 7:32 pm on Sep 28, 2003 (gmt 0)

Hello,

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.

Thanks

 

MattyMoose




msg:909094
 8:55 pm on Oct 2, 2003 (gmt 0)

Hey!

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]

HTH!
MM

drbrain




msg:909095
 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.

killroy




msg:909096
 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.

SN

akande




msg:909097
 3:13 am on Oct 29, 2003 (gmt 0)

Within the program, I am using the following code:

cmp %l4, %l0
bne Loop

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

akande




msg:909098
 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.
-------------------------------
.global RotateStr

RotateStr:
save %sp, -128, %sp

! Reset usable registers to zero
clr %l0
clr %l1
clr %l2
clr %l4

add %l2, -1, %l1
Loop:
! 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
bne Loop

! Counter
cmp %l4, %l0
bne Loop

ret
restore

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved