Question

Write a MARIE assembly program to read three different positive numbers from the keyboard and output...

Write a MARIE assembly program to read three different positive numbers from the keyboard and output the difference between the largest and smallest numbers to the screen.

Homework Answers

Answer #1

The program is as below

org 100
input       / get value for x
store X
input       / get value for y
store Y
input       / get value for z
store Z

load X

subt Y

skipcond 000

jump L1

load Y

store Big

load X

store Small

jump Next

L1, load X

store Big

load Y

store Small

Next, load Big

subt Z

skipcond 000

jump L2

load Z

store Big

L2, load Small

subt Z

skipcond 800

jump L3

load Z

store Small

L3, load Big

subt Small

output

halt

X, dec 0

Y, dec 0

Z, dec 0

Small, dec 0

Big, dec 0

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a program that reads three integer values from the keyboard using the Scanner class representing,...
Write a program that reads three integer values from the keyboard using the Scanner class representing, respectively, a number of quarters, dimes, and nickels. Convert the total coin amount to dollars and output the result.Write a program that reads three integer values from the keyboard using the Scanner class representing, respectively, a number of quarters, dimes, and nickels. Convert the total coin amount to dollars and output the result.
Write a microcontroller assembly program that makes the PORTB output and that blinks with a certain...
Write a microcontroller assembly program that makes the PORTB output and that blinks with a certain delay. The delay is between 250ms and 1000ms. You should use infinite loop.
Create a c file to read a character from the keyboard and write it to a...
Create a c file to read a character from the keyboard and write it to a file. please help
Write a full C++ program to read a series of integer numbers from standard input and...
Write a full C++ program to read a series of integer numbers from standard input and print them out in reverse order, one per line. You may assume that there will be a minimum of 2 numbers to read and a maximum of 200.
In C++ program that inputs three integers and displays the smallest and largest numbers. It should...
In C++ program that inputs three integers and displays the smallest and largest numbers. It should pass the numbers to two functions. A value returning function determines the smallest number and returns it, and a void function determines the largest number and displays it. Sample run: Enter three numbers: 9 10 7 The smallest number is:7 The largest number is: 10
Write a C program that when you type in five numbers, it will print the number...
Write a C program that when you type in five numbers, it will print the number from the smallest one to the largest one.(if you type in 2, 1, 3, 5, 4, the output will be 1, 2, 3, 4, 5 ) You may need more than one function to complete this mission.
The following code to run as the described program on python. The extra test file isn't...
The following code to run as the described program on python. The extra test file isn't included here, assume it is a text file named "TXT" with a series of numbers for this purpose. In this lab you will need to take a test file Your program must include: Write a python program to open the test file provided. You will read in the numbers contained in the file and provide a total for the numbers as well as the...
1- Write a program to print only the even numbers from 100 to 200 2- Write...
1- Write a program to print only the even numbers from 100 to 200 2- Write a program to print the odd numbers from 22 – 99 3- Write a program to calculate howe many even number from 10 to 120 1- Write a program to find only the even numbers for 12 different numbers 2- Write a program to find the odd numbers for 10 different numbers 3- Write a program to calculate howe many even number and how...
Write a Python program which calculates the average of the numbers entered by the user through...
Write a Python program which calculates the average of the numbers entered by the user through the keyboard. Use an interactive loop and ask the user at each iteration if he/she wants to enter more numbers. At the end dispay the average on the screen. Using built-in library functions for finding average is not allowed. Sample output of the program: Enter a number > 23 More numbers (yes or no)? y Enter a number > 4 Do you have more...
Write an assembly language program that prints your full name on the screen. Use .ASII pseudo-op...
Write an assembly language program that prints your full name on the screen. Use .ASII pseudo-op to store the characters at the top of your program Use BR to branch around the characters and use STRO to output your name. Comment each line except STOP and .END. Cut and paste the Assembler Listing into your document Paste a screen shot of the Output area of the Pep8 program Please use the name "Levin Fi" Assembler Listing Screen Shot of the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT