1

update textdemo to threads

This commit is contained in:
2022-07-11 18:18:01 +02:00
parent 957644582c
commit 7f7c528949
2 changed files with 24 additions and 5 deletions

View File

@ -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();
}

View File

@ -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