Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Assembly 如何在程序集中声明字符串变量?_Assembly_Mips32_Qtspim - Fatal编程技术网

Assembly 如何在程序集中声明字符串变量?

Assembly 如何在程序集中声明字符串变量?,assembly,mips32,qtspim,Assembly,Mips32,Qtspim,如何在MIPS程序集中声明字符串变量而不进行初始化?然后它从用户那里收到一笔钱 例如:字符串判断使用.space指令保留一些空间: .data foo: .space 100 # Reserve 100 bytes of space .text la $a0, foo # Load the address of foo # Do whatever 谢谢亲爱的迈克尔。我有点困惑,怎么才能让它从键盘上读字符串呢?你会这样做的。这样的话,8号。谢谢。有没有办法在MIPS中打印新行?打印

如何在MIPS程序集中声明字符串变量而不进行初始化?然后它从用户那里收到一笔钱


例如:
字符串判断

使用
.space
指令保留一些空间:

.data
foo: .space 100  # Reserve 100 bytes of space

.text
la $a0, foo      # Load the address of foo
# Do whatever

谢谢亲爱的迈克尔。我有点困惑,怎么才能让它从键盘上读字符串呢?你会这样做的。这样的话,8号。谢谢。有没有办法在MIPS中打印新行?打印字符串
13,10,0
。或
.asciiz“\r\n”
如果QtSpim识别这些转义字符。13是回车符,10是换行符,0是空终止符。所以
.byte 13,10,0
.asciiz“\r\n”
是一样的。使用汇编程序支持的任何一个。