failing like never before

25Jun/080

Make Me a Syscall

I was working on a assembly language project for my computer science class one night, and was having a devil of a time debugging it. The program was supposed to read data from a file using system calls (syscalls) (and then do some more stuff) but for some reason, my program refused to read data from file. I spent over an hour tracing through my code, trying to find the probably obvious bug. My code around the "bug" looked a little like this:

...
move   $a0,$s0
move   $a1,$s1
li          $v0,14
...

I realize its a little hard to understand out of context, but what happened was that I set up all the registers properly but never actually made a syscall!