Write a program to print name, Assembly Language

Assignment Help:

Write a program to do the following:

1. Print your name

2. Using a bottom testing loop, prompt the user to enter a number from 1 to 5.  If the number entered is not 1..5, print an error message.  Your program should continue to prompt and read until a value from 1..5 is entered.

3. Using a top testing loop, repeat the following.

The number of times to repeat is the number entered in step 2 (i.e. 1..5).

a. Prompt for and read two integers.

b. Print the absolute value of the difference of the numbers. 

Do not use the abs pseudo instruction but calculate the absolute value using the standard instructions.

c. If the first input is less than or equal to the second input, print the sum of the numbers from the first THROUGH the second.  Otherwise print an error message. 

See the example below.

4. Print an ending message and then end your program.

Example input and output

Tom Smith

Enter a number 1..5: 0

Input is out of range

Enter a number 1..5: 3

Enter the first number: 3

Enter the second number: 3

Absval of difference = 0

Sum of values = 3

Enter the first number: 2

Enter the second number: 8

Absval of difference = 6

Sum of values= 35

Enter the first number: 5

Enter the second number: -2

Absval of difference = 7

Sum of values cannot be determined

Program ending

Assignment 2 submittal:

a. Submit your assembly language program file. 

If your file is correctly uploaded, then you will see an exclamation mark (!) for the grade.


Related Discussions:- Write a program to print name

Arithmetic instruction-microprocessor , Arithmetic Instruction :           ...

Arithmetic Instruction :               These instructions are usually perform the arithmetic operations, like subtraction ,multiplication, addition, and division along with th

ROTATION, CANI GET HELP WRITTING THIS CODE

CANI GET HELP WRITTING THIS CODE

NASM assembly language programming, NASM assembly language program: Consid...

NASM assembly language program: Consider a sequence of 19 strictly positive decimal digits, most likely stored in an array. There are obviously duplicates, and the sequence is un

Aam-arithmetic instruction-microprocessor, AAM: ASCII Adjust for Multiplic...

AAM: ASCII Adjust for Multiplication after execution. This instruction converts the product available in the AL into unpacked BCD format.  This follows a multiplication   instruct

The processor 8088-microprocessor, The processor 8088 The launching of ...

The processor 8088 The launching of the processor 8086 is consider as a remarkable step in the development of high speed computing machines. Before the introduction  of 8086 mo

PIC, LIST p=18f4550 #include org 0x0000 movlw 0x00 _________ movlw 0xFF ...

LIST p=18f4550 #include org 0x0000 movlw 0x00 _________ movlw 0xFF movwf PORTB end .

Read architecture:look aside cache-microprocessor, Read Architecture : Look...

Read Architecture : Look Aside Cache In "look aside" cache architecture the main memory is located conflictingthe system interface. Both the cache main memory sees a bus cycle

Display control-microprocessor, Display control 8279  provides  a  16  ...

Display control 8279  provides  a  16  byte  display  memory  and  refresh  logic.  Every address in the display memory corresponds to a display unit with address zero represen

Program, assembly language program to find larges number in an array

assembly language program to find larges number in an array

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd