1 year ago
#339066
Uman Sheikh
Assembly string issue
I was trying to make an OS and started learning x86 assembly language. I learnt some basics of BIOS and 16-bit mode. Although the issue I am facing right now is that when I load the .bin
file in qemu emulator, it only prints "Hello, World!". If I change the string only it does not appear on screen. Let me share code and Screenshots here. Thanks in advance.
[org 0x07c00]
string: DB "Hello, World!", 0
MOV ah, 0x0e
MOV bx, string
_start:
MOV al, [bx]
INC bx
INT 0x10
cmp al, 0
jne _start
inp:
MOV ah, 0x00
INT 0x16
MOV ah, 0x0e
INT 0x10
cmp al, 0x10
jne inp
jmp $
times 510 - ($ - $$) db 0
db 0x55, 0xaa
[org 0x07c00]
string: DB "Username: ", 0
MOV ah, 0x0e
MOV bx, string
_start:
MOV al, [bx]
INC bx
INT 0x10
cmp al, 0
jne _start
inp:
MOV ah, 0x00
INT 0x16
MOV ah, 0x0e
INT 0x10
cmp al, 0x10
jne inp
jmp $
times 510 - ($ - $$) db 0
db 0x55, 0xaa
I tried figuring out why this happens but I could not find any resource so, I thought I should share my problem here.
assembly
x86
nasm
bootloader
bios
0 Answers
Your Answer