1

I can't find a source to learn how to edit files on MIPS. So far I have a code that write on a file, but it just overwrite the file and not actually just modify some parts.

What I wanted to is for example, the text file has: Happy 20th Birthday!

and I wanted to change it to be: Happy 21st Birthday!

What can I do to just modify a part and not overwrite the whole file? or is there a file-pointer that I can use? If so, how can does it work?

MonkeyD
  • 15
  • 4

1 Answers1

0

MIPS Mars simulator does not provide syscalls to modify a file. You can only read or write.

To do what you need, read the entire file into memory, modify the data in memory then write the modified data to a (new) file.

markgz
  • 6,054
  • 1
  • 19
  • 41