Code: Select all
org 0h
main:
mov ax, 0x07c0
cli
mov ds, ax
mov es, ax
mov ss, ax
mov sp, 03feh
sti
.loop:
mov si, hello_text
call put_string
mov ah, 0
int 0x16
jmp .loop
put_string:
lodsb
cmp al, 0
je .return
mov ah, 0x0E
int 0x10
jmp put_string
.return:
ret
hello_text db 'Hello world!!!',13,10,0
times 510-($-$$) db 0
dw 0xaa55
While emulating with qemu everything is ok, but when I boot it from pendrive "hello world" does not appear. I've read many tutorials yet but nothing helped. Could anyone tell me what I'm doing wrong?