Advertisement
math230

big end vs little-end in Mars/Mips

Jul 20th, 2020
1,930
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .data
  2.    
  3. value1: .word   0xcafebabe
  4. value2: .word   0xDE
  5. #value3:    .word   0xcafebabe
  6. value3: .byte   0xca,0xfe,0xba,0xbe
  7.  
  8.  
  9.     .text   #code starts here
  10.     .globl main #accessible to other routines
  11.  
  12. main:
  13.     add $t0,$s1,$s2
  14.     addi $s1,$0,3
  15.     addi $s2,$0,5
  16.    
  17.     la  $s1, value3   #value3
  18.     lbu  $s1,0($s1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement