Writing a Machine Language Program  Write a TOY machine language program which calculates x3 by using repeated addition, where x is input by the user. This program has to work for positive integers only, and you can assume that is what will be entered as input.  The flow of action must loop within the code. Your program should output the running total while it calculates it to Stdout. Notes: You will need to create your program using the Visual X-TOY simulator. Make sure that your program code begins at address 10. Run it, test it, then save it as a .toy file. For this question you must submit your program as a .toy file.  Handwritten documents or other formats will not be accepted. You do not need to add any code comments of your own.         A few common questions have popped up about assignment 5.  So here are a few hints: To use the TOY simulator, first install Java JRE from here: https://www.java.com/en/download/manual.jsp.  Make sure to select the download for your OS and version (ie, 32-bit or 64-bit OS).  Then you can just double-click the toy.jar file, and it will open up. There are many built-in examples in the TOY environment.  You are allowed to look at those and use them to help you answer question 4. Make sure you follow the instructions exactly for question 4.  In particular, you need to use at least one loop, and you must output the results to STDOUT on each iteration

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
icon
Concept explainers
Question
100%

Writing a Machine Language Program 

Write a TOY machine language program which calculates x3 by using repeated addition, where x is input by the user. This program has to work for positive integers only, and you can assume that is what will be entered as input.  The flow of action must loop within the code. Your program should output the running total while it calculates it to Stdout.

Notes:

  • You will need to create your program using the Visual X-TOY simulator.
  • Make sure that your program code begins at address 10.
  • Run it, test it, then save it as a .toy file.
  • For this question you must submit your program as a .toy file.  Handwritten documents or other formats will not be accepted.
  • You do not need to add any code comments of your own.

 

 

 

 

A few common questions have popped up about assignment 5.  So here are a few hints:

  • To use the TOY simulator, first install Java JRE from here: https://www.java.com/en/download/manual.jsp.  Make sure to select the download for your OS and version (ie, 32-bit or 64-bit OS).  Then you can just double-click the toy.jar file, and it will open up.
  • There are many built-in examples in the TOY environment.  You are allowed to look at those and use them to help you answer question 4.
  • Make sure you follow the instructions exactly for question 4.  In particular, you need to use at least one loop, and you must output the results to STDOUT on each iteration.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Operators
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
  • SEE MORE 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