Thread: [Tutorial] HackMew's Knowledge
View Single Post
  #105    
Old April 11th, 2012 (3:57 AM).
YouListeningROMs's Avatar
YouListeningROMs YouListeningROMs is offline
     
    Join Date: Mar 2012
    Gender: Male
    Posts: 24
    Quote:
    Originally Posted by NintendoBoyDX View Post
    There are a couple of ways in fr. There is software interrupt 0x6, which is a bios function call that does division and modulo. There is routine 081E4018 developed by gamefreak, that does division and modulo as well.

    R0 = dividend
    R1 = divisor

    returning
    R0 = quotient
    R1 = modulo answer

    081E4684 is another routine made by gamefreak that does modulo only.

    A few other math routines:
    081E460C: another division routine
    081E3B9C: square root, calls swi 0x8

    I've stumbled across a few others that I dont remember..
    Thank you for your assistance.
    Reply With Quote