[Nasm-devel] BIOS int 0x16 not working in Windows 10 NASM DOSBOX

muhammad shamaas muhammad.shamaas.skipq at gmail.com
Thu Jul 6 23:53:29 PDT 2023


Hello,
I am trying to read keyboard input using int 0x16 in Windows 10 NASM DOSBOX
but it is not working. Can you tell me what the problem is?

[org 0x0100]

jmp start


start: xor ax, ax

mov es, ax ; point es to IVT base

sti ; enable interrupts

l1: mov ah, 0 ; service 0 – get keystroke

int 0x16 ; call BIOS keyboard service

cmp al, 27 ; is the Esc key pressed

jne l1 ; if no, check for next key


mov ax, 0x4c00 ; terminate program

int 0x21
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nasm.us/archives/nasm-devel/attachments/20230707/3bf01fd2/attachment.htm>


More information about the Nasm-devel mailing list