Skip to Main Content
The X86 Microprocessors: Architecture and Programming (8086 to Pentium), 1st Edition
book

The X86 Microprocessors: Architecture and Programming (8086 to Pentium), 1st Edition

by Lyla B. Das
May 2024
Intermediate to advanced content levelIntermediate to advanced
665 pages
23h 2m
English
Pearson India
Content preview from The X86 Microprocessors: Architecture and Programming (8086 to Pentium), 1st Edition
THE INTERRUPT STRUCTURE OF 8086 277
Example 8.11
e following program fi lls up the screen with the key pressed. If no key is pressed, it keeps
waiting for a key press.
.MODEL TINY
.CODE
.STARTUP
NO_KEY: MOV AH, 11H ;function for waiting for key
INT 16H
JZ NO_KEY ;if ZF = 1, no key press, keep waiting
KEY: MOV AH, 10H ;function for taking into AL the key
INT 16H
MOV CX, 2000 ;number of characters to ll the screen
DISP: MOV DL, AL ;move the ASCII character to DL
MOV AH, 02 ;function number to display DL content
INT 21H ;DOS interrupt 21H
LOOP DISP ;display until CX = 0
.EXIT
END
e program of Example 8.11 uses INT 16H function ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microprocessors and Microcontrollers  by Pearson

Microprocessors and Microcontrollers by Pearson

Lyla B Das

Publisher Resources

ISBN: 9781282663169