我只是想把这个'a'打印到屏幕上,但是通过首先推送到堆栈以便我可以检查我是否确实完成了推送到堆栈,似乎我不能,因为它每次都会打印一个奇怪的字符。怎么了?
.data
char: .word 'a'
.text
.globl main
main:
la $t0, char
sub $sp, $sp, 4 #allocate byte for stack
sb $t0, 0($sp) #push to stack
la $t1, 0($sp) #I wasnt able to print the top of the stack directly so I tried this
li $v0, 11
la $a0, 0($t1) #It isnt working anyway.. Prints É
syscall
add $sp, $sp, 4
jr $ra