diff --git a/src/bootloader.asm b/src/bootloader.asm index 226de1b..b685912 100644 --- a/src/bootloader.asm +++ b/src/bootloader.asm @@ -1,5 +1,8 @@ [org 0x7c00] ; bootsector +mov bx, welcomeString ; Print the welcome string +call println + jmp $ ; inf loop ;; includes @@ -8,11 +11,11 @@ jmp $ ; inf loop %include "equ/ASCII.asm" ; eLIB -;%include "elib/io.asm" +%include "elib/io.asm" ;; Data welcomeString: - db "Welcome to eOS", ASCII_CARRIAGE_RETURN, ASCII_LINEBREAK + db "Welcome to eOS", ASCII_END ; Magic BIOS number times 510-($-$$) db 0 diff --git a/src/elib/io.asm b/src/elib/io.asm index fa9eb6d..939ec03 100644 --- a/src/elib/io.asm +++ b/src/elib/io.asm @@ -26,9 +26,17 @@ print: ; Subroutine to print a string on a new line newline: - db ASCII_CARRIAGE_RETURN, ASCII_LINEBREAK + db ASCII_CARRIAGE_RETURN, ASCII_LINEBREAK, ASCII_END println: + pusha + + ; Print the input string + call print ; this will print whatever is in [bx], so clear it if you dont want to print anything + ; Print the newline mov bx, newline call print + + popa + ret