
It should directly show the contents of your directory. include Windows (all versions), Linux/Ubuntu (32-bit), Linux/Ubuntu (64-bit), and Mac. Verifying if the MARS JAVA process's home is indeed your code's home- The QtSpim MIPS simulator will be used for programs in this text. (Or an equivalent arrangement in Windows). You can do this by issuing the following in your code-and-file directory (MAC or Linux, assuming java is installed!).

MIPS EMULATOR MAC CODE
Hence, JAVA process MARS should run from the same directory as your code and file that you are trying to open.
MIPS EMULATOR MAC SERIAL
In case of MIPS or MIPSEL, it can emulate a platform with an IDE controller, and IDE hard disk, an Ethernet card and a serial port.

Note that you are trying to open a relative path "hundredints.bin" (relative to the MARS Java process's home directory). QEMU is a generic and open source processor emulator which can emulate i386, x8664, MIPS, MIPSEL, PowerPC and SPARC systems. The above link also says "The underlying file I/O implementation uses java.io.FileInputStream.read() to read and java.io.FileOutputStream.write() to write." Its purpose is to mimic the the PS2 hardware, using a combination MIPS CPU Interpreters, Recompilers and a Virtual Machine which manages hardware states and PS2 system memory. If this is negative, (most likely in your case?) - it means the file couldn't be opened by the JAVA process that is MARS. PCSX2 is an open source Playstation 2 emulator.

You can verify that by assembling the code in MARS, putting a breakpoint onĪnd inspecting the contents of $s0 after this line executes (or alternatively print $s0 as an integer using syscall 1 in $v0). However, according to MARS syscall specifications, on issuing a syscall for opening a file, if $v0 gets a negative value, it means there was a problem in opening the file. unter Mips Emulator Mac MARS (M IPS Assembler and Runtime Simulator) An IDE for MIPS Assembly Language Programming MARS is a lightweight interactive.
