Display Menu Text

From Final Fantasy Hacktics Wiki
Revision as of 02:47, 2 November 2016 by Glain (talk | contribs) (Created page with " # ROUTINE: DISPLAY MENU TEXT # Parameters: # r4 = [Combined Text Index] for text lookup # 16-bit value: # (Upper 5 bits)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
#   ROUTINE: DISPLAY MENU TEXT
#       Parameters:
#           r4 = [Combined Text Index] for text lookup
#               16-bit value:
#                   (Upper 5 bits):     Text Section
#                   (Lower 11 bits):    Inner text index within Section
#           r5 = Pointer; Used as Parameter 2 in Routine 0x14bd88
#                Sometimes varies by menu, sometimes is the same
#                Example values: 0x8016eb84 (Most menus), 0x801c3a7c (AT menu, part of Option menu) 0x801e5730 (Unit list)
#           r6 = Menu data pointer?
#                Example value: 0x80165fa0 (Always seems to be this value)
#           r7 = [Specific display text pointer]
#                Uses this instead of [Combined Text Index] if populated, but does lookup based on [Combined Text Index] when this value is either 0 or 1

0014b394: 27bdffc0 addiu r29,r29,-0x0040
0014b398: afb1001c sw r17,0x001c(r29)
0014b39c: 00808821 addu r17,r4,r0
0014b3a0: afbe0038 sw r30,0x0038(r29)
0014b3a4: 00a0f021 addu r30,r5,r0
0014b3a8: afb00018 sw r16,0x0018(r29)
0014b3ac: 00e08021 addu r16,r7,r0
0014b3b0: 00002021 addu r4,r0,r0                #   [Unit index] = 0
0014b3b4: afbf003c sw r31,0x003c(r29)
0014b3b8: afb70034 sw r23,0x0034(r29)
0014b3bc: afb60030 sw r22,0x0030(r29)
0014b3c0: afb5002c sw r21,0x002c(r29)
0014b3c4: afb40028 sw r20,0x0028(r29)
0014b3c8: afb30024 sw r19,0x0024(r29)
0014b3cc: afb20020 sw r18,0x0020(r29)
0014b3d0: 0c0166bc jal 0x00059af0               #   ROUTINE: Get Party Data Pointer (Parameter: [Unit index] = 0)   // (This just gets a pointer to the start of party data - 0x80057f74?)
                                                #       (Also, the result of this call is thrown away below!! Useless call?)
0014b3d4: afa60010 sw r6,0x0010(r29)
0014b3d8: 12000003 beq r16,r0,0x0014b3e8
0014b3dc: 34020001 ori r2,r0,0x0001
                                                #   [Display text] = [Specific display text pointer]
                                                #   if (([Specific display text pointer] == 0)
0014b3e0: 16020004 bne r16,r2,0x0014b3f4        #       or ([Specific display text pointer] == 1)) {
0014b3e4: 02009021 addu r18,r16,r0
0014b3e8: 0c04ca09 jal 0x00132824               #       ROUTINE: Prep for Loading Text (Returns pointer to FFT text string)
0014b3ec: 02202021 addu r4,r17,r0               #           (Parameter: r4 = [Combined Text Index])
0014b3f0: 00409021 addu r18,r2,r0               #       [Display Text] = (Routine result)
                                                #   }
0014b3f4: 3c111f80 lui r17,0x1f80
0014b3f8: 36310200 ori r17,r17,0x0200           #   0x1f800200: Scratchpad address
0014b3fc: 34170018 ori r23,r0,0x0018            #   24
0014b400: 8fa80010 lw r8,0x0010(r29)            #   [Parameter 3] (0x80165fa0?)
0014b404: 2402ffff addiu r2,r0,-0x0001          #   -1
0014b408: 3c011f80 lui r1,0x1f80
0014b40c: ac22021c sw r2,0x021c(r1)             #   RAM_WORD[0x1f80021c] = -1
0014b410: 3c028016 lui r2,0x8016
0014b414: 24425ef4 addiu r2,r2,0x5ef4           #   0x80165ef4
0014b418: 3c011f80 lui r1,0x1f80
0014b41c: ac220224 sw r2,0x0224(r1)             #   RAM_WORD[0x1f800224] = 0x80165ef4
0014b420: 3402ffff ori r2,r0,0xffff             #   0xffff
0014b424: 3c011f80 lui r1,0x1f80
0014b428: ac220228 sw r2,0x0228(r1)             #   RAM_WORD[0x1f800228] = 0xffff
0014b42c: 3c028017 lui r2,0x8017
0014b430: 2442d9c8 addiu r2,r2,-0x2638          #   0x8016d9c8
0014b434: 3c011f80 lui r1,0x1f80
0014b438: ac200218 sw r0,0x0218(r1)             #   RAM_WORD[0x1f800218] = 0
0014b43c: 3c011f80 lui r1,0x1f80
0014b440: ac200204 sw r0,0x0204(r1)             #   RAM_WORD[0x1f800204] = 0
0014b444: 3c011f80 lui r1,0x1f80
0014b448: ac200208 sw r0,0x0208(r1)             #   RAM_WORD[0x1f800208] = 0
0014b44c: 3c011f80 lui r1,0x1f80
0014b450: ac20020c sw r0,0x020c(r1)             #   RAM_WORD[0x1f80020c] = 0
0014b454: 95030000 lhu r3,0x0000(r8)            #   [Parameter 3].0x00
0014b458: 0040b021 addu r22,r2,r0
0014b45c: a6c30000 sh r3,0x0000(r22)
0014b460: 95020002 lhu r2,0x0002(r8)
0014b464: 0000a821 addu r21,r0,r0
0014b468: 3c018016 lui r1,0x8016
0014b46c: ac205f90 sw r0,0x5f90(r1)
0014b470: 3c018017 lui r1,0x8017
0014b474: a422d9ca sh r2,-0x2636(r1)
0014b478: 8d030008 lw r3,0x0008(r8)
0014b47c: 34020010 ori r2,r0,0x0010
0014b480: 3c018016 lui r1,0x8016
0014b484: ac225f94 sw r2,0x5f94(r1)
0014b488: 3c018017 lui r1,0x8017
0014b48c: ac23d9d0 sw r3,-0x2630(r1)

0014b490: 92440000 lbu r4,0x0000(r18)
0014b494: 00000000 nop
0014b498: 288200d0 slti r2,r4,0x00d0
0014b49c: 14400123 bne r2,r0,0x0014b92c
0014b4a0: ae240000 sw r4,0x0000(r17)
0014b4a4: 308300f0 andi r3,r4,0x00f0
0014b4a8: 340200d0 ori r2,r0,0x00d0
0014b4ac: 14620013 bne r3,r2,0x0014b4fc
0014b4b0: 340200e2 ori r2,r0,0x00e2
0014b4b4: 02202021 addu r4,r17,r0
0014b4b8: 92430000 lbu r3,0x0000(r18)
0014b4bc: 02402821 addu r5,r18,r0
0014b4c0: 3063000f andi r3,r3,0x000f
0014b4c4: 00031040 sll r2,r3,0x01
0014b4c8: 00431021 addu r2,r2,r3
0014b4cc: 00021080 sll r2,r2,0x02
0014b4d0: 00431021 addu r2,r2,r3
0014b4d4: 00021100 sll r2,r2,0x04
0014b4d8: 0c052e8a jal 0x0014ba28
0014b4dc: ae220000 sw r2,0x0000(r17)
0014b4e0: 00409021 addu r18,r2,r0
0014b4e4: 92420000 lbu r2,0x0000(r18)
0014b4e8: 8e230000 lw r3,0x0000(r17)
0014b4ec: 00000000 nop
0014b4f0: 00431021 addu r2,r2,r3
0014b4f4: 08052e4b j 0x0014b92c
0014b4f8: ae220000 sw r2,0x0000(r17)
0014b4fc: 14820006 bne r4,r2,0x0014b518
0014b500: 340200ec ori r2,r0,0x00ec
0014b504: 02202021 addu r4,r17,r0
0014b508: 0c052e8a jal 0x0014ba28
0014b50c: 02402821 addu r5,r18,r0
0014b510: 08052dfe j 0x0014b7f8
0014b514: 00409021 addu r18,r2,r0
0014b518: 1482000a bne r4,r2,0x0014b544
0014b51c: 340200f5 ori r2,r0,0x00f5
0014b520: 02202021 addu r4,r17,r0
0014b524: 0c052e8a jal 0x0014ba28
0014b528: 02402821 addu r5,r18,r0
0014b52c: 00409021 addu r18,r2,r0
0014b530: 92450000 lbu r5,0x0000(r18)
0014b534: 0c04ed91 jal 0x0013b644
0014b538: 3404005a ori r4,r0,0x005a
0014b53c: 08052dfe j 0x0014b7f8
0014b540: 00000000 nop
0014b544: 14820008 bne r4,r2,0x0014b568
0014b548: 340200f6 ori r2,r0,0x00f6
0014b54c: 02202021 addu r4,r17,r0
0014b550: 0c052e8a jal 0x0014ba28
0014b554: 02402821 addu r5,r18,r0
0014b558: 00409021 addu r18,r2,r0
0014b55c: 92570000 lbu r23,0x0000(r18)
0014b560: 08052dfe j 0x0014b7f8
0014b564: 00000000 nop
0014b568: 14820019 bne r4,r2,0x0014b5d0
0014b56c: 340200e3 ori r2,r0,0x00e3
0014b570: 02202021 addu r4,r17,r0
0014b574: 0c052e8a jal 0x0014ba28
0014b578: 02402821 addu r5,r18,r0
0014b57c: 00409021 addu r18,r2,r0
0014b580: 0c04ed64 jal 0x0013b590
0014b584: 34040066 ori r4,r0,0x0066
0014b588: 00408021 addu r16,r2,r0
0014b58c: 1200000b beq r16,r0,0x0014b5bc
0014b590: 00102080 sll r4,r16,0x02
0014b594: 92450000 lbu r5,0x0000(r18)
0014b598: 00902021 addu r4,r4,r16
0014b59c: 00042040 sll r4,r4,0x01
0014b5a0: 0c04ed91 jal 0x0013b644
0014b5a4: 02e42021 addu r4,r23,r4
0014b5a8: 34040066 ori r4,r0,0x0066
0014b5ac: 0c04ed91 jal 0x0013b644
0014b5b0: 00002821 addu r5,r0,r0
0014b5b4: 08052dfe j 0x0014b7f8
0014b5b8: 00000000 nop
0014b5bc: 92450000 lbu r5,0x0000(r18)
0014b5c0: 0c04ed91 jal 0x0013b644
0014b5c4: 02e02021 addu r4,r23,r0
0014b5c8: 08052dfe j 0x0014b7f8
0014b5cc: 00000000 nop
0014b5d0: 1482000a bne r4,r2,0x0014b5fc
0014b5d4: 340200fb ori r2,r0,0x00fb
0014b5d8: 02202021 addu r4,r17,r0
0014b5dc: 0c052e8a jal 0x0014ba28
0014b5e0: 02402821 addu r5,r18,r0
0014b5e4: 00409021 addu r18,r2,r0
0014b5e8: 92420000 lbu r2,0x0000(r18)
0014b5ec: 3c018016 lui r1,0x8016
0014b5f0: ac225f8c sw r2,0x5f8c(r1)
0014b5f4: 08052dfe j 0x0014b7f8
0014b5f8: 00000000 nop
0014b5fc: 1082007e beq r4,r2,0x0014b7f8
0014b600: 340200fa ori r2,r0,0x00fa
0014b604: 14820006 bne r4,r2,0x0014b620
0014b608: 340200f8 ori r2,r0,0x00f8
0014b60c: 96c20000 lhu r2,0x0000(r22)
0014b610: 00000000 nop
0014b614: 24420004 addiu r2,r2,0x0004
0014b618: 08052dfe j 0x0014b7f8
0014b61c: a6c20000 sh r2,0x0000(r22)
0014b620: 1482000f bne r4,r2,0x0014b660
0014b624: 340200e8 ori r2,r0,0x00e8
0014b628: 8fa80010 lw r8,0x0010(r29)
0014b62c: 3c028016 lui r2,0x8016
0014b630: 8c426020 lw r2,0x6020(r2)
0014b634: 95030000 lhu r3,0x0000(r8)
0014b638: 02a2102a slt r2,r21,r2
0014b63c: 14400006 bne r2,r0,0x0014b658
0014b640: a6c30000 sh r3,0x0000(r22)
0014b644: 96c20002 lhu r2,0x0002(r22)
0014b648: 3c018016 lui r1,0x8016
0014b64c: ac205f90 sw r0,0x5f90(r1)
0014b650: 24420010 addiu r2,r2,0x0010
0014b654: a6c20002 sh r2,0x0002(r22)
0014b658: 08052dfe j 0x0014b7f8
0014b65c: 26b50001 addiu r21,r21,0x0001
0014b660: 14820008 bne r4,r2,0x0014b684
0014b664: 340200e4 ori r2,r0,0x00e4
0014b668: 02202021 addu r4,r17,r0
0014b66c: 0c052e8a jal 0x0014ba28
0014b670: 02402821 addu r5,r18,r0
0014b674: 00409021 addu r18,r2,r0
0014b678: 92420000 lbu r2,0x0000(r18)
0014b67c: 08052dfe j 0x0014b7f8
0014b680: ae220028 sw r2,0x0028(r17)
0014b684: 10820005 beq r4,r2,0x0014b69c
0014b688: 340200e6 ori r2,r0,0x00e6
0014b68c: 1482005a bne r4,r2,0x0014b7f8
0014b690: 02202021 addu r4,r17,r0
0014b694: 08052dad j 0x0014b6b4
0014b698: 00000000 nop
0014b69c: 8e220024 lw r2,0x0024(r17)
0014b6a0: 8e230024 lw r3,0x0024(r17)
0014b6a4: 8c420000 lw r2,0x0000(r2)
0014b6a8: 24630004 addiu r3,r3,0x0004
0014b6ac: 08052db6 j 0x0014b6d8
0014b6b0: ae230024 sw r3,0x0024(r17)
0014b6b4: 0c052e8a jal 0x0014ba28
0014b6b8: 02402821 addu r5,r18,r0
0014b6bc: 00409021 addu r18,r2,r0
0014b6c0: 92420000 lbu r2,0x0000(r18)
0014b6c4: 00000000 nop
0014b6c8: 00021080 sll r2,r2,0x02
0014b6cc: 3c018016 lui r1,0x8016
0014b6d0: 00220821 addu r1,r1,r2
0014b6d4: 8c225ef4 lw r2,0x5ef4(r1)
0014b6d8: 00000000 nop
0014b6dc: ae220010 sw r2,0x0010(r17)
0014b6e0: 8e220028 lw r2,0x0028(r17)
0014b6e4: 3403ffff ori r3,r0,0xffff
0014b6e8: 14430006 bne r2,r3,0x0014b704
0014b6ec: 2450ffff addiu r16,r2,-0x0001
0014b6f0: 8e240010 lw r4,0x0010(r17)
0014b6f4: 0c04ca17 jal 0x0013285c
0014b6f8: 0000a021 addu r20,r0,r0
0014b6fc: 08052dc3 j 0x0014b70c
0014b700: 2450ffff addiu r16,r2,-0x0001
0014b704: ae230028 sw r3,0x0028(r17)
0014b708: 0000a021 addu r20,r0,r0
0014b70c: 0600003a bltz r16,0x0014b7f8
0014b710: 00101080 sll r2,r16,0x02
0014b714: 3c088016 lui r8,0x8016
0014b718: 250860a8 addiu r8,r8,0x60a8
0014b71c: 00489821 addu r19,r2,r8
0014b720: 8e220010 lw r2,0x0010(r17)
0014b724: 8e630000 lw r3,0x0000(r19)
0014b728: 00000000 nop
0014b72c: 0043102b sltu r2,r2,r3
0014b730: 10400005 beq r2,r0,0x0014b748
0014b734: 00000000 nop
0014b738: 12000003 beq r16,r0,0x0014b748
0014b73c: 00000000 nop
0014b740: 12800027 beq r20,r0,0x0014b7e0
0014b744: 00000000 nop
0014b748: 8e230010 lw r3,0x0010(r17)
0014b74c: 8e620000 lw r2,0x0000(r19)
0014b750: 00000000 nop
0014b754: 0062001b divu r3,r2
0014b758: 00001812 mflo r3
0014b75c: 00000000 nop
0014b760: ae230000 sw r3,0x0000(r17)
0014b764: 8e620000 lw r2,0x0000(r19)
0014b768: 00000000 nop
0014b76c: 00620018 mult r3,r2
0014b770: 3c048016 lui r4,0x8016
0014b774: 8c846024 lw r4,0x6024(r4)
0014b778: 34140001 ori r20,r0,0x0001
0014b77c: 02a4202a slt r4,r21,r4
0014b780: 8e230010 lw r3,0x0010(r17)
0014b784: 00001012 mflo r2
0014b788: 00621823 subu r3,r3,r2
0014b78c: 10800092 beq r4,r0,0x0014b9d8
0014b790: ae230010 sw r3,0x0010(r17)
0014b794: 3c028016 lui r2,0x8016
0014b798: 8c426020 lw r2,0x6020(r2)
0014b79c: 00000000 nop
0014b7a0: 02a2102a slt r2,r21,r2
0014b7a4: 1440000e bne r2,r0,0x0014b7e0
0014b7a8: 03c02821 addu r5,r30,r0
0014b7ac: 3c068017 lui r6,0x8017
0014b7b0: 24c6d9c8 addiu r6,r6,-0x2638
0014b7b4: 8e220000 lw r2,0x0000(r17)
0014b7b8: 3c078016 lui r7,0x8016
0014b7bc: 8ce75f8c lw r7,0x5f8c(r7)
0014b7c0: 3c038017 lui r3,0x8017
0014b7c4: 8c633c98 lw r3,0x3c98(r3)
0014b7c8: 000220c0 sll r4,r2,0x03
0014b7cc: 00822021 addu r4,r4,r2
0014b7d0: 00042080 sll r4,r4,0x02
0014b7d4: 00822023 subu r4,r4,r2
0014b7d8: 0c052f62 jal 0x0014bd88
0014b7dc: 00832021 addu r4,r4,r3
0014b7e0: 2673fffc addiu r19,r19,-0x0004
0014b7e4: 96c20000 lhu r2,0x0000(r22)
0014b7e8: 2610ffff addiu r16,r16,-0x0001
0014b7ec: 24420006 addiu r2,r2,0x0006
0014b7f0: 0601ffcb bgez r16,0x0014b720
0014b7f4: a6c20000 sh r2,0x0000(r22)
0014b7f8: 8e220024 lw r2,0x0024(r17)
0014b7fc: 8e240000 lw r4,0x0000(r17)
0014b800: 8c450000 lw r5,0x0000(r2)
0014b804: 0c04bf48 jal 0x0012fd20
0014b808: 00000000 nop
0014b80c: 2403ffff addiu r3,r0,-0x0001
0014b810: 10430014 beq r2,r3,0x0014b864
0014b814: ae220010 sw r2,0x0010(r17)
0014b818: 8e230000 lw r3,0x0000(r17)
0014b81c: 26420001 addiu r2,r18,0x0001
0014b820: ae22001c sw r2,0x001c(r17)
0014b824: 340200e0 ori r2,r0,0x00e0
0014b828: 14620005 bne r3,r2,0x0014b840
0014b82c: 00000000 nop
0014b830: 3c128017 lui r18,0x8017
0014b834: 265220bc addiu r18,r18,0x20bc
0014b838: 08052e14 j 0x0014b850
0014b83c: 00000000 nop
0014b840: 8e240010 lw r4,0x0010(r17)
0014b844: 0c04ca09 jal 0x00132824
0014b848: 00000000 nop
0014b84c: 00409021 addu r18,r2,r0
0014b850: 8e220024 lw r2,0x0024(r17)
0014b854: 00000000 nop
0014b858: 24420004 addiu r2,r2,0x0004
0014b85c: 08052d24 j 0x0014b490
0014b860: ae220024 sw r2,0x0024(r17)
0014b864: 8e240000 lw r4,0x0000(r17)
0014b868: 340200f0 ori r2,r0,0x00f0
0014b86c: 308300f0 andi r3,r4,0x00f0
0014b870: 1462001e bne r3,r2,0x0014b8ec
0014b874: 3082000f andi r2,r4,0x000f
0014b878: 28420004 slti r2,r2,0x0004
0014b87c: 1040001b beq r2,r0,0x0014b8ec
0014b880: 26420003 addiu r2,r18,0x0003
0014b884: ae22001c sw r2,0x001c(r17)
0014b888: 92420000 lbu r2,0x0000(r18)
0014b88c: 00000000 nop
0014b890: 30420003 andi r2,r2,0x0003
0014b894: 000210c0 sll r2,r2,0x03
0014b898: ae220014 sw r2,0x0014(r17)
0014b89c: 92420001 lbu r2,0x0001(r18)
0014b8a0: 8e230014 lw r3,0x0014(r17)
0014b8a4: 00021142 srl r2,r2,0x05
0014b8a8: ae220018 sw r2,0x0018(r17)
0014b8ac: 00431021 addu r2,r2,r3
0014b8b0: 24420004 addiu r2,r2,0x0004
0014b8b4: ae220018 sw r2,0x0018(r17)
0014b8b8: 92420001 lbu r2,0x0001(r18)
0014b8bc: 00000000 nop
0014b8c0: 3042000f andi r2,r2,0x000f
0014b8c4: 000219c0 sll r3,r2,0x07
0014b8c8: 00621823 subu r3,r3,r2
0014b8cc: 00031840 sll r3,r3,0x01
0014b8d0: ae230014 sw r3,0x0014(r17)
0014b8d4: 92420002 lbu r2,0x0002(r18)
0014b8d8: 00000000 nop
0014b8dc: 00431021 addu r2,r2,r3
0014b8e0: 02429023 subu r18,r18,r2
0014b8e4: 08052d24 j 0x0014b490
0014b8e8: ae220014 sw r2,0x0014(r17)
0014b8ec: 8e220000 lw r2,0x0000(r17)
0014b8f0: 340300fe ori r3,r0,0x00fe
0014b8f4: 304200fe andi r2,r2,0x00fe
0014b8f8: 14430008 bne r2,r3,0x0014b91c
0014b8fc: 02202021 addu r4,r17,r0
0014b900: 8e22001c lw r2,0x001c(r17)
0014b904: 2403ffff addiu r3,r0,-0x0001
0014b908: 10430033 beq r2,r3,0x0014b9d8
0014b90c: 00000000 nop
0014b910: 00409021 addu r18,r2,r0
0014b914: 08052d24 j 0x0014b490
0014b918: ae23001c sw r3,0x001c(r17)
0014b91c: 0c052e8a jal 0x0014ba28
0014b920: 02402821 addu r5,r18,r0
0014b924: 08052d24 j 0x0014b490
0014b928: 00409021 addu r18,r2,r0
0014b92c: 02202021 addu r4,r17,r0
0014b930: 0c052e8a jal 0x0014ba28
0014b934: 02402821 addu r5,r18,r0
0014b938: 3c038016 lui r3,0x8016
0014b93c: 8c636024 lw r3,0x6024(r3)
0014b940: 00000000 nop
0014b944: 02a3182a slt r3,r21,r3
0014b948: 10600023 beq r3,r0,0x0014b9d8
0014b94c: 00409021 addu r18,r2,r0
0014b950: 3c028016 lui r2,0x8016
0014b954: 8c426020 lw r2,0x6020(r2)
0014b958: 00000000 nop
0014b95c: 02a2102a slt r2,r21,r2
0014b960: 1440000e bne r2,r0,0x0014b99c
0014b964: 03c02821 addu r5,r30,r0
0014b968: 3c068017 lui r6,0x8017
0014b96c: 24c6d9c8 addiu r6,r6,-0x2638
0014b970: 8e220000 lw r2,0x0000(r17)
0014b974: 3c078016 lui r7,0x8016
0014b978: 8ce75f8c lw r7,0x5f8c(r7)
0014b97c: 3c038017 lui r3,0x8017
0014b980: 8c633c98 lw r3,0x3c98(r3)
0014b984: 000220c0 sll r4,r2,0x03
0014b988: 00822021 addu r4,r4,r2
0014b98c: 00042080 sll r4,r4,0x02
0014b990: 00822023 subu r4,r4,r2
0014b994: 0c052f62 jal 0x0014bd88
0014b998: 00832021 addu r4,r4,r3
0014b99c: 8e220000 lw r2,0x0000(r17)
0014b9a0: 96c30000 lhu r3,0x0000(r22)
0014b9a4: 3c018016 lui r1,0x8016
0014b9a8: 00220821 addu r1,r1,r2
0014b9ac: 902260fc lbu r2,0x60fc(r1)
0014b9b0: 00000000 nop
0014b9b4: 00431021 addu r2,r2,r3
0014b9b8: a6c20000 sh r2,0x0000(r22)
0014b9bc: 00021400 sll r2,r2,0x10
0014b9c0: 8ec30008 lw r3,0x0008(r22)
0014b9c4: 00021403 sra r2,r2,0x10
0014b9c8: 2463fff8 addiu r3,r3,-0x0008
0014b9cc: 0043102a slt r2,r2,r3
0014b9d0: 1440feaf bne r2,r0,0x0014b490
0014b9d4: 00000000 nop

0014b9d8: 340200ff ori r2,r0,0x00ff
0014b9dc: 3c018016 lui r1,0x8016
0014b9e0: ac205f8c sw r0,0x5f8c(r1)
0014b9e4: 3c018016 lui r1,0x8016
0014b9e8: ac206020 sw r0,0x6020(r1)
0014b9ec: 3c018016 lui r1,0x8016
0014b9f0: ac226024 sw r2,0x6024(r1)
0014b9f4: 8fbf003c lw r31,0x003c(r29)
0014b9f8: 8fbe0038 lw r30,0x0038(r29)
0014b9fc: 8fb70034 lw r23,0x0034(r29)
0014ba00: 8fb60030 lw r22,0x0030(r29)
0014ba04: 8fb5002c lw r21,0x002c(r29)
0014ba08: 8fb40028 lw r20,0x0028(r29)
0014ba0c: 8fb30024 lw r19,0x0024(r29)
0014ba10: 8fb20020 lw r18,0x0020(r29)
0014ba14: 8fb1001c lw r17,0x001c(r29)
0014ba18: 8fb00018 lw r16,0x0018(r29)
0014ba1c: 27bd0040 addiu r29,r29,0x0040
0014ba20: 03e00008 jr r31
0014ba24: 00000000 nop