Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Assembly Expert

prepare assembly code that performs each of these four tasks. Create a single assembly file (.asm) per task. 

For this assignment, you must create a Design Summary Document. For each part of the assignment, you must describe in English how your code works. A paragraph or set of bullet points for each part of the assignment will suffice. Submit this as a single document. Number each section corresponding to each part of the assignment.

Read the instructions carefully before attempting each problem.

1) Create a program that takes two single digit numbers from simple keyboard input and adds them together. Print the answer to the VDU.'

Requirements:

A) Your program must be capable of printing a two digit answer.

For ex, if the input is 8 and 9, the answer printed must be 17 (a 1 in one VDU memory slot, and a 7 in another beside it).

B) Your program must be capable of handling nonGnumeric character input. If an input character is not a number, reGprompt for input. Keep doing so until a valid character is entered (i.e. 0G9).
 
2) prepare a similar program, this time show the sum on the VDU as in the screenshot below.

167_VDU_1.jpg

Print the input numbers to the VDU as they are input, then print out the answer below the line.

1999_VDU_2.jpg

Requirements:

o Numbers must be displayed as they are input.

o Once all numbers are input, only then can you add them together and display the result.

o Again, your program must check if the input characters are valid.

o Use the DB and ORG directives to print the “G“ and “+” characters to the screen.

3) Create  a  similar  program  that  adds  two  2 digit  numbers  together.

2020_VDU_3.jpg

Requirements:

o The user must input the first number, rightGtoGleft, then the second number to be printed below the first as in the screenshot. After each digit is entered, print it to the screen. Hints:,

o In order to prepare a solution for this, think about how you add numbers on paper (“carry the one”).

o You are performing a repetitive task on each column of numbers. As such you should prepare a procedure that takes two numbers as input and prints the answer to the VDU.

o You should also prepare a procedure that gets input for each 2Gdigit number and prints it to the screen (digit by digit).

o For answers that are greater than 10 (0A in Hex), you may want to use a “carryOne” flag. (a memory slot that contains either a 1 or a 0).

4) Extend your program from part 3 to create an adder for two 8 digit numbers.

1228_VDU_4.jpg

User has input first 5 digits of the first number

79_VDU_6.jpg

User has input first 4 digits of second number

The program has completed.

Requirements:

o Because of memory constraints, you now must create two procedures to carry out repetitive tasks.

  • One procedure takes input from the keyboard and prints an 8Gdigit number to the VDU. This will be called twice – one for each number.
  • One procedure that takes two numbers, adds them, and prints the answer to the VDU (dealing with the “carry one” issue).

Assembly, Programming

  • Category:- Assembly
  • Reference No.:- M91042

Have any Question?


Related Questions in Assembly

Really need to find a correct answer to this questionwrite

Really need to find a correct answer to this question: Write a MIPS assembly program that can search for a number that is entered by a user in an array with 20 integer number. Make sure it also prints the index of the ar ...

Task 1using masm sdk write an assembly language program

TASK 1 Using MASM SDK, write an assembly language program which converts an integer inputted via the console to binary. Your program should be well commented and well formatted. TASK 2 Using MASM SDK, write an assembly l ...

Question a sequence string of one-byte ascii characters is

Question : A sequence (string) of one-byte ASCII characters is stored at memory location $600 onward. A second sequence of equal length is stored at memory location $700 onward. Each sequence ends with the character $0 ( ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As