Starting from:

$29

Project-1 MIPS Assembly

Computer Organization


For this project you will write two assembly procedures that are described below.
Obviously you should use other procedures inside these two procedures for a better
coding. You will get at most 25 points if your program does not execute in QtSpim at all
or does nothing related with the project during execution. If it executes your grade will
be decided accoring to:
- Functionality
- Accuracy
- User friendly interface
- Better coding
- Efficient use of stack and subroutines
- Commenting
- Obeying the MIPS register contract
At the beginning you should ask the user whether Procedure 1 (Drawing stars) or
Procedure 2 (Stock market game) will be used.Procedure 1)
Write a procedure that draws the figure below for a given number n.
 The user is asked to enter the number n.
 n should be an odd number between 1 and 21
 Figure is drawn only using ‘ ‘(empty character) and ‘*’ (star) characters.
 For n=1
*
 for n=3
*
* * *
* * * *
* * *
*
 for n=5
*
* * *
* * * * *
* * * *
* * * * * *
* * * *
* * * * *
* * *
*
 For n=7
*
* * *
* * * * *
* * * * * * *
* * * *
* * * * * *
* * * * * * * *
* * * * * *
* * * *
* * * * * * *
* * * * *
* * *
*Procedure 2)
Write a procedure for Stock Market Game :
 Game is played with two players.
 Game takes 12 weeks.
 Players start the game with 100 money.
 There are three different type of investments: Dollar, gold and bond.
 Each week, values of investments change randomly within some predefined range.
These ranges are defined as follows:
Dollar : 7 – 13
Gold : 18 – 22
Bond : 25 - 75
According to this values, each week value of the dollar,for example, is changed to a
value between 7 and 13 (including 7 and 13) randomly regardless of the previous
value of the dollar.
 To have random numbers, ask the user the date and the time at the beginning:
What is the date and time? 21/10/2014 15:43
 At each turn, each player can buy or sell investments. Players can make more than
one operations in a turn.
 A player’s Asset is calculated by summing the total values of all their investments and
their money.
 Player’s goal is to make maximum asset at the end of the game. Player with more
asset wins the game.
 A menu should be used to show current values of investments, players’ assets(in
detail) and player’s alternative choices.
 Below, some screenshots are shown. The aim of showing those captures is to give
you an idea of how a menu should be. You do not have to make the same menu.
Actually, it is a quite simple menu and you can and should make your design of a
richer menu.

More products