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
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.
I had the same problem. Specially if you are using Linux, try "./maze1.dat" instead.
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.