solution:
file mars.jar (or other name of mars program) must be in the same directory with file "o.bmp"
Question
I'm trying to open binary file for reading in mars mips simulator:
.data
file: .asciiz "o.bmp"
.text
li $v0, 13
la $a0, file
li $a1, 0
li $a2, 0
syscall #file descriptor of oepened file in v0
beq $v0, -1, end #my program every time jumps to end so sth is wrong
Solution
solution:
file mars.jar (or other name of mars program) must be in the same directory with file "o.bmp"