Main

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
#   main()
#   Program entry point.  Where it all begins.

80010a30: 3c028003 lui r2,0x8003
80010a34: 244229bc addiu r2,r2,0x29bc               #   ptr = 0x800329bc
80010a38: 3c038004 lui r3,0x8004
80010a3c: 2463091c addiu r3,r3,0x091c               #   0x8004091c
                                                    #   do {
80010a40: ac400000 sw r0,0x0000(r2)                 #       *ptr = 0
80010a44: 24420004 addiu r2,r2,0x0004               #       ptr = ptr + 4
80010a48: 0043082b sltu r1,r2,r3
80010a4c: 1420fffc bne r1,r0,0x80010a40             #   } while (ptr < 0x8004091c);
80010a50: 00000000 nop
80010a54: 3c028004 lui r2,0x8004
80010a58: 8c42593c lw r2,0x593c(r2)                 #   *0x8004593c
80010a5c: 00000000 nop
80010a60: 2042fff8 addi r2,r2,-0x0008               #   *0x8004593c - 8
80010a64: 3c088000 lui r8,0x8000                    #   0x80000000
80010a68: 0048e825 or r29,r2,r8                     #   sp = (*0x8004593c - 8) | 0x80000000
80010a6c: 3c048004 lui r4,0x8004
80010a70: 2484091c addiu r4,r4,0x091c               #   0x8004091c
80010a74: 000420c0 sll r4,r4,0x03
80010a78: 000420c2 srl r4,r4,0x03                   #   0x0004091c
80010a7c: 3c038004 lui r3,0x8004
80010a80: 8c635940 lw r3,0x5940(r3)                 #   *0x80045940
80010a84: 00000000 nop
80010a88: 00432823 subu r5,r2,r3                    #   *0x8004593c - 8 - *0x80045940
80010a8c: 00a42823 subu r5,r5,r4                    #   *0x8004593c - 8 - *0x80045940 - 0x0004091c
80010a90: 3c018003 lui r1,0x8003
80010a94: ac258aec sw r5,-0x7514(r1)                #   *0x80028aec = *0x8004593c - 8 - *0x80045940 - 0x0004091c
80010a98: 00882025 or r4,r4,r8                      #   0x8004091c
80010a9c: 3c018003 lui r1,0x8003
80010aa0: ac248ae8 sw r4,-0x7518(r1)                #   *0x80028ae8 = 0x8004091c
80010aa4: 3c018003 lui r1,0x8003
80010aa8: ac3f29bc sw r31,0x29bc(r1)                #   *0x800329bc = ra
80010aac: 3c1c8003 lui r28,0x8003
80010ab0: 279c29bc addiu r28,r28,0x29bc             #   gp = 0x800329bc
80010ab4: 03a0f021 addu r30,r29,r0                  #   fp = sp
80010ab8: 3c1f8003 lui r31,0x8003
80010abc: 8fff29bc lw r31,0x29bc(r31)               #   ra = *0x800329bc
80010ac0: 00000000 nop
80010ac4: 0c0102e2 jal 0x80040b88                   #   00040b88 - 00040bd4 ();
80010ac8: 00000000 nop
80010acc: 0000004d break 0x00001                    #   breakpoint?
80010ad0: 3c088003 lui r8,0x8003
80010ad4: 8d088ae4 lw r8,-0x751c(r8)                #   *0x80028ae4
80010ad8: 27bdfff0 addiu r29,r29,-0x0010            
80010adc: afb00004 sw r16,0x0004(r29)
80010ae0: afb10008 sw r17,0x0008(r29)
80010ae4: afbf000c sw r31,0x000c(r29)
80010ae8: 1500000f bne r8,r0,0x80010b28             #   if (*0x80028ae4 == 0) {
80010aec: 34080001 ori r8,r0,0x0001
80010af0: 3c018003 lui r1,0x8003
80010af4: ac288ae4 sw r8,-0x751c(r1)                #       *0x80028ae4 = 1
80010af8: 3c108001 lui r16,0x8001
80010afc: 26100000 addiu r16,r16,0x0000             #       ptr = 0x80010000
80010b00: 3c110000 lui r17,0x0000
80010b04: 26310000 addiu r17,r17,0x0000             #       s1 = 0
80010b08: 12200007 beq r17,r0,0x80010b28            #       if (s1 != 0) {
80010b0c: 00000000 nop
                                                    #           do {
80010b10: 8e080000 lw r8,0x0000(r16)                #               func = *ptr   
80010b14: 26100004 addiu r16,r16,0x0004             #               ptr = ptr + 4
80010b18: 0100f809 jalr r8,r31                      #               func();
80010b1c: 2631ffff addiu r17,r17,-0x0001            #               s1 = s1 - 1
80010b20: 1620fffb bne r17,r0,0x80010b10
80010b24: 00000000 nop                                  
                                                    #           }  while (s1 != 0);
                                                    #       }
                                                    #   }
80010b28: 8fbf000c lw r31,0x000c(r29)
80010b2c: 8fb10008 lw r17,0x0008(r29)
80010b30: 8fb00004 lw r16,0x0004(r29)
80010b34: 27bd0010 addiu r29,r29,0x0010
80010b38: 03e00008 jr r31
80010b3c: 00000000 nop