I'm writing this bootloader that just prints out some stuff on the screen. This is what I have so far in assembly:
.globl _start
.code16
_start:
movw $0x0003, %ax
int $0x10
movb $0x0e, %ah
movb $0x69, %al
int $0x10
movw $_header, %bx
movb %bl, %al
int $0x10
_header: .ascii "W\0"
.org 0x1FE
.byte 0x55
.byte 0xAA
So right now it prints ASCII 69 ("i"), but I want it to print the .ascii
declaration as well. Right now I only have it set to "W"
so I could find it easily in Objdump
. I can't seem to get access to that value (57). I can leal $_header, %edx
and such, but then I can't seem to access the value at %edx
.
I tried using lodsb
, but I can't seem to figure it out. I set %di
to 0x00, and set %si
to the address of _header
with leal %si, _header
but then my lodsb
followed by int 0x10
doesn't seem to print anything. Any ideas I'd appreciate.