diff options
Diffstat (limited to 'Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp')
-rw-r--r-- | Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp b/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp index 0a4e14b..5506c74 100644 --- a/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp +++ b/Source/Kernel/VTManager/VirtualTerminal-sc.proto.cpp @@ -1,4 +1,25 @@ #include "VirtualTerminal.proto.h" +#include <VirtualTerminal.iface.h> +#include <TaskManager/Task.ns.h> + +call_t VirtualTerminal::m_callTable[] = { + CALL1(VTIF_WRITEHEX, &VirtualTerminal::writeHexSC), + CALL2(VTIF_WRITEDEC, &VirtualTerminal::writeDecSC), + CALL1(VTIF_WRITE, &VirtualTerminal::writeSC), + CALL1(VTIF_PUT, &VirtualTerminal::putSC), + CALL1(VTIF_READLINE, &VirtualTerminal::readLineSC), + CALL1(VTIF_SETCOLOR, &VirtualTerminal::setColorSC), + CALL1(VTIF_SETCSRLINE, &VirtualTerminal::setCursorLineSC), + CALL1(VTIF_SETCSRCOL, &VirtualTerminal::setCursorColSC), + CALL0(VTIF_ISBOXED, &VirtualTerminal::isBoxedSC), + CALL0(0, 0) +}; + +u32int VirtualTerminal::scall(u8int wat, u32int a, u32int b, u32int c, u32int d) { + if (wat == VTIF_SGETPRINVT) return Task::currProcess()->getInVT()->resId(); + if (wat == VTIF_SGETPROUTVT) return Task::currProcess()->getOutVT()->resId(); + return (u32int) - 1; +} u32int VirtualTerminal::writeHexSC(u32int number) { writeHex(number); @@ -22,8 +43,8 @@ u32int VirtualTerminal::putSC(u32int code) { return 0; } -u32int VirtualTerminal::readLineSC() { - return readLine().serialize(); +u32int VirtualTerminal::readLineSC(u32int show) { + return readLine(show != 0).serialize(); } u32int VirtualTerminal::setColorSC(u32int x) { |