Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASSEMBLY LANGUAGE X86 INTEL Write an assembly language program to declare two variables of type integer and initialize it to 2367 and 4792. Your code

ASSEMBLY LANGUAGE X86 INTEL

Write an assembly language program to declare two variables of type integer and initialize it to 2367 and 4792. Your code must determine in how many bit positions these two numbers differ. Write a procedure called displayBits to display an integer value in binary one bit at a time. Display both numbers in binary form using AND and shift operator to determine each bit and use Irvine library to display a character.

The displayBits procedure, will print each bits of an integer lets say in the variable value. For the procedure displayBits, you must write a loop that repeats 32 times. Each time in the loop mask the value with the pattern 1 followed by 31 zeros after it. You can have 1 in EBX and shift is left 31 times. This is how you can get the mask value. Then each time AND the maskValue with the value you want to display. The result will be either 0 or 1 followed by zeros. If the result is zero, that means the bit you are analyzing is zero.

By shifting the value to left, you can analyze the next bit in value.

Value: 11011100110

maskBit 10000000000

result 10000000000

PLEASE DO NOT POST THE SOLUTION THAT I PASTED BELOW, IT IS INCORRECT. TWO PEOPLE HAVE ANSWERED THIS QUESTION ALREADY WITH THE SAME ANSWER AS PASTED BELOW BUT IT'S COMPLETELY WRONG. thank you

image text in transcribed

PROGRAM ALGORITHM START: LX?H,F100H STEP1: Load the data's from locations 'X STEP2 Find the product using Shift Left STEP3 Display the result in ADDRESS STEP4: Halt the processor and X+1 method field MOVEM INXH MOV A,M LXI H,0000H MULT DAD H RAL NC SKIP DAD D SKIP. DCRB NZ MULT SHLD FET3 CALL UPDAD HILT NOTE: Store the program starting from F0OH . Store the data at LOC F100H and Fi0H Executive the program Result vill be displayed in adress feld. # Address for UPDAD is 06BFH RESULT BEFORE EXECUTION DataAddr. For multiplier 06 Addr. For 1 mul Data 05 FIOOH FIOIH AFTER EXECUTION: Address Field: PROGRAM ALGORITHM START: LX?H,F100H STEP1: Load the data's from locations 'X STEP2 Find the product using Shift Left STEP3 Display the result in ADDRESS STEP4: Halt the processor and X+1 method field MOVEM INXH MOV A,M LXI H,0000H MULT DAD H RAL NC SKIP DAD D SKIP. DCRB NZ MULT SHLD FET3 CALL UPDAD HILT NOTE: Store the program starting from F0OH . Store the data at LOC F100H and Fi0H Executive the program Result vill be displayed in adress feld. # Address for UPDAD is 06BFH RESULT BEFORE EXECUTION DataAddr. For multiplier 06 Addr. For 1 mul Data 05 FIOOH FIOIH AFTER EXECUTION: Address Field

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

Question What is the advantage of a voluntary DBO plan?

Answered: 1 week ago

Question

Question How is life insurance used in a DBO plan?

Answered: 1 week ago