Question about Assembly Instructions
Not what you're looking for?
1. Place binary number 3B26h in register DX and count the number of binary ones in the number in DX in register AL. For example, the binary number 3F62h has nine binary ones.
2. Write a program that takes the smaller of two words stored in memory locations DS:1234h and DSL=:5678h and store in register AX.
Purchase this Solution
Solution Summary
Assembly instructions are noted in the solution.
Solution Preview
Response is attached.
Q1. PLACE BINARY NUMBER 3B26H IN REGISTER DX AND COUNT THE NUMBER OF BINARY ONES IN THE NUMBER IN DX IN REGISTER AL. FOR EXAMPLE, THE BINARY NUMBER 3F62H HAS NINE BINARY ONES.
ANSWER :
command comments
MOV DX 3B26(H) ;PUT 3B26 IN DX
MOV CX , 0000(H) ; CLEAR CX, RESULT WILL BE STORED IN
CX
MOV BX,0009(H) PUT 9 IN BX, NO OF ROTATIONS + 1
LOOP: DEC BX ; DECREMENT BX
JZ LOOP2 ; IF NUMBER OF ROTATIONS IS ...
Purchase this Solution
Free BrainMass Quizzes
C# variables and classes
This quiz contains questions about C# classes and variables.
Basic UNIX commands
Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
C++ Operators
This quiz tests a student's knowledge about C++ operators.