Reading in MIPS external file so another file can use it?
Posted
by SkyWookie
on Stack Overflow
See other posts from Stack Overflow
or by SkyWookie
Published on 2009-12-04T00:45:45Z
Indexed on
2010/04/23
12:23 UTC
Read the original article
Hit count: 151
Hey all, I'm working on this final thing for my MIPS project and it's deceptively easy. I need to get a procedure (called feed) and let its main driver program use it by reading it in. I know that I'm supposed to use the call code 14 and .globl sym (I think) in order to feed it into the file and have it read it. I just need a basic tutorial or something, as I CANNOT find it on the Internet or in my book (just lists the call code, real helpful). Here's what I know:
I need to use read, but I also need a file descriptor (don't know where to get it). I need to put the buffer in $a1 and the length in $a2.
Well, that's about it. If there's any decent tutorial you could whip up or if there is one online that I don't see let me know please :). I just need a push in the right direction, I'm sure it can't be too difficult, just can't find any info on it!
© Stack Overflow or respective owner