I'm relatively new to assembly programming and was wondering why my code does not print the expected strings. This project is supposed to be a bootloader when finished. I am compiling using the command nasm -f bin boot.asm -o boot.bin
. There are no errors during compilation.
boot.asm
bits 16
org 0x7C00
%include "print.asm"
%include "text.asm"
boot:
mov si, boot_string_00
call print
mov si, boot_string_01
call print
times 510 - ($-$$) db 0
dw 0xAA55
print.asm
print:
mov ah, 0x0E
.print_loop:
lodsb
or al, al
je .print_done
int 0x10
jmp .print_loop
.print_done:
cli
ret
text.asm
boot_string_00: db "Placeholder OS Title v0.0.1", 0
boot_string_01: db "Loading Operating system", 0
Expected Output:
PlaceHolder OS Title v0.0.1Loading Operating System
Actual Output:
S
Also, I was wondering how i could implement newlines in assembly so that i could just use '\n' in my strings.