LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-26-2003, 04:01 PM   #1
jclark00001
Member
 
Registered: Jan 2003
Distribution: RH 8.0 with KDE
Posts: 59

Rep: Reputation: 15
SPARC assembly language


If anyone knows sparc assembly language could they post me a simple example of a loop using branch mnemonics that does a counter or something simple like that?
 
Old 02-26-2003, 05:16 PM   #2
Ron Gesell
LQ Newbie
 
Registered: Feb 2003
Location: Canada
Distribution: Red Hat Phoebe
Posts: 1

Rep: Reputation: 0
sparc loop

I'm just learning sparc, but try something like this:

clr %L1 ! clear register
mov 10,%L2 ! put maximum count in

STARTLOOP0:

inc %L1 ! adds one to L1 reg

ENDLOOP0:
cmp %L1,%L2 ! compare
blt STARTLOOP0 ! if L1 < L2 go to start of loop
nop ! the command after a branch is always
! performed, so put a null op in,
! unless you want something done there
 
Old 02-26-2003, 08:14 PM   #3
jclark00001
Member
 
Registered: Jan 2003
Distribution: RH 8.0 with KDE
Posts: 59

Original Poster
Rep: Reputation: 15
Smile

cool, thanks i figured it out from that, im just learning it too, but i missed a lecture and wasnt really sure about it. the stuff i find online is all way ahead of my class.
 
Old 02-26-2003, 08:52 PM   #4
AMDPwred
Member
 
Registered: Dec 2001
Location: Richmond, VA
Posts: 391

Rep: Reputation: 30
Whoa!?! That's assembler? Thank god I never went through that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Assembly language: Purpose of shift register? ksgill Programming 4 03-21-2005 08:24 PM
SPARC Assembly help needed Matrix_Prime Programming 4 10-31-2004 07:43 PM
How to do type casting in Sparc Assembly Language foxele Programming 1 10-09-2004 04:40 PM
Assembly Language on 64 Bit systems Sleevy Programming 1 09-06-2004 01:58 AM
Assembly Language, and networks grizzly Programming 5 12-11-2003 09:50 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration