Copy Bytes (0x14bf54)

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
#   ROUTINE: COPY BYTES (0x14bf54)
#   This routine copies data byte by byte from a source pointer to a destination pointer, using a specified size as number of bytes to copy.
#   Parameters:
#       r4 = Destination pointer
#       r5 = Source pointer
#       r6 = Size
                                                #   do {
0014bf54: 90a70000 lbu r7,0x0000(r5)            #       *sourcePointer
0014bf58: 00000000 nop
0014bf5c: a0870000 sb r7,0x0000(r4)             #       *destinationPointer = *sourcePointer
0014bf60: 20840001 addi r4,r4,0x0001            #       destinationPointer = destinationPointer + 1
0014bf64: 20a50001 addi r5,r5,0x0001            #       sourcePointer = sourcePointer + 1
0014bf68: 20c6ffff addi r6,r6,-0x0001           #       size = size - 1
0014bf6c: 14c0fff9 bne r6,r0,0x0014bf54
0014bf70: 00000000 nop                          #   } while (size != 0)
0014bf74: 03e00008 jr r31
0014bf78: 00000000 nop