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
158 THE x86 MICROPROCESSORS
MOV CL, N ;move count to CL
MOV DL, ’*’ ;move ‘*’ to DL
AGAIN: MOV AH, 02 ;AH = 2 for displaying a character
INT 21H
DEC CL ;decrement the count
JNZ AGAIN ;repeat the displaying until CL = 0
ENDM ;end the macro
NEW MACRO ;de ne a macro for moving to next line
MOV DL, 0AH
MOV AH, 02
INT 21H
MOV DL, 0DH
MOV AH, 02
INT 21H
ENDM
STAR 5 ;invoke macro STAR with N = 5
NEW ;invoke macro NEW
STAR 4 ;invoke macro STAR with N = 4
NEW
STAR 3
NEW
STAR 2
NEW
STAR 1
NEW
.EXIT
END
Example 4.13 shows such a case. Two macros have been defi ned – STAR and NEW.  e former
contains a label AGAIN which has been dec ...
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