feat(kernel): print klog to screen

This commit is contained in:
d0p1 🏳️‍⚧️ 2024-07-15 08:32:59 +02:00
parent f47382bd56
commit 6027655f3c
3 changed files with 16 additions and 4 deletions

View file

@ -75,7 +75,11 @@ cga_putc:
call cga_getpos
mov [ebp-0x2], ax
pop eax
cmp al, CR
jne @f
leave
ret
@@:
cmp al, LF
jne @f
mov ax, [ebp-0x2]

View file

@ -67,8 +67,8 @@ kmain:
mov eax, SYSCALL_EXIT
int 0x42
mov al, 'X'
call cga_putc
;mov al, 'X'
;call cga_putc
call floppy_probe

View file

@ -34,7 +34,9 @@ klog_print:
or al, al
jz @f
out dx, al
;call klog_kput
pusha
call cga_putc
popa
jmp @b
@@:
ret
@ -125,6 +127,9 @@ klog_print_hex:
.print_zero:
mov al, '0'
out dx, al
pusha
call cga_putc
popa
jmp .end
.print_number:
mov [esi], byte 0
@ -170,6 +175,9 @@ klog:
mov al, '?'
.putchar:
out dx, al
pusha
call cga_putc
popa
.next:
inc esi
jmp .loop