C
C
CloudMonster2014-10-29 09:30:25
assembler
CloudMonster, 2014-10-29 09:30:25

Outputting array elements in a MIPS Assembly loop?

Hello! You need to output the elements of the array of strings in a loop one by one. Here's the assignment: Write a program which uses a loop to print the strings to the display. Your program should use the instr_count as a loop counter, and should print one string per execution of the loop.

.data
instr_count:	.word	9
first_pass:	.asciiz “add $2,$1,$1”
.space  9
.asciiz “add $3,$0,$2”
.space  9
.asciiz “add $3,$3,$3”
.space  9
.asciiz “add $4,$3,$0”
.space  9
.asciiz “beq $3,$0,done”
.space  7
.asciiz “sub $3,$3,$1”
.space  9
.asciiz “j loop”
.space  15
.asciiz “sw $2,0($0)”
.space  10
.asciiz “lw $1,-2($4)”
.space  9

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2014-10-29
@jcmvbkbc

You forgot to ask a question. If you just "need" - you go somewhere else.
why did you put all the assembler commands in strings and even in the .data segment?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question