0% found this document useful (0 votes)
15 views3 pages

Complete Code in Assembly Language

This document contains an assembly language program that installs a keyboard interrupt service routine to display the text "AKMAL" when the N key is pressed and clear the display when the N key is released. It includes the assembly code, screenshots of compiling the code and the output when the key is pressed and released.

Uploaded by

akmal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Complete Code in Assembly Language

This document contains an assembly language program that installs a keyboard interrupt service routine to display the text "AKMAL" when the N key is pressed and clear the display when the N key is released. It includes the assembly code, screenshots of compiling the code and the output when the key is pressed and released.

Uploaded by

akmal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1) Complete code in assembly language

[org 0x0100]
jmp start
oldisr: dd 0
kbisr:

push ax
push es
mov ax, 0xb800
mov es, ax
in al, 0x60
cmp al, 0x31
jne akmal1
mov byte [es:4],'A'
mov byte [es:6],'K'
mov byte [es:8],'M'
mov byte [es:10],'A'
mov byte [es:12],'L'
jmp akmal2

akmal1:
cmp al, 0xB1
jne akmal2
mov byte [es:4],''
mov byte [es:6],''
mov byte [es:8],''
mov byte [es:10],''
mov byte [es:12],''

akmal2:
pop es
pop ax
jmp far [cs:oldisr]

start:
xor ax, ax
mov es, ax
mov ax, [es:9*4]
mov [oldisr], ax
mov ax, [es:9*4+2]
mov [oldisr+2], ax
cli
mov word [es:9*4], kbisr
mov [es:9*4+2],cs
sti

exit:
mov ah, 0
int 0x16

mov ax, 0x4c00


int 0x21

2) Screenshot of compilation step.


3) Output screenshot when N key is pressed

4) Output screenshot when N key is released

You might also like