tags:

views:

403

answers:

2

I'm writing some mips code that reads in ~4kb per iteration of a loop. The problem is that the mp3 file that I'm reading from contains multiple instances of 1A, so syscall 14 stops and won't read anymore without reaching the actual end of the file. Is there any way around this? Also, does anyone have a complete list of the flags that can be added to syscall 13?

Thanks

A: 

Try opening the file in binary mode.

zvrba
Do you mean opening the file using the flag 0x8000 in $a1? Besides trying that, I'm not sure what else you could mean, and I've attempted that already. Thanks though
zvrba, you obviously don't know what you're talking about
DV
Well, he didn't give any platform-specific information, and 1A is hexadecimal 26, which is the EOF character for DOS files when opened in text mode.
zvrba
+1  A: 

If you're using the MARS simulator, I don't think this is possible (unless someone's extended the syscall interface in your particular install). From the docs here:

MARS implements two modes: 0 for read and 1 for write, and ignores flags.

If you're using a simulator other than MARS, you need to tell us which one. Not all of them implement the same syscalls.

paxdiablo