Println bug fix

pull/1/head
E. Almqvist 4 years ago
parent a2eddaeba8
commit 8c21f37841
  1. 7
      src/bootloader.asm
  2. 10
      src/elib/io.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

@ -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

Loading…
Cancel
Save