Valhalla Legends Archive

Programming => General Programming => Assembly Language (any cpu) => Topic started by: iago on March 12, 2003, 02:17 PM

Title: SPARC Contest!
Post by: iago on March 12, 2003, 02:17 PM
This is some rather nasty code I wrote in class (the original code was nasty, then I made it worse by shortening it to ~1/2 and by trying to avoid pseudocommands:
Quotecall decin ! Reads a decimal number from the keyboard and returns it in %o0
add %g0,0,%L4
call decin
add %o0,%g0,%L2
ba EL
mov %o0,%L1
BL: and %L2,0x01,%L3
subcc %L3,%L3,%G0
be NA
srl %L2,1,%L2
A: add %L1,%L4,%L4
NA: sll %L1,1,%L1
EL: subcc %L2,%L2,%g0
bne BL
add %L4,%g0,%o0
call decout ! outputs %o0 as a decimal number
nop

I'm pretty sure it still works, but whoever figure it out first gets.. nothing.  Good luck!
Title: Re:SPARC Contest!
Post by: Etheran on March 30, 2003, 03:43 AM
Nobody likes SPARC. ;p
Title: Re:SPARC Contest!
Post by: iago on March 30, 2003, 01:30 PM
Do you even know what platform uses sparc?
Title: Re:SPARC Contest!
Post by: Banana fanna fo fanna on March 30, 2003, 03:54 PM
Umm SPARC?
Title: Re:SPARC Contest!
Post by: iago on March 30, 2003, 04:47 PM
Beh, that code doesn't work the way it's supposed to anyway :-)
Title: Re:SPARC Contest!
Post by: Etheran on March 30, 2003, 09:40 PM
nope, but it seems nobody likes it  ;D
Title: Re:SPARC Contest!
Post by: iago on March 31, 2003, 09:48 AM
It works behind several variants of Linux :P
Title: Re:SPARC Contest!
Post by: Etheran on March 31, 2003, 03:07 PM
I'll stick with good old MASM for my all my assembling needs! :)
Title: Re:SPARC Contest!
Post by: Nova1313 on April 02, 2003, 11:09 PM
I have a sun ultra 10 setting here at my foot in my room never ran any assembly code on it. Nor have i tried to write assembly for it. I mostly use java on it i love solaris 9..

How would I go about running this j/w....

Just out of curiosity I'm assuming you have a sparc (most likly at school rather then in your bedroom like me) do you run red hat on it or solaris? I recently updated to solaris 9 (sun os 5.9) and it seems alot of stuff broke more then fixed it self. I have 4 sun rays running off it throughout my house that I picked up on ebay and they all ceased to work. I had to wipe the machine, can the update method and do a fresh install wiping all my customizations :/
I was wondering if you had any similar experiences/ problems?

Title: Re:SPARC Contest!
Post by: Hostile on April 03, 2003, 12:32 AM
I wish I had one at my feet, but whenever this feel starts to take over I just calm myself and look 4 feet to the right :p I have a 650Mhz Sun blade 150 as well a few old pizza boxes that aren't doing anything since I can't really set them up anywhere. PS: Try Solaris 8 :p!
Title: Re:SPARC Contest!
Post by: c0ol on April 22, 2003, 06:26 PM
u have a sunblade..... gimme a shell on it pzlpzlzpzlp, using linux preferably ;)