when i run this code then success
is always called even when i enter other characters like v.
global start
section .text
start:
mov ax, 07C0h ; Set up 4K stack space after this bootloader
add ax, 288 ; (4096 + 512) / 16 bytes per paragraph
mov ss, ax
mov sp, 4096
mov ax, 07C0h ; Set data segment to where we're loaded
mov ds, ax
call read_key
call display
cmp al, 'm'
je success
cmp al, 'M'
je success
success:
mov al, 'C'
call display
read_key:
push bx
push cx
push dx
push si
push di
mov ah, 0x00
int 0x16
pop di
pop si
pop dx
pop cx
pop bx
ret
display:
push bx
push cx
push dx
push si
push di
movzx si, al
mov ah, 0Eh
int 10h
pop di
pop si
pop dx
pop cx
pop bx
ret