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    
Was it helpful?

Solution

solution:

file mars.jar (or other name of mars program) must be in the same directory with file "o.bmp"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top