Advertisement
Advertisement
| 03.27.2008 at 12:42PM PDT, ID: 23275371 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: |
promptHex: .asciiz "Enter a hexadecimal number i.e.1234ABCD: "
hexInt: .asciiz "Integer equivalent: "
buffer: .space 80
hexadecimal: .space 8
la $a0, promptHex
li $v0, 4
syscall
li $v0, 8
la $a0, buffer
li $a1, 80
syscall
la $a0, buffer
li $a1, 64
jal hexToInt
sw $v0, integer
li $v0, 4
la $a0, hexInt
syscall
li $v0, 1
lw $a0, integer
syscall
hexToInt:
#-----------------------------------------------------------------
li $v0, 0
li $t1, 0
li $t2, 32
htoi:
#---------------------------------------------- #shift 16 bits
lbu $t0, 0($a0)
addi $t1, $t1, -4
beq $t0, 48, Number
beq $t0, 49, Number
beq $t0, 50, Number
beq $t0, 51, Number
beq $t0, 52, Number
beq $t0, 53, Number
beq $t0, 54, Number
beq $t0, 55, Number
beq $t0, 56, Number
beq $t0, 57, Number
beq $t0, 65, Letter
beq $t0, 66, Letter
beq $t0, 67, Letter
beq $t0, 68, Letter
beq $t0, 69, Letter
beq $t0, 70, Letter
beq $t0, 0x00, Done
Number:
#---------------------------------------------- #convert number
addi $t0, $t0, -48
sll $t0, $t0, $t1
add $v0, $v0, $t0
addi $a0, $a0, -1
addi $a1, $a1, -7
j htoi
Letter:
#---------------------------------------------- #convert letter
addi $t0, $t0, -55
sll $t0, $t0, $t1
add $v0, $v0, $t0
addi $a0, $a0, -1
addi $a1, $a1, -7
j htoi
Done:
#---------------------------------------------- #end subroutine
jr $ra
--------------------
|
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |