Question: You are trying to hack a computer by looking for its password. However, the password is secretly nested in a long string. Please write a

You are trying to "hack" a computer by looking for its password. However, the password is secretly nested in a long string. Please write a MIPS assembly code to retrieve the nested password.

To simplify the task, the string that contains the password is provided and is stored in the data segment.

The password is a 6-consecutive digits. For example:

a123456 is NOT a password

123456a is NOT a password

12345 is NOT a password

1234567 is NOT a password

123456 is a password.

This question has been posted with a c++ solution, but an answer in MIPS code would be much more helpful and appreciated. Thank you.

Provided Code:

.data

MemoryData:

.asciiz "this is not a password 1122^&*( this is password?987654hello world!!!!1234567"

.text

.globl main

main:

# Your code starts here

la $a0, MemoryData # load the head address of "MemoryData" into register $a0

li $v0, 4 # let computer know you about to print out a string

syscall # pring out the string

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!