aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-02-21 13:39:12 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-02-21 13:40:39 +0200
commit79c0f7dfb063b5d29dc4547d37efbcb86a89fdac (patch)
treeebbc32b22b31e675ebb5b992a20d569d3bfa8b9e /drivers
parentAdd IDT (diff)
downloadkernel.cpp-79c0f7dfb063b5d29dc4547d37efbcb86a89fdac.tar.xz
Call global constructors
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cga.cc4
-rw-r--r--drivers/cga.h6
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/cga.cc b/drivers/cga.cc
index 961d7e4..0646ff7 100644
--- a/drivers/cga.cc
+++ b/drivers/cga.cc
@@ -22,7 +22,9 @@ constexpr uint8_t cursor_addr_l = 15; // 0xf
*/
constexpr uint8_t cursor_hide = 0b00100000;
-CGA::CGA(Colour fg, Colour bg, uint32_t address) : colour_fg(fg), colour_bg(bg) {
+constexpr uint32_t address = 0xB8000;
+
+CGA::CGA() {
buffer = reinterpret_cast<Entry*>(address);
// clear buffer
diff --git a/drivers/cga.h b/drivers/cga.h
index f0ca412..f4dfb3c 100644
--- a/drivers/cga.h
+++ b/drivers/cga.h
@@ -35,7 +35,7 @@ public:
CGA_COLOR_WHITE = 15,
};
- CGA(Colour fg = CGA_COLOR_BLACK, Colour bg = CGA_COLOR_LIGHT_GREY, uint32_t address = 0xB8000);
+ CGA();
~CGA() = default;
void set_colour(Colour fg, Colour bg);
@@ -58,8 +58,8 @@ private:
const size_t max_columns = 80, max_rows = 25;
size_t column = 0, row = 0;
- Colour colour_fg;
- Colour colour_bg;
+ Colour colour_fg = CGA_COLOR_BLACK;
+ Colour colour_bg = CGA_COLOR_LIGHT_GREY;
Entry* buffer;