You are trying to “hack” a computer by looking for its password.However, the password is secretly nested in a long string. Pleasewrite a MIPS assembly code to retrieve the nested password.
To simplify the task, the string that contains the password isprovided 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 answerin MIPS code would be much more helpful and appreciated. Thankyou.
.asciiz “this is not a password 1122^&*( this ispassword?987654hello world!!!!1234567”
# Your code starts here
la $a0, MemoryData # load the head address of “MemoryData” intoregister $a0
li $v0, 4 # let computer know you about to print out astring
syscall # pring out the string