Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Make a MIPS Assembly Language program that: 1.Deal the cards face down. 2.Add a

ID: 3840798 • Letter: M

Question

Make a MIPS Assembly Language program that:

1.Deal the cards face down.

2.Add a polling loop at the beginning of your main program to request the character for the level of difficulty. (this will randomize the syscall random.

3.create a map structure to map mouse click co-ordinates to cards. Initialize it to NULL pointers, and then fill it with card pointers as you create the cards.

4.Add a polling loop at the end of initializations in main to wait for mouse clicks.

5.Add card.click() method. Using a global (static) state variable, and two global (static) card pointers, implement this state machine:

6.Plus-Plus on the state diagram indicated that a card reveal will increment the turn-counter.

Explanation / Answer

I have written the MPIS Program for the cards face down. I have included the comments for each part of the code and the final output of it.

Let me explain you in step-by-step procedure:-

Step-1:

The initial part is to declare the data types and the literals for binding the value to each other.

Example:-

Step-2:

The next step is to use the make use of different types of registers to perform intsructions,

Example:-

MISP Assembly Program:-

  
; Declare the MISP progarm

OCT2ALF4 SIMULATE
TS_CARD


CARD_GAME CHEK TS_CARD BLANK 1T3
TS_CARD OVF CARD_GAME   
TS_CARD OVF CARD_GAME   
TS_CARD BLANK 1T3

TS_CARD N,AU1
TERMDUMP S, CARD TYPER CAUSE
TS_CARD OFF TEST   
CARD_TN W CORONER
TS_CARD TWOS   
LA TWOS   

END PRINT CARD_NA OUT PTR
CARD_NA OUT PTR

CARD_TXVal CARD_SP1
TS_CARD BLANKS   
S, MON PRINT LINE -1
CARD_TXVal SKIP   
CARD_TN CAUSE
CARD_TXVal BANK 2   
TS_CARD C,+1   
TS_CARD EIGHT

TS_CARD CARD_SP1

LINES TS_CARD FOUR   

LINE S, MON PRINT LINE -1
WD PRIN SPEX
CARD_TXVal Z,X3   
S, OCT2ALF4 EDIT WD

WORD S, OCT2ALF5 3,0
CARD_NA N,X5   
CARD_TXVal ZERO C6
LA SPEC 1777
CARD_NA Z,X5,1   

CARD_NA Z,S2,1   

CARD_TXVal SP2
S, MON PRINT LINE -1
LA Z,S1,1   

TS_CARD CARD_SP1

LAST LINE CARD_TXVal SKIP   
S, MON PRINT DEPAGIN8
S, MON PRINT LINE -1
CARD_TXVal CARD MASKS
S, CARD TYPER END SI MSG   
MASK LOC MODLOC 64

SEQBRK END

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote