Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

MIPS/GCC help

Name: Anonymous 2012-08-29 16:56

Why "beqz $a1, return", when $a1 is always nonzero? Is GCC retarded?

TEXT:800BFEC0                 lbu     $a2, 0($s0)
TEXT:800BFEC4                 addiu   $s0, 1
TEXT:800BFEC8                 lbu     $a1, 0($s0)
TEXT:800BFECC                 addiu   $s0, 1
TEXT:800BFED0                 andi    $v0, $a1, 0xC0
TEXT:800BFED4                 sll     $v0, 2
TEXT:800BFED8                 or      $a2, $v0
TEXT:800BFEDC                 andi    $a1, 0x3F
TEXT:800BFEE0                 addiu   $a1, 3
TEXT:800BFEE4                 beqz    $a1, return
TEXT:800BFEE8                 move    $a0, $zero

Name: Anonymous 2012-08-29 17:14

GCC is terrible!

Name: Anonymous 2012-08-29 17:31

What code was this compiled from?

Name: Anonymous 2012-08-29 17:34

>>3
No idea. It is a disassembly of Vandal Hearts executable.

Name: Anonymous 2012-08-29 18:16

The game uses some stupid LZ77 variation, where backref codes point into a 0x400 sliding window and unpacker copies every byte into both - output and this stupid window.

Don't change these.
Name: Email:
Entire Thread Thread List