diff --git a/c_os/user/TextDemo.cc b/c_os/user/demo/TextDemo.cc similarity index 83% rename from c_os/user/TextDemo.cc rename to c_os/user/demo/TextDemo.cc index c2466f9..13edf68 100755 --- a/c_os/user/TextDemo.cc +++ b/c_os/user/demo/TextDemo.cc @@ -8,15 +8,19 @@ * Autor: Michael Schoettner, HHU, 26.10.2018 * *****************************************************************************/ -#include "kernel/Globals.h" +#include "user/demo/TextDemo.h" -void text_demo() { +void TextDemo::run() { /* Hier muess Code eingefuegt werden */ + + kout << "TextDemo\n" << endl; + kout << "Attribut (GREEN on WHITE): " - << bgc(CGA::WHITE) << fgc(CGA::GREEN) << "GREEN on WHITE" << endl + << white_b << green_f << "GREEN on WHITE" << endl << "Attribut (WHITE on BLACK): " - << bgc(CGA::BLACK) << fgc(CGA::WHITE) << "WHITE on BLACK" << endl; + << black_b << white_f << "WHITE on BLACK" << endl; + kout << endl; kout << "Test der Zahlenausgabefunktion:" << endl << "| dec | hex | bin |" << endl @@ -30,4 +34,6 @@ void text_demo() { } kout << endl; + + scheduler.exit(); } diff --git a/c_os/user/TextDemo.h b/c_os/user/demo/TextDemo.h similarity index 75% rename from c_os/user/TextDemo.h rename to c_os/user/demo/TextDemo.h index 089c222..cb38f2f 100755 --- a/c_os/user/TextDemo.h +++ b/c_os/user/demo/TextDemo.h @@ -11,6 +11,19 @@ #ifndef __TextDemo_include__ #define __TextDemo_include__ -void text_demo(); +#include "kernel/threads/Thread.h" +#include "kernel/Globals.h" + +class TextDemo : public Thread { +private: + TextDemo(const TextDemo& copy) = delete; + +public: + TextDemo() { + kout << "Initialized TextDemo" << endl; + } + + void run() override; +}; #endif