Skip to content

Commit 23b8c14

Browse files
committed
Added printing functions
1 parent d79d1a8 commit 23b8c14

File tree

13 files changed

+73
-53
lines changed

13 files changed

+73
-53
lines changed

OS.iso

0 Bytes
Binary file not shown.

build/OS.bin

132 Bytes
Binary file not shown.

build/full_kernel.bin

132 Bytes
Binary file not shown.

build/kernel.o

120 Bytes
Binary file not shown.

build/vga_text_driver.c.o

824 Bytes
Binary file not shown.

build/vga_text_mode.c.o

612 Bytes
Binary file not shown.

iso/floppy.img

0 Bytes
Binary file not shown.

kernel/drivers/vga_text_driver.c

Whitespace-only changes.

kernel/drivers/vga_text_driver.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#ifndef VGA_TEXT_DRIVER_H
2+
#define VGA_TEXT_DRIVER_H
3+
4+
enum uint8_t
5+
{
6+
BLACK,
7+
BLUE,
8+
GREEN,
9+
CYAN,
10+
RED,
11+
MAGENTA,
12+
BROWN,
13+
LIGHT_GREY,
14+
DARK_GREY,
15+
LIGHT_BLUE,
16+
LIGHT_GREEN,
17+
LIGHT_CYAN,
18+
LIGHT_RED,
19+
LIGHT_MAGENTA,
20+
LIGHT_BROWN,
21+
WHITE,
22+
} VGA_COLORS;
23+
24+
#endif

kernel/kernel.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
extern void main()
44
{
55
uint16_t* tty_buffer = (uint16_t*)0xb8000;
6-
//printformat("Hey! I am writing straight to video memory", 0x0f);
6+
clear(tty_buffer, (color_t){0x00, 0x0f});
77
uint16_t offset = set_cursor_position((coords){10, 1});
8-
print("Hey!", (color_t){0x0f, 0x00}, offset, tty_buffer);
9-
//tty_buffer[offset] = vga_struct('C', (color_t){0x0f, 0x00});
8+
9+
offset = print("Hey!", (color_t){0x0f, 0x00}, offset, tty_buffer);
10+
1011
return;
1112
}

0 commit comments

Comments
 (0)