Reading files with MIPS assembly

…衆ロ難τιáo~ 提交于 2019-12-05 15:49:36

The only issue is your buffer is simply an empty string, which is only reserving one byte (null byte). You should instead use buffer: .space 1024 or however many bytes you need. Everything else seems fine.

If you are having trouble opening the file, make sure the extension is exactly correct. But my test just worked a .dat file and a few random text files.

Make sure the you are running MARS from the same directory the file is located. Simply move the MARS .jar to the directory containing "maze1.dat" and run it from there.

I had the same problem. Specially if you are using Linux, try "./maze1.dat" instead.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!