• API
• FAQ
• Tools
• Trends
• Archive
SHARE
TWEET

# Untitled

a guest Oct 21st, 2012 22 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. set \$workspace = 0x40000000
2.
5.         # lbu r4,(r1+0)
6.         set *(\$workspace+0)  = 0x40240000
7.         # lbu r5,(r1+1)
8.         set *(\$workspace+4)  = 0x40250001
9.         # sli r5,r5,8
10.         set *(\$workspace+8)  = 0x3ca50008
11.         # or r4,r4,r5
12.         set *(\$workspace+12)  = 0xb8852000
13.         # sw (r2+0),r4
14.         set *(\$workspace+16)  = 0x58440000
16.         set *(\$workspace+20)  = 0x34210002
18.         set *(\$workspace+24) = 0x34420004
20.         set *(\$workspace+28) = 0x3463fffe
21.         # bg r3,r0,-32
22.         set *(\$workspace+32) = 0x4860fff8
23.         # break
24.         set *(\$workspace+36) = 0xac000002
25.
26.         # save registers
27.         set \$saved_r1 = \$r1
28.         set \$saved_r2 = \$r2
29.         set \$saved_r3 = \$r3
30.         set \$saved_r4 = \$r4
31.         set \$saved_r5 = \$r5
32.         set \$saved_pc = \$pc
33.
34.         restore \$arg0 binary \$workspace+64
35.         set \$r1 = \$workspace+64
36.         set \$r2 = 0xa0000000
37.         set \$r3 = 2048
38.         jump *(\$workspace)
39.
40.         # recall registers
41.         set \$r1 = \$saved_r1
42.         set \$r2 = \$saved_r2
43.         set \$r3 = \$saved_r3
44.         set \$r4 = \$saved_r4
45.         set \$r5 = \$saved_r5
46.         set \$pc = \$saved_pc
47. end
48.