I currently have a MARIE assembly langauge program that will read in ten numbers and output the average, min and max. I need to add an aditional feature to this program that will also print out the standard deviation of the numbers 10, 20, 30 ...90, 100. Here is the program I have so far:  org 100 /start address loop, load x     /counter, checks if x < 0 subt ten Skipcond 000 Jump loop2   clear    /gather user input and store as temp var input store temp clear   if, load x          /decrements x and compares value if x > 0 subt 1 Skipcond 800 jump storeFirst   clear    /subtracts value in min from temp and compares in condition load temp  /if x < 0 subt min Skipcond 000 jump findMax   else, Skipcond 800  /if not, checks if x > 0 and jumps to findmin jump findMin   continue, clear                        /adds value of temp to y and stores new val load temp add y Store y clear load x  /increments counter x add one store x clear jump loop       /goes back to begining and restarts loop 'function'   findMax, clear Load temp  /stores value of temp as max var Store max  /and jumps back up to continue function Jump continue   findMin, clear Load temp      /stores value of temp as min var Store min   /jumps back up to continue function Jump continue   storeFirst, Load temp Store min  /stores value of temp into min and max variables Store max  /jumps back up to continue Jump continue   loop2, load y  /checks if y is > 0 Skipcond 800 Jump printAll  /jumps to print function   subt ten          /subtracts 10 from y val Store y Clear Load average /adds 1 to average and stores val Add one Store average Clear Jump loop2  /jumps back to top of loop2   printAll, Load average Output /loads and outputs average, min and max var values Clear Load min Output Clear Load max Output Clear   Halt   ten, DEC 10 one, DEC 1 x, DEC 0 y, DEC 0 min, DEC 0 max, DEC 0 temp, DEC 0 average, DEC 0   If it is easier to write an entirely new program from scratch, that is fine as well but I would perfer to just add a standard deviation feature to this one. Thank You!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I currently have a MARIE assembly langauge program that will read in ten numbers and output the average, min and max. I need to add an aditional feature to this program that will also print out the standard deviation of the numbers 10, 20, 30 ...90, 100. Here is the program I have so far: 

org 100 /start address

loop, load x     /counter, checks if x < 0

subt ten

Skipcond 000

Jump loop2

 

clear    /gather user input and store as temp var

input

store temp

clear

 

if, load x          /decrements x and compares value if x > 0

subt 1

Skipcond 800

jump storeFirst

 

clear    /subtracts value in min from temp and compares in condition

load temp  /if x < 0

subt min

Skipcond 000

jump findMax

 

else, Skipcond 800  /if not, checks if x > 0 and jumps to findmin

jump findMin

 

continue, clear                        /adds value of temp to y and stores new val

load temp

add y

Store y

clear

load x  /increments counter x

add one

store x

clear

jump loop       /goes back to begining and restarts loop 'function'

 

findMax, clear

Load temp  /stores value of temp as max var

Store max  /and jumps back up to continue function

Jump continue

 

findMin, clear

Load temp      /stores value of temp as min var

Store min   /jumps back up to continue function

Jump continue

 

storeFirst, Load temp

Store min  /stores value of temp into min and max variables

Store max  /jumps back up to continue

Jump continue

 

loop2, load y  /checks if y is > 0

Skipcond 800

Jump printAll  /jumps to print function

 

subt ten          /subtracts 10 from y val

Store y

Clear

Load average /adds 1 to average and stores val

Add one

Store average

Clear

Jump loop2  /jumps back to top of loop2

 

printAll, Load average

Output /loads and outputs average, min and max var values

Clear

Load min

Output

Clear

Load max

Output

Clear

 

Halt

 

ten, DEC 10

one, DEC 1

x, DEC 0

y, DEC 0

min, DEC 0

max, DEC 0

temp, DEC 0

average, DEC 0

 

If it is easier to write an entirely new program from scratch, that is fine as well but I would perfer to just add a standard deviation feature to this one. Thank You!

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education