Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am a newbie to assembly language and currently working with interrupts in x86 architecture. Following is the code

BITS 16
start:
mov ax, 07C0h
add ax, 288
mov ss, ax
mov sp, 4096
mov ax, 07C0h
mov ds, ax

mov si, text
lodsb          ;Load a bit to al
mov ah, 09h    ;Write charecter and attribute at cursor position
mov cx, 03h    ;No.of times to write the charecter
mov bh, 00h
mov bl, 02h
int 10h

text db 'Hello',0

times 510-($-$$) db 0
dw 0xAA55

According to https://en.wikipedia.org/wiki/INT_10H, the code should display the character 'H' three times on the screen. But this is not happening. I would like to know what the error is.
I am using NASM in Linux

question from:https://stackoverflow.com/questions/65942773/interrupts-in-x86-using-assembly-nasm

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
152 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...