I am trying to convert the Babystep2 (http://wiki.osdev.org/Babystep2) tutorial to AT&T assembler format:
Code: Select all
.code16
main:
movw $0x07c0,%ax
movw %ax,%ds
movw $msg,%si # XXX $msg translated to 0x0???
ch_loop:
lodsb
or %al,%al
jz hang
movb $0xe,%ah
int $0x10
jmp ch_loop
hang:
jmp hang
msg: .asciz "Hello, World!\r\n"
.org 510
.hword 0xaa55
I am puzzled, can anyone explain why this happens and how to fix it properly?