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.:- M9717618

Have any Question?


Related Questions in Computer Engineering

Each student will create classes methods and design icons

Each student will create classes, methods, and design icons for their mobile device application using OOP language and GUI. The following must be included. Your instructor may add additional requirements, if any, in a se ...

Remember all of the following steps when showing that a

Remember all of the following steps when showing that a problem D is NPcomplete: 1. Show that D is in NP by briefly explaining how to quickly verify a solution to it. 2. Choose another problem Q that is known to be NP-ha ...

From the following information how would i work out the

"From the following information, how would I work out the standard error of the estimate for the regression model (in excel)? Multiple R=0.7545, Adjusted R Square=0.5077, Regression df=1, Residual df=7 SS=27.37 MS=3.91, ...

Review questionsrq web server environment kroenke book chap

Review Questions(RQ) Web Server Environment Kroenke Book Chap 11 The Review Questions (RQ) listed below can also be found in the Kroenke textbook, starting on page 526. This is NOT the entire list of Review Questions, bu ...

You own a specialty company self made company smc which

You own a specialty company; self made company (SMC) which sells hats and jackets. You obtained an object IDENTIFIER 5000 under enterprises node from IANA. You have two branch locations. Each has an inventory system that ...

Jason who is very knowledgeable regarding computers agrees

Jason, who is very knowledgeable regarding computers, agrees to purchase computers for Nick's business. Jason is retained for that purpose only, he is paid a set rate for the job, and Nick exercised no control over the m ...

Savings account balance write a program that calculates the

Savings Account Balance Write a program that calculates the balance of a savings account at the end of a period of time. It should ask the user for the annual interest rate, the starting balance, and the number of months ...

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

Your university is running a special offer on tuition this

Your university is running a special offer on tuition. This year's tuition cost is $18,000. Next year's tuition cost is scheduled to be $19080. The university offers to discount next year's tuition at a rate of 6% If you ...

In linux what synchronization methods they use within the

In Linux what synchronization methods they use within the kernel, please dig into your findings for Linux.

  • 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