如何在提供给MIPS的program参数中传递和存储两个字符串? 我到处都看过,但不知道从哪里开始。 我怎么知道/存储输入的程序参数的数量以及字符串参数的含义?
答案 0 :(得分:0)
official documentation对此进行了解释:
为MIPS程序提供程序参数。。默认值为 false 。 3.5版中的新增功能。
如果选中,则文本字段将显示在“文本段显示”的顶部。程序执行时,此文本字段中的所有参数值都将在执行之前存储在MIPS存储器中。
参数计数(<p><b style="margin: 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: Lato, Arial, Helvetica, sans-serif; vertical-align: baseline; color: rgb(89, 89, 89);">'60 Degrees South Bar and Grill'</b><span style="color: rgb(89, 89, 89); font-family: Lato, Arial, Helvetica, sans-serif;"> is an imaginative and quirky space that allows diners to enjoy the sea breeze and spectacular views of the Indian Ocean from three terraces. The bar and Grill is ideally situated in </span> <b style="margin: 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: Lato, Arial, Helvetica, sans-serif; vertical-align: baseline; color: rgb(89, 89, 89);">Stone Town</b><span style="color: rgb(89, 89, 89); font-family: Lato, Arial, Helvetica, sans-serif;"> on the Shangani strip, perfect for a 'sundowner' while watching a breathtaking sunset. Choose from a glass of wine from their international selection or a </span> <p><span style="color: rgb(89, 89, 89); font-family: Lato, Arial, Helvetica, sans-serif;"> <a target="_blank" href="https://green.com/files/images/Restaurants/60%20Degrees%20South-1.jpg">Image</a></span></p> <p><span style="color: rgb(89, 89, 89); font-family: Lato, Arial, Helvetica, sans-serif;"> <img alt="" src="https://green.com/files/images/Restaurants/60%20Degrees%20South-2.jpg" style="width: 550px; height: 491px;"></span> </p>
)将放置在寄存器argc
中,并且包含参数($a0
)的空终止字符串数组的地址将被放置在寄存器argv
中。这些值也可以在运行时堆栈($a1
)上使用。
该设置在火星的“设置”菜单下可用。