Add Syscall: Exit, PutChar, GetCar, PutString, GetString

This commit is contained in:
Yorick Barbanneau 2021-10-11 22:41:17 +02:00
parent 6f405265a5
commit 80fc250109
15 changed files with 359 additions and 17 deletions

View file

@ -0,0 +1,25 @@
#ifdef CHANGED
#ifndef CONSOLEDRIVER_H
#define CONSOLEDRIVER_H
#include "copyright.h"
#include "utility.h"
#include "console.h"
class ConsoleDriver:dontcopythis {
public:
// initialize the hardware console device
ConsoleDriver(const char *readFile, const char *writeFile);
~ConsoleDriver(); // clean up
void PutChar(int ch); // Behaves like putchar(3S)
int GetChar(); // Behaves like getchar(3S)
void PutString(const char *s); // Behaves like fputs(3S)
void GetString(char *s, int n); // Behaves like fgets(3S)
private:
Console *console;
};
#endif // CONSOLEDRIVER_H
#endif // CHANGED