aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/io.cpp
blob: eab6473c849a075efbc51755b85e2fb171707ee3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "kapi/io.hpp"

#include "x86_64/vga/text.hpp"

namespace teachos::io
{

  auto init() -> void
  {
    x86_64::vga::text::clear();
    x86_64::vga::text::cursor(false);
  }

  auto print(std::string_view text) -> void
  {
    x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::green_on_black);
  }

  auto println(std::string_view text) -> void
  {
    x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::green_on_black);
    x86_64::vga::text::newline();
  }

  auto print_error(std::string_view text) -> void
  {
    x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::red_on_black);
  }

  auto println_error(std::string_view text) -> void
  {
    x86_64::vga::text::write(text, x86_64::vga::text::common_attributes::red_on_black);
    x86_64::vga::text::newline();
  }

}  // namespace teachos::io