Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this second part of an assembly language program.You will need to finish your own code now. It is similar to what

I need help with this second part of an assembly language program.You will need to finish your own code now. It is similar to what was coded above. Move num3 into ecx register then next line of code--- add 200d (decimal) to the ecx register as another line of code then dump the registers(See 6th register dump above in the printout.) You cannot use the ecx register when you need to make a loop because the ecx register is used for the counter. Next line of code is to clear the eax register by moving 0s in it (See the 7th register dump above in the printout). Look at the code in the earlier part of the program to see how it was done there. Now add num1, num2 and num3 to the eax register. One must do this on 3 separate lines of code. Dump the registers which will have the sum of all three registers. (See 8th register dump above in the printout). Subtract 200h from the eax register and next line subtract num3 which is a decimal number from the ebx register then dump the registers (See the 9th register dump above in the printout). Now print the same number out from the eax register as a hex by using call WriteHex, print the same number out from the eax register as a decimal number by using WriteDec and print the same number out as a binary number(as a binary number). Make sure you leave lines in between as I did with my code. Read the next paragraph so you will know how to print them out. You do this by using these procedures: call WriteHex, call WriteInt, call WriteBin to print in hex, int and binary which will display what is in the EAX register only. Now put call Crlf before and after each to make a new line for readability. Do you realize that 00000B10h is the same as 2832 decimal and 0000 0000 0000 0000 0000 1011 0001 0000 in binary? Is the binary output correct? If you remember it is easy to compare it to the hex number. Follow the red instructions below to complete the next two lines. You may now add what is in the ecx register to the ebx register then move what is in the ebx register into the Sum123 variable. Next subtract 200h from Sum123 and print out Sum123 as a hex number (See the 10th register dump above in the printout). To do this you will need to move Sum123 into the eax register in order to print it as a hex number. Remember the (WriteHex function) will only print what is in the eax register.

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_2

Step: 3

blur-text-image_3

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 Upgrade Migration And Transformation Tips And Techniques

Authors: Edward Whalen ,Jim Czuprynski

1st Edition

0071846050, 978-0071846059

More Books

Students also viewed these Databases questions

Question

What is a subsequent event?

Answered: 1 week ago