Reading files with MIPS assembly

前端 未结 3 1899
醉梦人生
醉梦人生 2021-01-05 15:24

I\'m trying to write a program that reads in characters from a .dat file that correspond to different colors to be displayed in the LED simulator; x = off, R = red, etc. My

3条回答
  •  自闭症患者
    2021-01-05 15:55

    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.

提交回复
热议问题