EarthBound Beginnings/ASM/Math Routines

From Data Crystal
Jump to navigation Jump to search

For Earthbound Beginnings; this is from the base engine

  • PRG31:$F031~$F108 = Multiplication: $60 3 byte = $60 2 byte * $64 1 byte
  • PRG31:$F109~$F124 = Multiplication: $60 4 byte = $60 3 byte * $64 1 byte
  • PRG31:$F125~$F13C = Multiplication: A = A * X low byte, X = A * X high byte; $60 and $64 used)
  • PRG31:$F13D~$F160 = Division: ($60 3 byte / 256) = ($60 3 byte / 256) / $64, $68 = ($60 3 byte % (256 * $64))
  • PRG31:$F161~$F199 = Text String: $68~$6F holds number text bytes based on number value in $60 3 byte
  • PRG31:$F19A~$F1A3 = Number text bytes