Difference between revisions of "Get number of clockticks till able to revive dead unit"
Jump to navigation
Jump to search
(Created page with "<font face='Courier New'> 00199c88: 90860038 lbu r6,0x0038(r4) 00199c8c: 00000000 nop 00199c90: 10c00010 beq r6,r0,0x00199cd4 00199c94: 3c027fff lui r2,0x7fff 00199c98:...") |
|||
Line 1: | Line 1: | ||
<font face='Courier New'> | <font face='Courier New'> | ||
− | + | Get number of clockticks till able to revive dead unit | |
− | + | <font face='Courier New'> | |
− | + | ||
− | + | 00199c88: 90860038 lbu r6,0x0038(r4) load speed | |
− | + | 00199c8c: 00000000 nop | |
− | + | 00199c90: 10c00010 beq r6,r0,0x00199cd4 branch if none | |
− | + | 00199c94: 3c027fff lui r2,0x7fff | |
− | + | 00199c98: 90820058 lbu r2,0x0058(r4) load status | |
− | + | 00199c9c: 00000000 nop | |
− | + | 00199ca0: 30420020 andi r2,r2,0x0020 | |
− | + | 00199ca4: 1040000b beq r2,r0,0x00199cd4 branch if not dead | |
− | + | 00199ca8: 3c027fff lui r2,0x7fff | |
− | + | 00199cac: 9082005a lbu r2,0x005a(r4) load status | |
− | + | 00199cb0: 00000000 nop | |
− | + | 00199cb4: 30420020 andi r2,r2,0x0020 | |
− | + | 00199cb8: 14400006 bne r2,r0,0x00199cd4 branch if reraise | |
− | + | 00199cbc: 3c027fff lui r2,0x7fff | |
− | + | 00199cc0: 90830007 lbu r3,0x0007(r4) load death counter | |
− | + | 00199cc4: 340200ff ori r2,r0,0x00ff | |
− | + | 00199cc8: 14620004 bne r3,r2,0x00199cdc branch if knocked out | |
− | + | 00199ccc: 00602821 addu r5,r3,r0 | |
− | + | 00199cd0: 3c027fff lui r2,0x7fff | |
− | + | 00199cd4: 08066746 j 0x00199d18 return 7fffffff | |
− | + | 00199cd8: 3442ffff ori r2,r2,0xffff | |
− | + | ||
− | + | 00199cdc: 00051040 sll r2,r5,0x01 death counter*2 | |
− | + | 00199ce0: 00451021 addu r2,r2,r5 *3 | |
− | + | 00199ce4: 000210c0 sll r2,r2,0x03 *24 | |
− | + | 00199ce8: 00451021 addu r2,r2,r5 *25 | |
− | + | 00199cec: 00022880 sll r5,r2,0x02 *100 | |
− | + | 00199cf0: 90830039 lbu r3,0x0039(r4) load CT | |
− | + | 00199cf4: 24a20064 addiu r2,r5,0x0064 +100 | |
− | + | 00199cf8: 00432823 subu r5,r2,r3 result - CT | |
− | + | 00199cfc: 00a6001a div r5,r6 result - CT / speed | |
− | + | 00199d00: 00001812 mflo r3 r3 = clockticks till can revive unit | |
− | + | 00199d04: 00001010 mfhi r2 r2 = remainder (add 1 clocktick) | |
− | + | 00199d08: 10400003 beq r2,r0,0x00199d18 branch if no remainder | |
− | + | 00199d0c: 00601021 addu r2,r3,r0 | |
− | + | 00199d10: 24630001 addiu r3,r3,0x0001 | |
− | </font> | + | 00199d14: 00601021 addu r2,r3,r0 return number of clockticks till can revive unit |
+ | 00199d18: 03e00008 jr r31 | ||
+ | 00199d1c: 00000000 nop | ||
+ | </font></font> |
Revision as of 16:16, 22 February 2015
Get number of clockticks till able to revive dead unit
00199c88: 90860038 lbu r6,0x0038(r4) load speed 00199c8c: 00000000 nop 00199c90: 10c00010 beq r6,r0,0x00199cd4 branch if none 00199c94: 3c027fff lui r2,0x7fff 00199c98: 90820058 lbu r2,0x0058(r4) load status 00199c9c: 00000000 nop 00199ca0: 30420020 andi r2,r2,0x0020 00199ca4: 1040000b beq r2,r0,0x00199cd4 branch if not dead 00199ca8: 3c027fff lui r2,0x7fff 00199cac: 9082005a lbu r2,0x005a(r4) load status 00199cb0: 00000000 nop 00199cb4: 30420020 andi r2,r2,0x0020 00199cb8: 14400006 bne r2,r0,0x00199cd4 branch if reraise 00199cbc: 3c027fff lui r2,0x7fff 00199cc0: 90830007 lbu r3,0x0007(r4) load death counter 00199cc4: 340200ff ori r2,r0,0x00ff 00199cc8: 14620004 bne r3,r2,0x00199cdc branch if knocked out 00199ccc: 00602821 addu r5,r3,r0 00199cd0: 3c027fff lui r2,0x7fff 00199cd4: 08066746 j 0x00199d18 return 7fffffff 00199cd8: 3442ffff ori r2,r2,0xffff 00199cdc: 00051040 sll r2,r5,0x01 death counter*2 00199ce0: 00451021 addu r2,r2,r5 *3 00199ce4: 000210c0 sll r2,r2,0x03 *24 00199ce8: 00451021 addu r2,r2,r5 *25 00199cec: 00022880 sll r5,r2,0x02 *100 00199cf0: 90830039 lbu r3,0x0039(r4) load CT 00199cf4: 24a20064 addiu r2,r5,0x0064 +100 00199cf8: 00432823 subu r5,r2,r3 result - CT 00199cfc: 00a6001a div r5,r6 result - CT / speed 00199d00: 00001812 mflo r3 r3 = clockticks till can revive unit 00199d04: 00001010 mfhi r2 r2 = remainder (add 1 clocktick) 00199d08: 10400003 beq r2,r0,0x00199d18 branch if no remainder 00199d0c: 00601021 addu r2,r3,r0 00199d10: 24630001 addiu r3,r3,0x0001 00199d14: 00601021 addu r2,r3,r0 return number of clockticks till can revive unit 00199d18: 03e00008 jr r31 00199d1c: 00000000 nop