Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Qi) Write a program in Assembly language to fill DX with zeros if the number in CL is prime, otherwise fill DX with ones. Q2)
Qi) 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(1), each array contains 100 16-bit signed number. Assume that the arrays start in the data segment at offset addresses A000H and BOOOH respectively. If the two arrays are found to be unequal, save the address of the first unequal element of A(l) in the memory location with offset FOOOH. Otherwise, if the two arrays are found to be equal, write all O's into this location. (3) Write a program to split a block of 100 unsigned words (stored at starting address SS:EBOOH) 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: 7 6 5 4 3 2 10 0 1 2 3 4 5 6 7 Q:) 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 ls complement of each result before storing it starting at address 1FFOOH. Q6) Write a program to count the number of ones in AX, store the number of ones in BL. Qi) 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(1), each array contains 100 16-bit signed number. Assume that the arrays start in the data segment at offset addresses A000H and BOOOH respectively. If the two arrays are found to be unequal, save the address of the first unequal element of A(l) in the memory location with offset FOOOH. Otherwise, if the two arrays are found to be equal, write all O's into this location. (3) Write a program to split a block of 100 unsigned words (stored at starting address SS:EBOOH) 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: 7 6 5 4 3 2 10 0 1 2 3 4 5 6 7 Q:) 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 ls complement of each result before storing it starting at address 1FFOOH. Q6) Write a program to count the number of ones in AX, store the number of ones in BL
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started