diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-21 17:32:50 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-21 17:32:50 +0200 |
commit | 7708a5f335c6b3256290775e7f5deb43b681bf03 (patch) | |
tree | 8ddb55ee633a70ea298a812d5ffec97373631534 /Source/Library | |
parent | 9836acd720988af30250c2c1ec18d618664dea4e (diff) | |
download | Melon-7708a5f335c6b3256290775e7f5deb43b681bf03.tar.gz Melon-7708a5f335c6b3256290775e7f5deb43b681bf03.zip |
More work
Diffstat (limited to 'Source/Library')
-rw-r--r-- | Source/Library/Interface/VirtualTerminal.iface.h | 5 | ||||
-rw-r--r-- | Source/Library/Userland/Binding/VirtualTerminal.class.h | 10 | ||||
-rw-r--r-- | Source/Library/Userland/Start.cpp | 5 |
3 files changed, 16 insertions, 4 deletions
diff --git a/Source/Library/Interface/VirtualTerminal.iface.h b/Source/Library/Interface/VirtualTerminal.iface.h index 412cf8f..c6388e6 100644 --- a/Source/Library/Interface/VirtualTerminal.iface.h +++ b/Source/Library/Interface/VirtualTerminal.iface.h @@ -3,8 +3,9 @@ #define VTIF_OBJTYPE 0x10 -//S = static, GET = get, PR = process, VT = virtualterminal -#define VTIF_SGETPRVT 0 +//S = static, GET = get, PR = process, IN/OUT : in/out, VT = virtualterminal +#define VTIF_SGETPRINVT 6 +#define VTIF_SGETPROUTVT 7 #define VTIF_PUT 0x01 #define VTIF_WRITEHEX 0x02 diff --git a/Source/Library/Userland/Binding/VirtualTerminal.class.h b/Source/Library/Userland/Binding/VirtualTerminal.class.h index 9d438c6..06a8dd7 100644 --- a/Source/Library/Userland/Binding/VirtualTerminal.class.h +++ b/Source/Library/Userland/Binding/VirtualTerminal.class.h @@ -7,8 +7,12 @@ class VirtualTerminal : public RessourceCaller { public: - static VirtualTerminal get() { - u32int id = RessourceCaller::sCall(VTIF_OBJTYPE, VTIF_SGETPRVT); + static VirtualTerminal getIn() { + u32int id = RessourceCaller::sCall(VTIF_OBJTYPE, VTIF_SGETPRINVT); + return VirtualTerminal(id); + } + static VirtualTerminal getOut() { + u32int id = RessourceCaller::sCall(VTIF_OBJTYPE, VTIF_SGETPROUTVT); return VirtualTerminal(id); } VirtualTerminal(u32int id) : RessourceCaller(id, VTIF_OBJTYPE) {} @@ -46,3 +50,5 @@ class VirtualTerminal : public RessourceCaller { inline VirtualTerminal& operator<<(s64int i) { writeDec(i); return *this; } inline VirtualTerminal& operator<<(u32int i) { writeHex(i); return *this; } }; + +extern VirtualTerminal invt, outvt; diff --git a/Source/Library/Userland/Start.cpp b/Source/Library/Userland/Start.cpp index 639210f..dee7da6 100644 --- a/Source/Library/Userland/Start.cpp +++ b/Source/Library/Userland/Start.cpp @@ -1,4 +1,5 @@ #include <types.h> +#include <Binding/VirtualTerminal.class.h> #include <Heap.class.h> @@ -10,6 +11,8 @@ extern u32int start_ctors, end_ctors, start_dtors, end_dtors; Heap heap; +VirtualTerminal invt(0), outvt(0); + int main(); extern "C" void start() { @@ -19,6 +22,8 @@ extern "C" void start() { } heap.create(0x40000000, 0x00100000, 0x00004000); //Initially create a 1M heap with 16ko index + invt = VirtualTerminal::getIn(); outvt = VirtualTerminal::getOut(); + u32int r = main(); //Call static destructors |