I am trying to make a very simple bootloader in GAS assembly, and i am making a print function for it.
It doesn't print anything
printing a single char by movb $0x41, %al
and int 0x10
.
compiled as file.s
and ld -o file.bin --oformat binary -e main a.out
boot_print.s:
print:
movb (%rbp), %al
cmpb $0, %al
je print_end
int $0x10
inc %rbp
jmp print
print_end:
ret
boot_main.s
.global main
main:
movb $0x0e, %ah
movl $msg, %ebx
call print
jmp .
.include "boot_print.s"
msg:
.ascii "Hello, World!\n"
.fill 510-(.-main), 1, 0
.word 0xaa55
Thanks for reading guys!