[英]RISC-V Looping Through Array of Words
In my assignment for class the professor asked us to loop through an given array of 10 numbers and print them, and the following was provided as skeleton code:在我的课堂作业中,教授要求我们循环遍历给定的 10 个数字数组并打印它们,以下是作为骨架代码提供的:
.data
arrayOfNums:
.word 0
.word 1
.word 255
.word 65536
.word 4294967295
.word 22
.word 314159
.word 161803
.word 42
.word 131929
K: .word 1337
.text
.globl main
main:
*Code goes here*
I don't understand how to go down the list of words from arrayOfNums.我不明白如何从 arrayOfNums 中查找单词列表。 This is my first time coming into contact with any sort of assembly language so a detailed explanation would be extremely helpful, thanks guys
这是我第一次接触任何类型的汇编语言,所以详细的解释会非常有帮助,谢谢大家
In your code you have to solve the following tasks:在您的代码中,您必须解决以下任务:
ecall
ecall
打印加载的值K
symbolizes the address that immediately follows your last array elementK
表示紧跟在最后一个数组元素之后的地址ecall
to terminate your programecall
以终止您的程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.