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 [org 0x7c00] ; bootsector
mov bx, welcomeString ; Print the welcome string
call println
jmp $ ; inf loop jmp $ ; inf loop
;; includes ;; includes
@ -8,11 +11,11 @@ jmp $ ; inf loop
%include "equ/ASCII.asm" %include "equ/ASCII.asm"
; eLIB ; eLIB
;%include "elib/io.asm" %include "elib/io.asm"
;; Data ;; Data
welcomeString: welcomeString:
db "Welcome to eOS", ASCII_CARRIAGE_RETURN, ASCII_LINEBREAK db "Welcome to eOS", ASCII_END
; Magic BIOS number ; Magic BIOS number
times 510-($-$$) db 0 times 510-($-$$) db 0

@ -26,9 +26,17 @@ print:
; Subroutine to print a string on a new line ; Subroutine to print a string on a new line
newline: newline:
db ASCII_CARRIAGE_RETURN, ASCII_LINEBREAK db ASCII_CARRIAGE_RETURN, ASCII_LINEBREAK, ASCII_END
println: 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 ; Print the newline
mov bx, newline mov bx, newline
call print call print
popa
ret

Loading…
Cancel
Save