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 an ARM Assembly program that obtains integer input from the keyboard. please write comments so...
Write an ARM Assembly program that obtains integer input from the keyboard. please write comments so i can understand what its doing :)
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 program in C that does the following: Reads 10 real numbers from the keyboard...
Write a program in C that does the following: Reads 10 real numbers from the keyboard using a loop and displays the sum of the numbers and the sum of the square of the numbers.
Write a complete Java program to solve the following problem. Read two positive integers from the...
Write a complete Java program to solve the following problem. Read two positive integers from the user and print all the multiple of five in between them. You can assume the second number is bigger than the first. For example if the first number is 1 and the second number is 10, then your program should output 5 10 Note: There is a white space in between the numbers. Java programming please answer ASAP before 2:30
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.
1.Write pseudocode for a program that allows the user to input two numbers (X and Y)...
1.Write pseudocode for a program that allows the user to input two numbers (X and Y) and a code C. If the code has value 1, the program should output the larger of X and Y and otherwise output the smaller. Now convert your pseudocode to an assembly language program. Enter the program into the lab software assembler. Assemble the program and execute it with different input data. 2. Write pseudocode for a program that allows the user to input...
Write a C++ program to read a positive integer greater than 0, the program should compute...
Write a C++ program to read a positive integer greater than 0, the program should compute and display the following: - Sum of odd digits in the number - Count of even digits in the number - The smallest digit.                    For example, if the input is 24536, then Sum of odd digits in the number = 8 Count of even digits in the number = 3 Smallest digit = 2
write an assembly language program for 8085 microprocessor to read consecutive memory locations from 2000 to...
write an assembly language program for 8085 microprocessor to read consecutive memory locations from 2000 to 2FFF & transfer to 4000 to 4FFF,if interrupted display the current count at port5 this is for 8085 microprocessor for interrupt we have to write a program & subroutine
instructions read in 4 numbers. sum up the 4 numbers. print the four numbers and the...
instructions read in 4 numbers. sum up the 4 numbers. print the four numbers and the sum Using the Marie editor and compiler, write a program that will satisfy these requirements. Cut and paste your code (from the editor) into the answer area of this question C+
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.