An advanced calculator in MIPS assembly