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.© BrainMass Inc. brainmass.com December 24, 2021, 5:15 pm ad1c9bdddf
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.
MOV DX 3B26(H) ;PUT 3B26 IN DX
MOV CX , 0000(H) ; CLEAR CX, RESULT WILL BE STORED IN
MOV BX,0009(H) PUT 9 IN BX, NO OF ROTATIONS + 1
LOOP: DEC BX ; DECREMENT BX
JZ LOOP2 ; IF NUMBER OF ROTATIONS IS ...
Assembly instructions are noted in the solution.