-
Notifications
You must be signed in to change notification settings - Fork 1
/
kernel.asm
31 lines (21 loc) · 890 Bytes
/
kernel.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
BITS 16
; ------------------------------------------------------------------------------
; Main Section
main:
mov si, message ; Put string position into SI
call print_string ; Call our string-printing routine
.infinite:
jmp .infinite ; Jump here - infinite loop!
message db 'PotatOS 1.5 Kernel', 0
; ------------------------------------------------------------------------------
; Print Routine
print_string: ; Routine: output string in SI to screen
mov ah, 0Eh ; int 10h 'print char' function
.repeat:
lodsb ; Get character from string
cmp al, 0
je .done ; If char is zero, end of string
int 10h ; Otherwise, print it
jmp .repeat
.done:
ret