This commit is contained in:
施羿廷
2024-10-04 19:53:08 +00:00
parent 0284b75ab6
commit ba9ef819ba
59 changed files with 419 additions and 193 deletions

View File

@@ -172,3 +172,11 @@ ConsoleOutput::PutChar(char ch)
kernel->interrupt->Schedule(this, ConsoleTime, ConsoleWriteInt);
}
void
ConsoleOutput::PutString(char *str)
{
ASSERT(putBusy == FALSE);
WriteFile(writeFileNo, str, strlen(str));
putBusy = TRUE;
kernel->interrupt->Schedule(this, ConsoleTime, ConsoleWriteInt);
}

View File

@@ -76,6 +76,7 @@ class ConsoleOutput : public CallBackObj {
void PutChar(char ch); // Write "ch" to the console display,
// and return immediately. "callWhenDone"
// will called when the I/O completes.
void PutString(char *str);
void CallBack(); // Invoked when next character can be put
// out to the display.

View File

@@ -95,7 +95,7 @@ class Interrupt {
void Halt(); // quit and print out stats
void PrintInt(int number);
int CreateFile(char *filename);
int CreateFile(char *filename);
void YieldOnReturn(); // cause a context switch on return
// from an interrupt handler