From 0cca2d68451849b5ea96a3620566fd0b42dde3c0 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sun, 18 Oct 2009 21:56:26 +0200 Subject: More work on syscalls --- Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp | 15 +++++++++++++++ Source/Kernel/VTManager/VirtualTerminal.proto.cpp | 3 +++ Source/Kernel/VTManager/VirtualTerminal.proto.h | 3 +++ 3 files changed, 21 insertions(+) (limited to 'Source/Kernel/VTManager') diff --git a/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp b/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp index 8948657..e0c6e8d 100644 --- a/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp +++ b/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp @@ -5,7 +5,22 @@ u32int VirtualTerminal::writeHexSC(u32int number) { return 0; } +u32int VirtualTerminal::writeSC(u32int wat) { + write(String::unserialize(wat)); + return 0; +} + +u32int VirtualTerminal::writeDecSC(u32int n_hi, u32int n_lo) { + s64int n = ((u64int)n_hi << 32) | n_lo; + writeDec(n); + return 0; +} + u32int VirtualTerminal::putSC(u32int code) { put(WChar(code)); return 0; } + +u32int VirtualTerminal::readLineSC() { + return readLine().serialize(); +} diff --git a/Source/Kernel/VTManager/VirtualTerminal.proto.cpp b/Source/Kernel/VTManager/VirtualTerminal.proto.cpp index b7c7340..dfd8f84 100644 --- a/Source/Kernel/VTManager/VirtualTerminal.proto.cpp +++ b/Source/Kernel/VTManager/VirtualTerminal.proto.cpp @@ -7,7 +7,10 @@ VirtualTerminal::VirtualTerminal() : Ressource(VT_IFACE_OBJTYPE), m_kbdMutex(false), m_kbdbuffMutex(false), m_kbdbuff() { addCall1(VT_IFACE_WRITEHEX, (call1)&VirtualTerminal::writeHexSC); + addCall2(VT_IFACE_WRITEDEC, (call2)&VirtualTerminal::writeDecSC); + addCall1(VT_IFACE_WRITE, (call1)&VirtualTerminal::writeSC); addCall1(VT_IFACE_PUT, (call1)&VirtualTerminal::putSC); + addCall0(VT_IFACE_READLINE, (call0)&VirtualTerminal::readLineSC); } VirtualTerminal::~VirtualTerminal() { diff --git a/Source/Kernel/VTManager/VirtualTerminal.proto.h b/Source/Kernel/VTManager/VirtualTerminal.proto.h index b9d0eb8..b0cd224 100644 --- a/Source/Kernel/VTManager/VirtualTerminal.proto.h +++ b/Source/Kernel/VTManager/VirtualTerminal.proto.h @@ -21,7 +21,10 @@ class VirtualTerminal : public Ressource { //SYSCALLS : u32int writeHexSC(u32int); + u32int writeDecSC(u32int, u32int); + u32int writeSC(u32int); u32int putSC(u32int); + u32int readLineSC(); public: VirtualTerminal(); -- cgit v1.2.3