Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

2. The MARIE Simulator

The MARIE simulator is provided as a zip file containing Java archives (*.jar) files, documentation, and example source files. Unzip the file to a directory for use. Do the following to become familiar with the MARIE simulator.

  • Read "A Quick Start Guide for the MARIE Machine Simulator Environment" (QuickGuide.pdf provided in the zip file).
  • Depending on how comfortable you are with using the MARIE simulator after reading the quick start guide, you may also wish to read "A Guide to the MARIE Machine Simulator Environment" (MarieGuide.pdf provided in the zip file).
  • Review the example assembly language source files and experiment with the MARIE simulator using these examples. The Ex4_1.mas example is likely the most relevant to this assignment.

You are to use the MARIE simulator (MarieSim.jar) to complete this project. You will not be using the data path simulator (MarieDP1.jar). Also, note that the Marie simulator requires Java version 5 or later to be installed on your computer.

3. Design Specification

You are to design, write, test, and debug a MARIE assembly language program that counts the number of instances of a particular value in a set of words.

A template source code file (Project-2_Start.mas) is provided with this assignment. Edit this file to meet the program specifications. Note that the template includes instructions to initialize some working values that your program can use. The template also defines memory locations. You may add data memory locations, but it is not necessary to do so.

For full credit, your solution must perform the required function and must satisfy the following requirements.

a) The first instruction of the program must be placed at location (address) 0x100 (100 hexadecimal) in MARIE's memory. This is accomplished by following the program template that is provided.

b) The constant data values (One, Words, Key, and Base) should not be changed by the program. The program can load from these memory locations, but should not store to them. The array of word values that are to be processed by the program should be in successive memory locations beginning at location Array as indicated in the template file. The program should not change any of the data values in the array. These values should all be "hard-coded" into the program. Note that you will need to set the value in location Base depending on where the assembler places the array, as indicated in the listing file.

c) The program should always initialize the values for Cnt, Ptr, and Match in the working data memory and not rely on the values for these locations that are defined in the assembly source file. This initialization is done by the provided template file.

d) The program should work for any value in location Words and Key and for any set of values in the array of words, not just those provided in the template file. The value in location Words must be greater than or equal to 1. Test the program with some different values.

e) The program must place the final value for the count of matching words in location Match.

f) The program must use a loop and indirect addressing to access the values in the array of words.

Note that variables Ptr, Cnt, and Match are initialized in the template code and should be used in the loop.

Note that one solution for the project requires about 15 additional instructions to implement the correct loop. If you find that you are using significantly more instructions than this, you should reconsider your design and, as needed, consult with the GTA and/or instructor.

4. Testing

Test and debug the program using the MARIE simulator (MarieSim.jar). Debug the program using the "Step" function in the simulator. You must test your program with the following three test cases.

Test 1: Use the values for Words, Key, and the word array that are specified in the template file, assemble, and test.

Test 2: Change the value of Key to be "0000" (instead of "00AA") and change the value of Words to be decimal "10" (instead of "30"), reassemble, load, and test.

Test 3: Change the values of Key and Words and at least some of the values in the word array to values of your choice, reassemble, load, and test.

When you create your source file within MarieSim (using the File > Edit menu pick), use file name lastname_firstname_p2.mas, where "lastname" is your last or family name and "firstname" is your first or given name. You can assemble your source file in the editor program. The assembly process creates a listing file (lastname_firstname_p2.lst) and an executable file (lastname_firstname_p2.mex). Load the executable file into the simulator for execution.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9132365

Have any Question?


Related Questions in Computer Engineering

A grocery store rewards card has a 7 digit number to

A grocery store rewards card has a 7 digit number to identify the user. The first digit must be 1 or 2. The remaining six digits take values randomly between 0 - 9 inclusively. What is the probability that the ID number ...

Semantic html5an ongoing belief in the web design industry

Semantic HTML5: An ongoing belief in the Web design industry is that HTML5 is critical to Web design for four reasons: Accessibility. Search engine optimization. Faster download speeds. More efficient styling and coding. ...

Requirementsnew payroll functionality to allow global

Requirements New payroll functionality to allow global employee to submit banking information to get paid electronically (i.e. direct deposit paycheck to bank account). Initial pilot has 3 countries in Asia Pacific, Euro ...

Why are we in the golden age of technology entrepreneurship

Why are we in the 'golden age' of technology entrepreneurship? What factors are helping entrepreneurs more rapidly achieve their vision, and with a lower cost?

Recursive greatest common divisor the greatest common

(Recursive Greatest Common Divisor) The greatest common divisor of integers x and y is the largest integer that evenly divides both x and y. What is a recursive function gcd that returns the greatest common divisor of x ...

Rocket class keyboard event handlingintroductionfor this

Rocket Class: Keyboard Event Handling Introduction For this program, you will implement an interface that will allow you to move around a rocket of your own design. You will need to implement your own classes for the roc ...

Doolittle co is expected to pay a dividend of 23 next year

Doolittle Co. is expected to pay a dividend of $2.3 next year. Doolittle is expected to pay 20% of its earnings as dividends and will have an ROE of 9% until the fourth year. After that, its ROE is expected to decrease t ...

Question suppose three items r s and t are placed in a

Question : Suppose three items R, S, and T are placed in a queue in that order. Then one item is removed from the queue before a fourth item, X is placed in the queue. Then one item is removed from the queue, the items Y ...

What are content management systems cms describe the

What are Content Management Systems (CMS). Describe the challenges in implementing and maintaining CMS. Can internet search engines be considered as Content Management Systems - explain your answer.

If we compare and contrast the four market structures it is

If we compare and contrast the four market structures, it is evident that one market structure is most practiced and evident in the United States. It is the one that promotes and strives on competition. It is the one tha ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As