.data base: .byte 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 .text or $s0, $0, $0 lwl $s0, base + 4 or $a0, $0, $s0 jal print lwr $s0, base + 1 or $a0, $0, $s0 jal print or $s0, $0, $0 lwl $s0, base + 5 or $a0, $0, $s0 jal print lwr $s0, base + 2 or $a0, $0, $s0 jal print or $s0, $0, $0 lwl $s0, base + 6 or $a0, $0, $s0 jal print lwr $s0, base + 3 or $a0, $0, $s0 jal print or $s0, $0, $0 lwl $s0, base + 7 or $a0, $0, $s0 jal print lwr $s0, base + 4 or $a0, $0, $s0 jal print j exit print: ori $v0, $0, 34 syscall ori $a0, $0, 10 ori $v0, $0, 11 syscall jr $ra exit: ori $v0, 10 syscall
用Mars运行得到结果
0x55000000 0x55443322 0x66550000 0x66554433 0x77665500 0x77665544 0x88776655 0x88776655