Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please build in Microsoft Visual Studio and answer the questions at the bottom. .MODEL FLAT .DATA F DB .CODE 50 main PROC --- xor xor
Please build in Microsoft Visual Studio and answer the questions at the bottom.
.MODEL FLAT .DATA F DB .CODE 50 main PROC --- xor xor xor xor : CLEAR CONTENTS OF REGISTERS eax, eax ebx, ebx ecx, ecx edx, edx BEGIN MAIN PROCEDURE HERE mov mov sub al, b1,32 al,b1 ; Move Fahrenheit temperature to AL register ; Move 32 into BL register ; Subtract BL (32) from AL (Fahrenheit temperature) mov mul b1,5 bl ; Move 5 into BL register ; Multiply AL (F-32) by BL (5) mov div bl,9 bl ; Move 9 into BL register ; Divide AL ((F-32)x5) by BL (9) END MAIL PROCEDURE HERE ----- ret ENDP main END ANALYSIS Q1 Explain what the line "F DB 50" means. Q2 Rewrite the line "mov b1,32" to use a hexadecimal number in place of 32 decimal. Q3 After running the program, what is the value in AX register (right-half of the EAX register)? Q4 While your program is paused at the breakpoint: a. Mouse over the temperature value in the ".DATA". What does the pop-up window show? b. Mouse over the "F" on the "mov al,F" line. What does the pop-up show? c. Mouse over the "xor" instruction. What is the significance of the "instruction" column in the pop-up? Q5 Change the input value for "F" to three different numbers: 32, 52, and a number of your choice. Record and explain the meaning of the AX register. Q6 Add breakpoints to the following lines so there are three breakpoints: "xor eax,eax", "mov b1,5", and "ret". Debug the program by pressing "F5" or click Debug" > "Start Debugging". Observe which breakpoint dot has the yellow arrow and which registers are highlighted in red. Press "F5" again, observe what changes. Press "F5" again, observe. Finally, press "F5" a fourth time and observe. Explain briefly what you observed each time you pressed "F5"; it's not necessary to write down the values of each of the registers, just describe in general what each press of F5" accomplished. Q7 What is the difference between the EAX, AX, AH, and AL registers? Q8 Sequentially write the 4-bit binary values, starting with 0000 and ending with 1111, along with the decimal and hexadecimal equivalents. What are the benefits of being able to convert between these three number basesStep 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