PSP Coding
Would you like to react to this message? Create an account in a few clicks or log in to continue.

PSP Coding


 
HomeLatest imagesSearchRegisterLog in

 

 KOM #1

Go down 
3 posters
AuthorMessage
-LeetGamer-
Admin



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

KOM #1 Empty
PostSubject: KOM #1   KOM #1 I_icon_minitimeMon Oct 04, 2010 7:21 pm

What is the value at address 08800000 after running this subroutine

Lui t0 $880
Ori t1 0 $1337
Ori t2 0 2
Mult t1 t2
Mflo t1
Addi t2 0 $FFFF
Sub t2 t2 t1
Sw t2 0(t0)
Jr ra
Nop

Please read the sticky post in this section.


Last edited by -LeetGamer- on Tue Oct 05, 2010 10:31 am; edited 1 time in total
Back to top Go down
Emu




Posts : 21
Points : 29
Reputation : 0
Join date : 2010-10-04

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 5:19 am

Ori t2 0 2
Sw t2 0(t0)

needs to be fixed properly to not cause confusion.....

Ori t2 0 $2
Sw t2 $0(t0)

or

Ori t2 zero $2
Sw t2 $0(t0)

and also can be this:

Ori $t2, $zero, 0x2
Sw $t2, $zero, 0x0($t0)

I believe leet know all of this just need to make it that way for noobs dawg
Back to top Go down
-LeetGamer-
Admin



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

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 7:10 am

Emu wrote:
Ori t2 0 2
Sw t2 0(t0)

needs to be fixed properly to not cause confusion.....

Ori t2 0 $2
Sw t2 $0(t0)

or

Ori t2 zero $2
Sw t2 $0(t0)

and also can be this:

Ori $t2, $zero, 0x2
Sw $t2, $zero, 0x0($t0)

I believe leet know all of this just need to make it that way for noobs dawg

But confusing is fun Razz Most people here use ps2dis and those will enter in ps2dis (The ones I gave) so if they really wanted to know they could check there, or this post now Razz. (By the way next time you are on skype/aim You need to show me how to use IDA Pro or what ever it is called Razz)
Back to top Go down
Mr_Waffle

Mr_Waffle


Posts : 17
Points : 21
Reputation : 0
Join date : 2010-09-30
Age : 29

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 8:56 am

"Sub t2 t1"
Doesnt Sub need 3 arguments? (output register - first register - second register)
Back to top Go down
-LeetGamer-
Admin



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

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 10:32 am

Fixed Razz
Back to top Go down
Emu




Posts : 21
Points : 29
Reputation : 0
Join date : 2010-10-04

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 2:46 pm

Lui t0 $880 // Upper address 0x0000
Ori t1 0 $1337 // Value 1337
Ori t2 0 2 // Value 2
Mult t1 t2 // 1337 * 2 = 0A72 and store in Lo
Mflo t1 // 0A72 is stored in t1 from Lo
Addi t2 0 $FFFF // Value FFFF also -1 from the negative rule
Sub t2 t2 t1 // Sub FFFF - 0A72 = F58D
Sw t2 0(t0) // Stores 0x0000F58D to address 0x00000000
Jr ra // Jump register return address (end code)
Nop // slot delay
Back to top Go down
-LeetGamer-
Admin



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

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 2:50 pm

Nope, 1337 is a hex value Wink ($ = 0x in ps2dis)
Back to top Go down
Emu




Posts : 21
Points : 29
Reputation : 0
Join date : 2010-10-04

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 2:52 pm

1337 in hex * 2 in hex = A72....

this is the only other answer I can think of with no ps2dis help just calc:

0x0000D991


Last edited by Emu on Tue Oct 05, 2010 2:54 pm; edited 1 time in total
Back to top Go down
-LeetGamer-
Admin



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

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 2:54 pm

Emu wrote:
1337 in hex * 2 in hex = A72....

Hmmm my calculator is weird bounce sorry -goes to check it again- Razz

edit: lmao I just checked and it gave me your value, checked again (same thing) gave me another)

edit two:

Still wrong Sad but you are close, only one mistake Razz and it might not be something you should know unless you found my accidently like me Razz

(It is a FULL 32bit value with no zeros Wink)
Back to top Go down
Emu




Posts : 21
Points : 29
Reputation : 0
Join date : 2010-10-04

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 3:03 pm

I am positive this is right:

Lui t0 $880 // Upper address 0x0000
Ori t1 0 $1337 // Value 1337
Ori t2 0 2 // Value 2
Mult t1 t2 // 1337 * 2 = 0A72 and store in Lo
Mflo t1 // 0A72 is stored in t1 from Lo
Addi t2 0 $FFFF // Value FFFF also -1 from the negative rule
Sub t2 t2 t1 // Sub FFFF - 0A72 = F58D
Sw t2 0(t0) // Stores 0xFFFFF58D to address 0x00000000
Jr ra // Jump register return address (end code)
Nop // slot delay


Last edited by Emu on Tue Oct 05, 2010 3:10 pm; edited 1 time in total (Reason for editing : added the right value)
Back to top Go down
-LeetGamer-
Admin



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

KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitimeTue Oct 05, 2010 3:07 pm

Yeah that is right Emu, make your KOM when ever you want Very Happy
Back to top Go down
Sponsored content





KOM #1 Empty
PostSubject: Re: KOM #1   KOM #1 I_icon_minitime

Back to top Go down
 
KOM #1
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
PSP Coding :: PSP Section :: Coding Contests :: Official KOM-
Jump to: