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

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter2: Elements Of High-quality Programs
Section: Chapter Questions
Problem 1GZ
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr