data segment io8255a equ 288hio8255b equ 289hio8255c equ 28ahio8255k equ 28bhdata endscode segment assume cs:code,ds:datastart: mov dx,io8255k mov al,0a7h out dx,al mov al,4 out dx,al s:mov dx,io8255c in al,dx test al,00000010b jz s mov dx,io8255b in al,dx and al,00000111b mov dx,io8255a out dx,al mov ah,1 int 16h jz s mov ah,4ch int 21hcode endsend start