Passing the strings to string prints through stack
This commit is contained in:
parent
e2572d50af
commit
9fc1cd0064
2 changed files with 12 additions and 4 deletions
|
@ -58,9 +58,11 @@ serialinit:
|
|||
ret
|
||||
|
||||
serialwrite:
|
||||
push ebp
|
||||
mov ebp, esp
|
||||
pushad
|
||||
cld
|
||||
mov esi, stuff.bootmsg
|
||||
mov esi, [ebp+8]
|
||||
.loop:
|
||||
mov dx, SERIAL_PORT+5
|
||||
.wait:
|
||||
|
@ -75,6 +77,7 @@ serialwrite:
|
|||
jmp .loop
|
||||
.done:
|
||||
popad
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
serialiniterror:
|
||||
|
|
|
@ -38,10 +38,11 @@ start:
|
|||
|
||||
mov byte [0xb8000], '!'
|
||||
|
||||
mov esi, stuff.bootmsg
|
||||
call serialinit
|
||||
push stuff.bootmsg
|
||||
call printbootmsg
|
||||
call serialinit
|
||||
call serialwrite
|
||||
add esp, 4
|
||||
|
||||
jmp hang
|
||||
|
||||
|
@ -66,7 +67,10 @@ multibootnomagic:
|
|||
.msg db "No multiboot magic", 0
|
||||
|
||||
printbootmsg:
|
||||
push ebp
|
||||
mov ebp, esp
|
||||
pushad
|
||||
mov esi, [ebp+8]
|
||||
mov edi, 0xb8000
|
||||
cld
|
||||
.loop:
|
||||
|
@ -78,12 +82,13 @@ printbootmsg:
|
|||
jmp .loop
|
||||
.done:
|
||||
popad
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
include "src/serial.asm"
|
||||
|
||||
stuff:
|
||||
.bootmsg db "=== KoalemOS ===", 0
|
||||
.bootmsg db "=== KoalemOS ===", 10, 0
|
||||
|
||||
|
||||
stack_bottom:
|
||||
|
|
Loading…
Add table
Reference in a new issue