Difference between revisions of "Transfer Byte Values"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " Transfer Byte Values 0019ab48: 18c00009 blez r6,0x 0019ab70 Branch if Limit <= 0 0019ab4c: 00000000 nop 0019ab50: 00c43021 addu r6,r6,r4 Limit = Limit + Pointer 0019ab5...")
 
m
 
Line 1: Line 1:
  Transfer Byte Values
+
  Transfer r6 Bytes from r5 to r4
  0019ab48: 18c00009 blez r6,0x 0019ab70 Branch if Limit <= 0
+
-------------------------------------------
  0019ab4c: 00000000 nop
+
Parameters : r4 - Destination pointer
  0019ab50: 00c43021 addu r6,r6,r4 Limit = Limit + Pointer
+
              r5 - Origin pointer
  0019ab54: 90a20000 lbu r2,0x0000(r5) Load Byte
+
              r6 - Nb of byte to transfer
  0019ab58: 00000000 nop
+
  0019ab5c: a0820000 sb r2,0x0000(r4) Store Byte
+
Returns nothing
  0019ab60: 24840001 addiu r4,r4,0x0001 Pointer ++
+
-------------------------------------------
  0019ab64: 0086102a slt r2,r4,r6
+
  0019ab48: 18c00009 blez r6,0x0019ab70      {{f/Cond|<nowiki>If limit is > 0x00</nowiki>}}
  0019ab68: 1440fffa bne r2,r0,0x 0019ab54 Branch if Pointer < Limit
+
  0019ab4c: 00000000 nop                         |
  0019ab6c: 24a50001 addiu r5,r5,0x0001 Pointer2 ++
+
  0019ab50: 00c43021 addu r6,r6,r4               |{{f/std|<nowiki>Limit = Limit + Pointer</nowiki>}}
  0019ab70: 03e00008 jr r31
+
                                                {{f/bloop|Loop}}
 +
  0019ab54: 90a20000 lbu r2,0x0000(r5)               |{{f/load|Load Byte}}
 +
  0019ab58: 00000000 nop                             |
 +
  0019ab5c: a0820000 sb r2,0x0000(r4)                 |{{f/store|Store Byte}}
 +
  0019ab60: 24840001 addiu r4,r4,0x0001               |{{f/adr|Destination pointer + 1}}
 +
  0019ab64: 0086102a slt r2,r4,r6                     |{{f/std|Check Counter Vs Limit}}
 +
  0019ab68: 1440fffa bne r2,r0,0x0019ab54        {{f/eloop|Loop until limit is reached}}
 +
  0019ab6c: 24a50001 addiu r5,r5,0x0001               |{{f/adr|Origin pointer +1}}
 +
  0019ab70: 03e00008 jr r31                   END
 
  0019ab74: 00000000 nop
 
  0019ab74: 00000000 nop
 +
=== Return locations ===
 +
'''Battle.bin'''
 +
00195d64: [[ AI Ability Data Setting]]
 +
0019a188:
 +
0019bd9c:
 +
0019e204:
 +
0019e250:
 +
0019e270:
 +
0019e280:
 +
0019e298:
 +
0019e2b0:
 +
0019e2c0:
 +
0019e2d0:
 +
0019e2e8:
 +
0019e300:
 +
0019e348:
 +
0019e414:
 +
0019e43c:
 +
0019e44c:
 +
0019e464:
 +
0019e47c:
 +
0019e48c:
 +
0019e49c:
 +
0019e4b4:
 +
0019e4cc:
 +
0019e514:

Latest revision as of 19:07, 16 April 2023

Transfer r6 Bytes from r5 to r4
-------------------------------------------
Parameters : r4 - Destination pointer
             r5 - Origin pointer
             r6 - Nb of byte to transfer

Returns nothing
-------------------------------------------
0019ab48: 18c00009 blez r6,0x0019ab70       #If limit is > 0x00
0019ab4c: 00000000 nop                          |
0019ab50: 00c43021 addu r6,r6,r4                |Limit = Limit + Pointer
                                                @Loop
0019ab54: 90a20000 lbu r2,0x0000(r5)                |Load Byte
0019ab58: 00000000 nop                              |
0019ab5c: a0820000 sb r2,0x0000(r4)                 |Store Byte
0019ab60: 24840001 addiu r4,r4,0x0001               |Destination pointer + 1
0019ab64: 0086102a slt r2,r4,r6                     |Check Counter Vs Limit
0019ab68: 1440fffa bne r2,r0,0x0019ab54         Λ Loop until limit is reached
0019ab6c: 24a50001 addiu r5,r5,0x0001               |Origin pointer +1
0019ab70: 03e00008 jr r31                   END
0019ab74: 00000000 nop

Return locations

Battle.bin
00195d64: AI Ability Data Setting
0019a188:
0019bd9c:
0019e204:
0019e250:
0019e270:
0019e280:
0019e298:
0019e2b0:
0019e2c0:
0019e2d0:
0019e2e8:
0019e300:
0019e348:
0019e414:
0019e43c:
0019e44c:
0019e464:
0019e47c:
0019e48c:
0019e49c:
0019e4b4:
0019e4cc:
0019e514: