# false code...
# .data
#str1: .asciiz "plz enter two numbers:\n"
#str2: .asciiz "warning: result overflow\n"
#str3: .asciiz "the result:\n"
#CONTROL: .word32 0x10000
#DATA: .word32 0x10008
# right code...
.data
str1: .asciiz "please enter two numbers:\n" # when I change 'please' to 'plz', something wrong happends! why?
str2: .asciiz "the Result:\n"
str3: .asciiz "Waring:result overflow!\n"
CONTROL: .word32 0x10000
DATA: .word32 0x10008
.text
main:
lwu r21,CONTROL(r0)
lwu r22,DATA(r0)
daddi r24,r0,4 ;set string output
daddi r1,r0,str2 ;get address of str1
sd r1,(r22) ;wirte DATA
sd r24,(r21) ;print
halt
我想在 winmips64 上打印一个字符串。它在错误代码中不显示任何内容,但在正确代码中有效。在正确的代码中,我尝试在 str1 中将 'please' 更改为 'plz' 并且它不再起作用,为什么?