Rewrite GetInt syscall

This commit is contained in:
Yorick Barbanneau 2021-10-15 13:46:19 +02:00
parent 5cccda4af3
commit 3609600063
4 changed files with 8 additions and 8 deletions

View file

@ -190,9 +190,11 @@ ExceptionHandler (ExceptionType which)
case SC_GetInt:
{
DEBUG('s', "GetInt\n");
int n = consoledriver->GetInt();
int n;
int addr = machine->ReadRegister(4);
consoledriver->GetInt(&n);
DEBUG('s', "Number entered: %d\n", n);
machine->WriteRegister(2,n);
machine->WriteMem(addr,sizeof(n),n);
break;
}
#endif