如何在汇编中声明字符串变量?
How to declare string variable in assembly?
如何在 MIPS 汇编中声明一个没有初始化的字符串变量?然后它从用户那里收到一笔金额。
例如:string judge;
通过使用.space
指令保留一些space:
.data
foo: .space 100 # Reserve 100 bytes of space
.text
la $a0, foo # Load the address of foo
# Do whatever
如何在 MIPS 汇编中声明一个没有初始化的字符串变量?然后它从用户那里收到一笔金额。
例如:string judge;
通过使用.space
指令保留一些space:
.data
foo: .space 100 # Reserve 100 bytes of space
.text
la $a0, foo # Load the address of foo
# Do whatever