/* halt.c * Simple program to test whether running a user program works. * * Just do a "syscall" that shuts down the OS. * * NOTE: for some reason, user programs with global data structures * sometimes haven't worked in the Nachos environment. So be careful * out there! One option is to allocate data structures as * automatics within a procedure, but if you do this, you have to * be careful to allocate a big enough stack to hold the automatics! */ #include "syscall.h" int main() { char buff[10]; char buff2[1]; int i; /*for (i=0;i<4;i++) buff[i]='P';*/ //buff[0]='H';buff[1]='O';buff[2]='L';buff[3]='A'; i=Read(buff, 10, 0); Write(buff, 3, 1); //no esta funcionando la devolucion de parametros!!!!Write(i,1,1); Halt(); /* not reached */ }