Question: Hello, I'm working on a homework for my MIPS assembly class and I've having difficulties getting started. The main idea of this program is that

Hello,

I'm working on a homework for my MIPS assembly class and I've having difficulties getting started. The main idea of this program is that using a queue, I have to manage 7 vacuum cleaner robots. In this program, the user can enter a "0"(among several other options) to check out an available robot, and when that happens,a unique transaction number will be generated and given to the user, which will then be used to return the robot(I know how to do this part), then the system will update the record, marking one robot from available status to being checked out, associated with the transaction number.

So my idea here is to use a .word to store the names with the 7 robots(A,B,C,etc), starting from the head(A) to the tail(G). Then to generate a unique number, i'll use something like:

li $v0, 41 #service 41, random int

xor $a0, $a0, $a0 #select random generator 0

syscall #generate random int (returns in $a0)

li $v0, 1 #service 1, print int

syscall #print previously generated random int

How do I update the record, marking one robot from available status to being checked out? Using the transaction number

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!