Assemble the below code in Mips Assembler to solve the sudoku below.
input the sudoku in the following grid.
.data
.align 4
#variable of the board
board: .byte 0, 6, 0, 1, 0, 4, 0, 5, 0
.byte 0, 0, 8, 3, 0, 5, 6, 0, 0
.byte 2, 0, 0, 0, 0, 0, 0, 0, 1
.byte 8, 0, 0, 4, 0, 7, 0, 0, 6
.byte 0, 0, 6, 0, 0, 0, 3, 0, 0
.byte 7, 0, 0, 9, 0, 1, 0, 0, 4
.byte 5, 0, 0, 0, 0, 0, 0, 0, 2
.byte 0, 0, 7, 2, 0, 6, 9, 0, 0
.byte 0, 4, 0, 5, 0, 8, 0, 7, 0
new_row: .ascii "\n"
.text
.globl main
main:
#$s0 has the offset
#$s1 has the row
#s2 has the coloum
#$s3 for the number currently testing
move $a0, $zero #first cell with offset 0
jal guess
jal print_grid
j exit
exit:
move $a0, $s0
li $v0, 17
syscall
guess:
#Setup the stack frame and save all the required register's values to be used later
sub $sp, $sp, 20
sw $ra, 16($sp)
sw $s0, 12($sp)
sw $s1, 8($sp)
sw $s2, 4($sp)
sw $s3, 0($sp)
move $s0, $a0
beq $s0, 81, guess_comp #Chekc if it has reached the end of the grid
#iF NOT THE END
li $s3, 9
div $s0, $s3
mflo $s1 #lo holds the quotient
mfhi $s2 #hi has the remainder
lb $t0, board+0($s0)
beq $t0, 0, guess_it # if equal to zero then guess the number to be placed in it
addi $a0, $s0, 1
jal guess
j guess_return
#$a0 has the number
#$a1 has the row
#$a2 has the coloumn
guess_it:
move $a0, $s3
move $a1, $s1
move $a2, $s2
jal check_num
bnez $v0, num_exist
#else
sb $s3, board + 0($s0)
addi $a0, $s0, 1
jal guess
beqz $v0, guess_return
num_exist:
sub $s3, $s3, 1
bnez $s3, guess_it
sb $zero, board + 0($s0)
#else No number is satisfied as already checked from 9 to 1 go back change the previous number and come back
li $v0, 1
j guess_return
guess_comp:
move $v0, $zero
guess_return:
lw $ra, 16($sp)
lw $s0 , 12($sp)
lw $s1, 8($sp)
lw $s2, 4($sp)
lw $s3, 0($sp)
addi $sp, $sp, 20
jr $ra
#set t1 to an element. decrease t0 by 1 and check it with t1
check_num:
li $t0, 9
mul $t1, $a1, $t0 # offset of the first element of the row of the element to guess
check_num_row:
lb $t2, board+0($t1)
beq $t2, $a0, present #Found the element in the row
#else
addi $t1, $t1, 1
sub $t0, $t0, 1
bnez $t0, check_num_row
#else
move $t1, $a2
check_num_col:
lb $t2, board+0($t1)
beq $t2, $a0, present #found the element in the coloumn
#else
addi $t1, $t1, 9
ble $t1, 81, check_num_col
#else
#(success)
move $v0, $zero
j check_success
present:
li $v0, 1
check_success:
jr $ra
#Printing
#s0 holds the offset
#s1 hold row
#s2 hols coloumn
print_grid:
sub $sp, $sp, 16
sw $ra, 12($sp)
sw $s2, 8($sp)
sw $s1, 4($sp)
sw $s0, 0($sp)
la $s0, board #number-> board[0,0]
move $s1, $zero #row ->0
move $s2, $zero #coloum ->0
print_cell:
lb $a0, ($s0) #To print a int
li $v0, 1
syscall
addi $s0, $s0, 1 #add to offset
addi $s2, $s2, 1 #add to coloumn
blt $s2, 9, print_cell #if the coloumn is complted
la $a0, new_row #to print asciiz
li $v0, 4
syscall
move $s2, $zero #reset coloumn to zero
addi $s1, $s1, 1 #add to row
#Check if the row is printed
blt $s1,9, print_cell
lw $s0, 0($sp) # Restore the $s0 register
lw $s1, 4($sp) # Restore the $s1 register
lw $s2, 8($sp) # Restore the $s2 register
lw $ra, 12($sp) # Restore the return address
addi $sp, $sp, 16 # Clean up the stack
jr $ra
Trick to see your saved Password.
Let me show you, how this works
This actually manipulate with the source code of the page and convert the password type to text type.
Step-1-Go to your login page.
CHECK IF THE LOGIN CREDENTIAL IS FILLED AS SHOWN.
IF YES READY TO GO.
Step-2-Right click on the password filled and click inspect element
A docked window will be open as shown with code of the field highlighted.
Step-3- Just double click on the "password" tag, and write it as "text".
YOU WOULD BE ABLE TO VIEW THE PASSWORD ON PASSWORD FIELD.
ThankYou
This actually manipulate with the source code of the page and convert the password type to text type.
Step-1-Go to your login page.
CHECK IF THE LOGIN CREDENTIAL IS FILLED AS SHOWN.
IF YES READY TO GO.
VICTIM'S PAGE |
Step-2-Right click on the password filled and click inspect element
A docked window will be open as shown with code of the field highlighted.
DOCKED WINDOW WITH CODE OF ELEMENT |
DOUBLE CLICK ON THE PASSWORD TAG |
Step-3- Just double click on the "password" tag, and write it as "text".
WRITE IT "text" AND HIT ENTER |
Step-4- Now Just hit Enter.
DONE |
YOU WOULD BE ABLE TO VIEW THE PASSWORD ON PASSWORD FIELD.
ThankYou
To convert disk to mbr(error: cannot install winows to gpt disk)
hello readers
today i learned to convert a disk to mbr.
this is caused by :
1.when install linux
2. attempt to install linux
consequences:
cannot install windows(error:cannot install windows on gpt, needs mbr ).
need to know!!!
your entire disk will cleaned
so you can first create a back up using your linux os.
What to do?
1. boot up with your windows installer usb or cdrom, etc
2. press Shift+f10 to open a dos window
3. type ' diskpart' without qoutes.(enter)
4. type 'list disk'.(enter)
5. you can view your online disks and your affected disk(generally disk0).
6. now type 'select disk 0'.(enter)
7. now disk 0 is in your control.
8. now type 'clean'.(enter)
9. now type 'convert mbr'.(enter)
10. your disk is now mbr.
11. now its time to create a partition.
12. type 'create partition primary'.(enter)
13. type 'format fs ntfs quick'.(enter)
14. done!
15. time to exit
16. type 'exit'(enter)
17. type 'exit'(enter)
now you can click install to continue installation.
thankyou!!!!!!!!!!
dont forget to comment about the helpfulness of the post.
today i learned to convert a disk to mbr.
this is caused by :
1.when install linux
2. attempt to install linux
consequences:
cannot install windows(error:cannot install windows on gpt, needs mbr ).
need to know!!!
your entire disk will cleaned
so you can first create a back up using your linux os.
What to do?
1. boot up with your windows installer usb or cdrom, etc
2. press Shift+f10 to open a dos window
3. type ' diskpart' without qoutes.(enter)
4. type 'list disk'.(enter)
5. you can view your online disks and your affected disk(generally disk0).
6. now type 'select disk 0'.(enter)
7. now disk 0 is in your control.
8. now type 'clean'.(enter)
9. now type 'convert mbr'.(enter)
10. your disk is now mbr.
11. now its time to create a partition.
12. type 'create partition primary'.(enter)
13. type 'format fs ntfs quick'.(enter)
14. done!
15. time to exit
16. type 'exit'(enter)
17. type 'exit'(enter)
now you can click install to continue installation.
thankyou!!!!!!!!!!
dont forget to comment about the helpfulness of the post.
How to create a invisible folder in windows.
Hello Readers,
Today i learnt how to hide a folder in really different way.
Consequence:- Folder is created with no name.
Folder is created with no icon.
which mean your folder will not be visible to any one even if it's attributes is not hidden.
The folder created is undetected by any searches.
The folder created is undetected by ADMIN server for surveillance.
it is completely invisible, the person knowing the correct position of the folder on the area can only find the folder.
Step-1-Create a folder(simply right click and new and folder).
Step-2-While renaming the folder
a.Clear the writing area.
b.press Alt+1023(on numpad) as shown( Alt pressed + 1 then 0 then 2 then 3).
Alternatively(press ALT+0160).
c. Hit enter.
Now, A folder with no name is created.
Step-3- Go to PROPERTIES of the folder created.
a.Go to CUSTOMIZE tab.
b.Click on Change Icon Button.
c.you will see a blank space between the icons.
d.Click on that blank space.
e.Click OK.
f.Click OK.
Now you have created a folder which is completed invisible. to anyone.
But You are only one to who know the X-Y coordinate of the folder on the area.
And if take the mouse pointer on that area you will get a visual of change in color, double click on it and you open your invisible folder.
OR
you could just select area to locate your invisible folder.by simply click and dragging your mouse pointer on that area.
.Now you can hide your stuff in that folder and no one can find the folder even if they search the whole computer as they have no name to search.
Thank you.
Dont forget to comment about the helpfulness of the post.
Today i learnt how to hide a folder in really different way.
Consequence:- Folder is created with no name.
Folder is created with no icon.
which mean your folder will not be visible to any one even if it's attributes is not hidden.
The folder created is undetected by any searches.
The folder created is undetected by ADMIN server for surveillance.
it is completely invisible, the person knowing the correct position of the folder on the area can only find the folder.
Step-1-Create a folder(simply right click and new and folder).
Step-2-While renaming the folder
a.Clear the writing area.
b.press Alt+1023(on numpad) as shown( Alt pressed + 1 then 0 then 2 then 3).
Alternatively(press ALT+0160).
c. Hit enter.
Now, A folder with no name is created.
Step-3- Go to PROPERTIES of the folder created.
a.Go to CUSTOMIZE tab.
b.Click on Change Icon Button.
c.you will see a blank space between the icons.
d.Click on that blank space.
e.Click OK.
f.Click OK.
Now you have created a folder which is completed invisible. to anyone.
But You are only one to who know the X-Y coordinate of the folder on the area.
And if take the mouse pointer on that area you will get a visual of change in color, double click on it and you open your invisible folder.
OR
you could just select area to locate your invisible folder.by simply click and dragging your mouse pointer on that area.
.Now you can hide your stuff in that folder and no one can find the folder even if they search the whole computer as they have no name to search.
Thank you.
Dont forget to comment about the helpfulness of the post.
Download Here Drive +, If downloaded earlier and can't download now. INDIA
Hello reader,
Today I learnt how to download a WINDOWS PHONE APP which you have downloaded earlier and cannot download due to region problems.
LIKE: HERE Drive +,etc.
Step-1; Go to APP STORE.
Step-2: Push '...' button to open menu.
Step-3: Go to my apps.
Step-4: Download the app.
Thank you.
Don't Forget To Comment About The Helpfulness Of the Post.
Today I learnt how to download a WINDOWS PHONE APP which you have downloaded earlier and cannot download due to region problems.
LIKE: HERE Drive +,etc.
Step-1; Go to APP STORE.
Step-2: Push '...' button to open menu.
Step-3: Go to my apps.
Step-4: Download the app.
Thank you.
Don't Forget To Comment About The Helpfulness Of the Post.
Transfer, read, write windows phone on linux/ubuntu/,etc
Hello Readers
Today i learnt how to browse windows phone (wp) on linux.
1. open terminal.
2. type "sudo apt-get install gmtp"(without quotes).
3. give your password
4. press y if asked.
5. now you can browse write and transfer file from form windows phone.
Thankyou
dont forget to comment about the helpfulness of the post.
Create your own command prompt(cmd)
Hello reader,
Does your school's computer not allow you to open Command Prompt(cmd)?
Here is the solution.
Basically, it needs some cmd commands .
ALGORITHM:
> Set title of your shell to "Command Prompt".
>Create a function called cmd.
>Set the directory to current directory of application.
>Trigger cmd
Step-1- Open Notepad.
Step-2-Type in the following Code.
CODE:
@echo off
cls
title Command Prompt
echo Welcome to CMD
echo.
:cmd
set /p "cmd=%cd%>"
%cmd%
echo.
goto cmd
Step-3- Save the file as "cmd.bat".
Open the file created. And here you are with the command prompt of your own.
Don't forget to comment about the helpfulness of the post.
Thank you
Does your school's computer not allow you to open Command Prompt(cmd)?
Here is the solution.
Basically, it needs some cmd commands .
ALGORITHM:
> Set title of your shell to "Command Prompt".
>Create a function called cmd.
>Set the directory to current directory of application.
>Trigger cmd
Step-1- Open Notepad.
Step-2-Type in the following Code.
CODE:
@echo off
cls
title Command Prompt
echo Welcome to CMD
echo.
:cmd
set /p "cmd=%cd%>"
%cmd%
echo.
goto cmd
Step-3- Save the file as "cmd.bat".
Open the file created. And here you are with the command prompt of your own.
Don't forget to comment about the helpfulness of the post.
Thank you
Dell laptop heats up after Shutdown/Sleep
Hello Readers,
If you are reading this, it means you might be having a Dell laptop with windows 10, which heats up sometimes, more often when charger is plugged in and you shut it down or put it to sleep and it ends up discharging the whole battery(Saying from experience).
I own a windows 10 operated dell 3542 and gives the above problem.
Today I learnt how to get rid of this.
Actually this is caused by the INTEL MANAGEMENT ENGINE INTERFACE provided by dell(Intel graphics driver).What we are going to do is to uninstall it.
Step-1-Right click on "This PC" and go to "properties".
Step-2-Click on "Device manager" on the left side of the window.
Step-3-In the "System devices" section you will see "Intel(R) Management Engine Interface", Double click on it.
Step-4-Go to "Driver tab" and hit "Disable". And "OK".
Now you would be able to shutdown your dell PC without any harm.
Don't forget to comment about the helpfulness of the post.
Thank you!!
If you are reading this, it means you might be having a Dell laptop with windows 10, which heats up sometimes, more often when charger is plugged in and you shut it down or put it to sleep and it ends up discharging the whole battery(Saying from experience).
I own a windows 10 operated dell 3542 and gives the above problem.
Today I learnt how to get rid of this.
Actually this is caused by the INTEL MANAGEMENT ENGINE INTERFACE provided by dell(Intel graphics driver).What we are going to do is to uninstall it.
Step-1-Right click on "This PC" and go to "properties".
Step-3-In the "System devices" section you will see "Intel(R) Management Engine Interface", Double click on it.
Step-4-Go to "Driver tab" and hit "Disable". And "OK".
Don't forget to comment about the helpfulness of the post.
Thank you!!
Convert media file using VLC media player
Hello readers,
What do you use to convert your media file e.g. MP4 to MP3, etc.
Does it asks you buy it after 7 days of trial or something.
Why not to use your media player to convert media files.
Yes, VLC media player comes with inbuilt media converter.
VLC is one of the most popular media player used world wide.And it very handy to use.
Click to DOWNLOAD
To convert a file open VLC.
Step-1- Go to Media tab and click Convert/Save.
Step-2- A dialog box would have opened. Now click Add.
Step-3- Click Convert/Save.
Step-4- On profile select the file you want to change.
Step-5-Set the file destination and name the file.
Step-6-Click Start.
Now it will convert the file and save it to it's destination.
Thankyou
Don't forget to comment and share.
What do you use to convert your media file e.g. MP4 to MP3, etc.
Does it asks you buy it after 7 days of trial or something.
Why not to use your media player to convert media files.
Yes, VLC media player comes with inbuilt media converter.
VLC is one of the most popular media player used world wide.And it very handy to use.
Click to DOWNLOAD
To convert a file open VLC.
Step-1- Go to Media tab and click Convert/Save.
Convert/Save |
Step-3- Click Convert/Save.
Add the media file. |
Step-4- On profile select the file you want to change.
Step-5-Set the file destination and name the file.
Browse the file destination. |
Step-6-Click Start.
Now it will convert the file and save it to it's destination.
Thankyou
Don't forget to comment and share.
Unable to use word-flow keyboard in Windows phone
Hello Readers,
After a reset my word flow keypad didn't work!.
And i couldn,t see any 'Type as i swipe through letters' but showed with 'Type as i flick through letters'.
After a little digging. i got the solution.
I am using XOLO WIN Q1000 with Windows 8.1 update 2.
Actually this happens sometimes when you have multiple keyboard with language such as English India, etc.
So here it is.
Step-1- go to System Settings.
Step-2- Scroll down to Keyboard Option.
Step-3- Tap and hold the language to remove.
Remove all Unwanted languages.
Step-4- Restart the phone.
And you are Done.
Don,t forget to comment if you have any Silly problems.
If you have some silly problems,then send it to us and we will solve it and post it.
After a reset my word flow keypad didn't work!.
And i couldn,t see any 'Type as i swipe through letters' but showed with 'Type as i flick through letters'.
After a little digging. i got the solution.
I am using XOLO WIN Q1000 with Windows 8.1 update 2.
Actually this happens sometimes when you have multiple keyboard with language such as English India, etc.
So here it is.
Step-1- go to System Settings.
Step-2- Scroll down to Keyboard Option.
Step-3- Tap and hold the language to remove.
Remove all Unwanted languages.
Step-4- Restart the phone.
And you are Done.
Don,t forget to comment if you have any Silly problems.
If you have some silly problems,then send it to us and we will solve it and post it.
Unable to mount partition in linux
Hello Readers
if you are new to linux-windows dual boot , then you might this.
Why does this happen?
You might have noticed that after Windows 8 and later, boot time of os is faster as compared to Windows XP/7.For this to happen Windows save some metadata on the hardisk which disable the access to it.So, What we going to do is to turn off fast boot.
Step-1- go to Power & Sleep Settings(hit start key and type power) .
Step-2-Go to Advanced Power Setting.
On left side on the window you would be able to some labels.
Step-3-Click on "Choose what the power buttons do".
Step-4-Click on "Change setting that are currently unavailable".
Step-5- Scroll down and uncheck fast start up.
And you are done.
But turning off fast start up will affect your boot time.
Thankyou.
Go silly and comment!!
if you are new to linux-windows dual boot , then you might this.
Why does this happen?
You might have noticed that after Windows 8 and later, boot time of os is faster as compared to Windows XP/7.For this to happen Windows save some metadata on the hardisk which disable the access to it.So, What we going to do is to turn off fast boot.
Step-1- go to Power & Sleep Settings(hit start key and type power) .
Step-2-Go to Advanced Power Setting.
Power & Sleep Settings |
On left side on the window you would be able to some labels.
Step-3-Click on "Choose what the power buttons do".
Step-4-Click on "Change setting that are currently unavailable".
Step-5- Scroll down and uncheck fast start up.
And you are done.
But turning off fast start up will affect your boot time.
Thankyou.
Go silly and comment!!
How to hide your files behind an image.
Hello Reader,
ooo...Steganography, very heavy word, isn't it?
If you are expecting a steganograph tutorial, I'm sorry. Because this is way sillier than that.
This post is on merging two same or different type of files, and yeah!, literally two or more files of any formats.
Below i have chosen a .jpg file and a .mp3 file.
Archive the file to be hidden, to keep both the file distinct.Using WinRar,etc. Simply right click and archive.
Step-1-Choose the files you want to merge and keep it in a single folder or location for ease.
Step-2-Make sure that you know the formats of the files chosen.
Step-3- Open Command Prompt(Win-R->type cmd->hit Enter)
Step-4- Using 'cd' to open a folder,'cd..' to go to previous folder and 'dir' to list the content of the folder, locate your folder where your files are kept.
Let your first file is file1.jpg and second file is file2.rar and resultant file is result.jpg.
Step-5-Now type 'copy /b file1.jpg+file2.mp3 result.jpg.
This will create a new file in that folder of the extension .jpg.
Try simply double clicking it.This would open file1.jpg image. but try opening it with an application compatible for .rar file.
This would open archive with file2.mp3 and you can use it.
By this way you can merge two files.
Try merging a video.mp4 and image.jpg with resultant newimage.jpg,
Now open it with photo viewer, and then by WinRar.
"Oh my god my video is encrypted behind an image, safe from my brother.LOL"
This is real silly fun, right!!.
Why don't you try merging two mp3 files or two movies and see the results.
But when you merge a file with a .txt file ad open the resultant file with notepad then you would see a bunch of codes and then comes your text on the text file.
Thankyou!!
Don't forget to comment about Sillyness!!.
ooo...Steganography, very heavy word, isn't it?
If you are expecting a steganograph tutorial, I'm sorry. Because this is way sillier than that.
This post is on merging two same or different type of files, and yeah!, literally two or more files of any formats.
Below i have chosen a .jpg file and a .mp3 file.
Archive the file to be hidden, to keep both the file distinct.Using WinRar,etc. Simply right click and archive.
Step-1-Choose the files you want to merge and keep it in a single folder or location for ease.
Song is the file to be hidden behind image. |
Step-2-Make sure that you know the formats of the files chosen.
Step-3- Open Command Prompt(Win-R->type cmd->hit Enter)
Step-4- Using 'cd' to open a folder,'cd..' to go to previous folder and 'dir' to list the content of the folder, locate your folder where your files are kept.
Let your first file is file1.jpg and second file is file2.rar and resultant file is result.jpg.
Step-5-Now type 'copy /b file1.jpg+file2.mp3 result.jpg.
Process on Command Prompt |
This will create a new file in that folder of the extension .jpg.
Try simply double clicking it.This would open file1.jpg image. but try opening it with an application compatible for .rar file.
This would open archive with file2.mp3 and you can use it.
result when opened with WinRar |
By this way you can merge two files.
Try merging a video.mp4 and image.jpg with resultant newimage.jpg,
Now open it with photo viewer, and then by WinRar.
"Oh my god my video is encrypted behind an image, safe from my brother.LOL"
This is real silly fun, right!!.
Why don't you try merging two mp3 files or two movies and see the results.
But when you merge a file with a .txt file ad open the resultant file with notepad then you would see a bunch of codes and then comes your text on the text file.
Thankyou!!
Don't forget to comment about Sillyness!!.
Subscribe to:
Posts (Atom)