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

Machine level programs-microprocessor, Machine Level Programs In this s...

Machine Level Programs In this section, a few machine levels programming instance, rather then, instruction sequences are presented for comparing the 8086 programming with that

Lds/les instruction execution-microprocessor, LDS/LES Instruction execution...

LDS/LES Instruction execution :  LAHF : Load AH from Lower Byte of Flag: - This instruction loads the AH register with the lower byte of the flag register. This instruction ca

Input output memory mapped-microprocessor, Memory Mapped I/O Memory I/O...

Memory Mapped I/O Memory I/O devices are mapped into the system memory map with ROM and RAM. To access a hardware  device, simply write or  read  to  those  'special'  addresse

#title:Shifitng of memory, Ask 2. Exchange higher byte of AX and higher byt...

Ask 2. Exchange higher byte of AX and higher byte of BX registers by using memory location 0160 in between the transfer. Then stores AX and BX registers onto memory location 0174 o

Conditional branch instruction-microprocessor, Conditional branch Instructi...

Conditional branch Instruction When these type of instructions are executed, they transfer control of execution to the address mention relatively in the instruction, provided t

Flowchart for the sequence of 8251-microprocessor, Flowchart for the sequen...

Flowchart for the sequence of 8251 Whether the control, mode or sync character register is selected depends on the accessing sequence.  A flowchart of the sequencing is given i

Cryptography, Write a program that allows a user to encrypt/decrypt a mess...

Write a program that allows a user to encrypt/decrypt a message using a shift cipher. The user should specify the key and the message. Your program should be able to handle messa

Timing diagram of minimum mode, give the explaination of timing diagram min...

give the explaination of timing diagram minimum mode memory write cycle

Right triangle, code, Assembly Language How to print strings in Right Tria...

code, Assembly Language How to print strings in Right Triangle form?

First generation microprocessor, 1 st Generation Microprocessor : At ...

1 st Generation Microprocessor : At the end of the 70s a group of engineers developed a chip is able to processing data. This chip was called processor chip. Big processors w

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