Wednesday, May 12, 2010
For loop with SPARC assembly
For those who don't want to waste to many time searching on how to do a simple for loop in asm to be processed by, say, a LEON, here's your answer.
The next code does the following:
- Initialize registers
- Iteratively shift left one bit in a register
- add one LSbit to the shifted register
- loop while i less than 10
References:
SPARC Assembly Language Summary, Princeton University
SPARC Assembly/Control Structures, Wikibooks
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment