summaryrefslogtreecommitdiff
path: root/src/kernel/vga.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/vga.c')
-rw-r--r--src/kernel/vga.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/kernel/vga.c b/src/kernel/vga.c
index cf95bc2..f83a2cf 100644
--- a/src/kernel/vga.c
+++ b/src/kernel/vga.c
@@ -109,6 +109,20 @@ void put_32_dec(uint32_t n) {
put_char('0');
}
+void put_16_dec(uint16_t n) {
+ if (n) {
+ bool sig = false;
+ for (uint16_t m = 10000; m; m /= 10) {
+ if (((n / m) % 10) || sig) {
+ sig = true;
+ put_char((uint8_t)'0' + (n / m) % 10);
+ }
+ }
+ }
+ else
+ put_char('0');
+}
+
void put_8_dec(uint8_t n) {
if (n) {
bool sig = false;