Results 1 to 3 of 3
!BITPATTERN = 0xAB01CDFF
.global main
main:
save %sp, -96, %sp
set BITPATTERN, %l0
clr %l1 ! checkpoint 1
sll %l0, 24, %l2
add %l2, %l1, %l1 ! checkpoint 2
srl ...
- 10-12-2009 #1Just Joined!
- Join Date
- Oct 2009
- Posts
- 1
What does the following assembly language script do?
!BITPATTERN = 0xAB01CDFF
.global main
main:
save %sp, -96, %sp
set BITPATTERN, %l0
clr %l1 ! checkpoint 1
sll %l0, 24, %l2
add %l2, %l1, %l1 ! checkpoint 2
srl %l0, 8, %l2
sll %l2, 24, %l2
srl %l2, 8, %l2
add %l2, %l1, %l1 ! checkpoint 3
srl %l0, 16, %l2
sll %l2, 24, %l2
srl %l2, 16, %l2
add %l2, %l1, %l1 ! checkpoint 4
srl %l0, 24, %l2
add %l2, %l1, %l1 ! checkpoint 5
ret
restore
In unix..using sparc
What does ths assembly language script do? I am a beginnerr..and I have no clue
plz help me understand this
- 10-12-2009 #2
You take a sheet of paper and draw a table on it.
On the rows you put the line numbers and the columns are the registers and variables.
Then you look up what every single line does to the registers and write in your table what the contents of the registers are after execution of each line.
When you reach the last line, you will understand what the program does.Debian GNU/Linux -- You know you want it.
- 10-12-2009 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
This is sparc assembly language. Get the Sun/Sparc assembler documentation to find out what this does. You can probably download or access it from Sun's web site.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote