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

39
c_os/user/demo/TextDemo.cc Executable file
View File

@ -0,0 +1,39 @@
/*****************************************************************************
* *
* T E X T D E M O *
* *
*---------------------------------------------------------------------------*
* Beschreibung: Testausgaben für den CGA-Treiber. *
* *
* Autor: Michael Schoettner, HHU, 26.10.2018 *
*****************************************************************************/
#include "user/demo/TextDemo.h"
void TextDemo::run() {
/* Hier muess Code eingefuegt werden */
kout << "TextDemo\n" << endl;
kout << "Attribut (GREEN on WHITE): "
<< white_b << green_f << "GREEN on WHITE" << endl
<< "Attribut (WHITE on BLACK): "
<< black_b << white_f << "WHITE on BLACK" << endl;
kout << endl;
kout << "Test der Zahlenausgabefunktion:" << endl
<< "| dec | hex | bin |" << endl
<< "+-------+-------+-------+" << endl;
for (unsigned short num = 0; num < 17; ++num) {
kout << fillw(0) << "| " << fillw(6) << dec << num
<< fillw(0) << "| " << fillw(6) << hex << num
<< fillw(0) << "| " << fillw(6) << bin << num
<< fillw(0) << "|" << endl;
}
kout << endl;
scheduler.exit();
}

29
c_os/user/demo/TextDemo.h Executable file
View File

@ -0,0 +1,29 @@
/*****************************************************************************
* *
* T E X T D E M O *
* *
*---------------------------------------------------------------------------*
* Beschreibung: Testausgaben für den CGA-Treiber. *
* *
* Autor: Michael Schoettner, HHU, 26.10.2018 *
*****************************************************************************/
#ifndef __TextDemo_include__
#define __TextDemo_include__
#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