lodsb instruction doesnt increment %si (8086 assembly)
I am trying to write a simple "Hello World" boot-loader. I use the <code>lodsb</code> instruction to iterate in the string, however, even If I unset the directional bit, the instruction doesn't increment the register %si. Then the program loops infinitely.

I am assembling with gnu as, linking with ld and running the code on qemu.

    .code16
        
    .section .text
        
    .global _start
    _start:
       movw $0x0000, %ax
       movw %ax, %ds
       movw $msg, %si
       movb $0x0e, %ah
        
    print_char:
       cld 
       lodsb
       or %al, %al
       jz hang
       int $0x10
       jmp _start

    hang:
    jmp hang
           
    msg: .ascii "Hello world.\n\0"
           
    .org 510
    .byte 0x55, 0xAA
lodsb instruction doesnt increment %si (8086 assembly)
===

I am trying to write a simple "Hello World" boot-loader. I use the <code>lodsb</code> instruction to iterate in the string, however, even If I unset the directional bit, the instruction doesn't increment the register %si. Then the program loops infinitely.

I am assembling with gnu as, linking with ld and running the code on qemu.

    .code16
        
    .section .text
        
    .global _start
    _start:
       movw $0x0000, %ax
       movw %ax, %ds
       movw $msg, %si
       movb $0x0e, %ah
        
    print_char:
       cld 
       lodsb
       or %al, %al
       jz hang
       int $0x10
       jmp _start

    hang:
    jmp hang
           
    msg: .ascii "Hello world.\n\0"
           
    .org 510
    .byte 0x55, 0xAA