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
PROGRAMMING CONCEPTS  II 113
.CODE
.STARTUP
LEA BX, NUMS1 ;use BX to point to NUMS1
LEA SI, NUMS2 ;use SI to point to NUMS2
LEA DI, NUMS3 ;use DI to point to nUMS3
MOV CX, 06 ;CX = 6
REPEA: MOV AL, [BX] ;take into AL data from the array NUMS1
ADD AL, [SI] ;add to AL the data in array NUMS2
MOV [DI], AL ;save the sum in the third array
INC BX ;increment pointer
INC SI ;increment pointer
INC DI ;increment pointer
LOOP REPEA ;repeat the sequence until CX = 0
.EXIT
END
is problem can be done with less number of address registers if the ‘register relative mode’ of
addressing is used. See Example 3.10b. Here only the register ...
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