Q2) Write a program that compares the elements of two arrays, A(I) and B(I), each array contains 100 16-bit signed number. Assume that the arrays start in the data segment at offset addresses A000H and B000H respectively. If the two arrays are found to be unequal, save the address of the first unequal element of A(I) in the memory location with offset FO00OH. Otherwise, if the two arrays are found to be equal, write all O's into this location.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Tutorial Questions
Q1) Write a program in Assembly language to fill DX with zeros if the
number in CL is prime, otherwise fill DX with ones.
Q2) Write a program that compares the elements of two arrays, A(I) and
B(I), each array contains 100 16-bit signed number. Assume that the arrays
start in the data segment at offset addresses A000H and B000H respectively.
If the two arrays are found to be unequal, save the address of the first
unequal element of A(I) in the memory location with offset FO00H.
Otherwise, if the two arrays are found to be equal, write all 0's into this
location.
Q3) Write a program to split a block of 100 unsigned words (stored at
starting address SS:EB0OH) into two blocks, the first block is stored at
DS:500H and contains the even numbers and the second block is stored at
ES:600H and contains the odd numbers.
Q4) Write a program to invert the byte in AL as follows:
76 5 4 3 2 10
0 1 2 34 5 67
Qs) If you have the following two arrays of 40 signed numbers:
Y stored at 13000H and contains 8-bit numbers,
X stored at 14000H and contains 24-bit numbers.
Find: Z(I)=X(I)-Y(I) (The subtraction of each number in Y from the
corresponding number in X).
Then find the 1's complement of each result before storing it starting at
address 1FF00H.
Q6) Write a program to count the number of ones in AX, store the number of
ones in BL.
Dr. Zainab Rami Alomari
17/2/2021
Transcribed Image Text:Tutorial Questions Q1) Write a program in Assembly language to fill DX with zeros if the number in CL is prime, otherwise fill DX with ones. Q2) Write a program that compares the elements of two arrays, A(I) and B(I), each array contains 100 16-bit signed number. Assume that the arrays start in the data segment at offset addresses A000H and B000H respectively. If the two arrays are found to be unequal, save the address of the first unequal element of A(I) in the memory location with offset FO00H. Otherwise, if the two arrays are found to be equal, write all 0's into this location. Q3) Write a program to split a block of 100 unsigned words (stored at starting address SS:EB0OH) into two blocks, the first block is stored at DS:500H and contains the even numbers and the second block is stored at ES:600H and contains the odd numbers. Q4) Write a program to invert the byte in AL as follows: 76 5 4 3 2 10 0 1 2 34 5 67 Qs) If you have the following two arrays of 40 signed numbers: Y stored at 13000H and contains 8-bit numbers, X stored at 14000H and contains 24-bit numbers. Find: Z(I)=X(I)-Y(I) (The subtraction of each number in Y from the corresponding number in X). Then find the 1's complement of each result before storing it starting at address 1FF00H. Q6) Write a program to count the number of ones in AX, store the number of ones in BL. Dr. Zainab Rami Alomari 17/2/2021
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education