44 return std::span<vmemSymbol, VIDEO_MEM_SIZE> {
136 if (symbol ==
'\b') {
147 }
else if (symbol ==
'\t') {
151 }
else if (symbol ==
'\r') {
155 }
else if (symbol ==
'\n') {
161 }
else if (symbol >=
' ') {
198 void vmemWrite(
const std::string_view message)
noexcept {
200 for (
const auto symbol : message) {
static auto readPort8(const port_t addr) noexcept -> igros_byte_t
Read byte from port.
static void writePort8(const port_t addr, const igros_byte_t value) noexcept
Write byte to port.
std::uint16_t igros_word_t
16-bit unsigned integer
std::uint8_t igros_byte_t
8-bit unsigned integer
std::uint32_t igros_dword_t
32-bit unsigned integer
Architecture-independent interface: drivers and aliases of current architecture types.
auto vmemCursorGet() noexcept -> vmemCursor
Get VGA memory cursor position.
static constinit auto vmemBkgColor
VGA memory background symbol.
void vmemWrite(const char symbol) noexcept
Write symbol to VGA memory.
constexpr auto VIDEO_MEM_PHYS
VGA text buffer physical address.
constexpr auto VGA_CURSOR_CONTROL
CRT controller register select port.
constexpr auto VGA_CURSOR_DATA
CRT controller data port.
void vmemCursorDisable() noexcept
Disable VGA memory cursor.
static auto vmemScreen() noexcept -> std::span< vmemSymbol, VIDEO_MEM_SIZE >
VGA text buffer (low memory is mapped at kernel virtual offset).
auto vmemInit() noexcept -> bool
Init VGA console.
static constexpr auto VIDEO_MEM_WIDTH
VGA console max width.
vmemColor
VGA memory colors enumeration.
void vmemCursorEnable() noexcept
Enable VGA memory cursor.
void vmemCursorSet(const igros_byte_t x, const igros_byte_t y) noexcept
Set VGA memory cursor position.
static constinit vmemCursor cursorPos
Current cursor coordinates.
void vmemClear() noexcept
Clear VGA console.
static constexpr auto VIDEO_MEM_HEIGHT
VGA console max height.
static constexpr auto VIDEO_MEM_TAB_SIZE
TAB size.
void vmemSetColor(const igros_byte_t background, const igros_byte_t foreground) noexcept
Set VGA memory color.
static auto vmemBlank() noexcept -> vmemSymbol
Blank symbol (space with current background).
static constexpr auto VIDEO_MEM_SIZE
VGA console size.
constexpr auto kstrview(const char *const src) noexcept -> std::string_view
View of null-terminated string (null pointer is empty string).
igros_word_t port_t
Define port data type which is 16bit word.
VGA memory cursor struct.
igros_byte_t x
Cursor X coordinate.
igros_byte_t y
Cursor Y coordinate.
VGA memory symbol representation.
igros_sbyte_t symbol
Symbol.
VGA memory low-level operations.