PSP Coding


 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 Code help

Go down 
AuthorMessage
DragonZero



Posts : 13
Points : 34
Reputation : 0
Join date : 2010-09-29

PostSubject: Code help   Sun Oct 03, 2010 10:27 am

I wanna make a code that take the highest number of the value's. Example:

0x00001000 0x00004000 < so it take this one
0x00001000 0x00003000
0x00001000 0x00002000

Any idea's ?
Back to top Go down
View user profile
-LeetGamer-
Admin


Posts : 247
Points : 397
Reputation : 4
Join date : 2010-09-29
Age : 25

PostSubject: Re: Code help   Sun Oct 03, 2010 10:53 am

Here is an example for two values:

0x00001000 0x00004000
0x00001004 0x00003000

Code:

Lui t0 $0880
Lw t1 $1000(t0)
Lw t2 $1004(t0)
Slt t3 t1 t2
Bne t3 0 $To "here"
Nop
// This is if t1 < t2
Sw t2 $0000(t0)
Beq 0 0 $To jr ra // This is to go to the end and not execute the other option
Nop
// This is if t2 < t1
"here" Sw t1 $0000(t0)
Jr ra
Nop

That will post the biggest value into address 00000000
Back to top Go down
View user profile
 
Code help
Back to top 
Page 1 of 1
 Similar topics
-
» Emoticon Code from Neopets!
» JOIN THE MOST BEASTLY DOJO WITH THE CODE: AFAEAHGE
» New Cheerleading Move Code
» Animal ID code not working?
» First Code from Ds game Welcome to Hugsville

Permissions in this forum:You cannot reply to topics in this forum
PSP Coding :: PSP Section :: PSP Chat :: PSP Coding Help-
Jump to: