title: Displaying Ascii values of characters
body: <p>I am trying to make a program in which I can display ascii value of characters. The problem is it doesn't display the true ascii values. I am making this code in MIPS assembly which is very much similar to normal assembly language. Here is the code:</p>
  
  <pre><code>.data
  
  User: .asciiz "Bush"
  Line: .asciiz "\n"
  Address: .word User
  
  .text
  
  main:
  li $t0,1
  li $t1,2
  li $t2,3
  li $t3,4
  li $t4,5
  
  lb $a0,User($0)
  li $v0,1
  syscall
  
  la $a0,Line
  li $v0,4
  syscall
  
  lb $a0,User($t0)
  li $v0,1
  syscall
  
  la $a0,Line
  li $v0,4
  syscall
  
  lb $a0,User($t1)
  
  li $v0,1
  syscall
  
  la $a0,Line
  li $v0,4
  syscall
  
  lb $a0,User($t2)
  
  li $v0,1
  syscall
  
  la $a0,Line
  li $v0,4
  syscall
  
  lb $a0,User($t3)
  
  li $v0,1
  syscall
  
  la $a0,Line
  li $v0,4
  syscall
  
  li $t1,-1
  jal Length
  
  j Exit
  
  Length:
  
  beq $a0,0,End
  addi $t1,$t1,1
  lb $a0,User($t1)
  j Length
  
  End:
  move $a0,$t1
  li $v0,1
  syscall
  
  jr $ra
  
  Exit:
  li $v0,10
  syscall
  </code></pre>
  
  <p>What is the possible reason that It is not showing the true ascii values. Moreover When I try to make a program which finds the ascii values of all english alphabets, I get run time errors.It will be great deal to me if any one can help me with this.</p>
  
  <p>Regards</p>