This commit is contained in:
nub31
2025-08-22 20:45:23 +02:00
parent acf2258d83
commit 238345c2a7
3 changed files with 40 additions and 5 deletions

34
boot/util.asm Normal file
View File

@@ -0,0 +1,34 @@
%define cr 0x0a
%define lf 0x0d
%define endl 0x0
; Reads a character
; out:
; al = asci character
; ah = scan code
read_char:
mov ah, 0
int 0x16
ret
; Prints a character
; in:
; al = asci character to print
print_char:
mov ah, 0x0e
int 0x10
ret
; Prints a null terminated string
; in:
; si = null terminated string pointer
print_line:
.loop:
cmp byte [si], 0
je .done
mov al, [si]
call print_char
inc si
jmp .loop
.done:
ret