Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please fill the blanks. 4. [10 points] Fill in the following assembly language program to find how many O bit in six of 16-bit number

image text in transcribedPlease fill the blanks.

4. [10 points] Fill in the following assembly language program to find how many O bit in six of 16-bit number which is located starting at the memory address Ox8000. The program should start at Ox10000 and the result (the number of O bit'') should be stored in data register D6. Example: a 16-bit number 0000 1101 1100 1110, this contains 8 O bit .MAIN Ox10000 CLR.L %D6 MOVE.L #16,8D1 LEA ,8A0 CLR.L %DO MOVE.W ,8D0 NEXT LOOP ASR.L %DO ONE ADDI. L #1 , %D6 ONE SUBI #1 , %D1 BNE LOOP CMPA.L %A0 //Initialized 0 into D6 (the result) // Set up the counter to count the 16-bit number //Pointing A0 to the initial data location //Initialized 0 into DO // Load the 16-bit number into DO and increment //A0 points to the next word location //Shift 1 bit Right in DO //If the carry bit=1, branch to ONE //Otherwise, add 1 into the result //Decrement the Counter // If count != 0, go back to loop //Compare memory location to check if all //data have been read already //YES, done //Set up the counter again //NO, next data //END the program BEO EXIT MOVE.L #16,%D1 BRA NEXT EXIT TRAP #15

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

1. Define the nature of interviews

Answered: 1 week ago

Question

2. Outline the different types of interviews

Answered: 1 week ago